|
-
Mar 4th, 2001, 04:27 PM
#1
Thread Starter
Fanatic Member
When creating ActiveX controls with timer events, the timer may start when using it in design time of the VB project, which may cause flicker and other bad stuff.
I need for my control to check if the parent application is in design time or run time.
At the moment I use the Show event of my usercontrol.
I use the :
"parent.ShowInTaskbar = parent.ShowInTaskbar"
and then trap the error, because the ShowInTaskbar property is Read-Only in runtime.
This works OK, but I think there must be a better way telling.
Does anyone know how to do this the "Real" way?
Thx in advance.
Pax
Last edited by pax; Mar 8th, 2001 at 07:27 AM.
-
Mar 4th, 2001, 09:30 PM
#2
Use the UserMode property of the Ambient object of the UserControl, it returns True when in Runtime mode and False when in Designtime mode, i.e.
Code:
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
If UserControl.Ambient.UserMode Then
Label1 = "Runtime"
Else
Label1 = "Design Time"
End If
End Sub
-
Mar 5th, 2001, 11:27 AM
#3
Thread Starter
Fanatic Member
Thank's
Thank's alot.
I guess I still have a lot to learn about ActiveX development ;-)
Greetings
Pax
Last edited by pax; Mar 8th, 2001 at 07:35 AM.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
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
|