|
-
Mar 7th, 2002, 05:16 PM
#1
ActiveX Control Run Time vs. Design Time
Hi...
OK, I want to know how can I find out in my ActiveX Control, if the control is used at design time, or run time. I have code in my ActiveX Control that runs in design time, and I DON'T want it to run.
For example if I put a message in the UserControl_Initialize() saying "Hello...", I get the message when I put the control on the form at design time, and I don't want that, but I want it to show the message when I run the program with the control on it...
So, the general idea is: How do I prevent code to run at design time?
Thank you in advance...
-
Mar 7th, 2002, 10:46 PM
#2
Never mind, I figured it out myself...
Code:
If UserControl.Ambient.UserMode Then
' application is running
Else
' applocation is in design mode
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|