Code running in design time or run-time? 
Author Message
 Code running in design time or run-time?

Hi all!

How do I know if a UserControl code is beeing executed in
design or run-time?

Thanks in advance.



Wed, 14 Sep 2005 00:04:41 GMT  
 Code running in design time or run-time?
Check out Ambient.UserMode.
'=====
Private Sub UserControl_Show()
   'Shows False at Design Time, True at Run Time
   Debug.Print Ambient.UserMode
End Sub
'=====

--
Ken Halter - MS-MVP-VB - http://www.mvps.org/vbsight - Please keep it in the groups..



Quote:
> Hi all!

> How do I know if a UserControl code is beeing executed in
> design or run-time?

> Thanks in advance.



Wed, 14 Sep 2005 00:33:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Assign a treeview at design run time to other at design time

2. web service and updating web reference with vb.net design time vs run time

3. getting run-time behavior of a contained control in a user control at design time

4. web service and updating web reference with vb.net design time vs run time

5. Design time vs Run time

6. Run Time vs Design Time - No Current Record

7. MsgBox pauses App at Design time but not run time

8. Design Time vs Run Time

9. design-time functionality at run-time

10. Saving properties of ActiveX control from design time to run time

11. VB5, Run-time much slower than Design-time

12. Creating forms at run time, not design time.

 

 
Powered by phpBB® Forum Software