How do you detect if VB is in design mode or run mode
-
Hi, I have a control that when it initializes in design mode it gives me an error. This is because the variable that it uses has not been initialized yet. I could just do error trapping but I would rather just detect if the program is running or if I am in design mode. Is there any way to do that? Thanks, Clint Singer
-
Hi, I have a control that when it initializes in design mode it gives me an error. This is because the variable that it uses has not been initialized yet. I could just do error trapping but I would rather just detect if the program is running or if I am in design mode. Is there any way to do that? Thanks, Clint Singer
There is a property you can check that tells you.
If Ambient.UserMode Then
'We are in Run mode
Else
'We are in Design mode
End IF-- David Wengier Sonork ID: 100.14177 - Ch00k