borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Would you buy an ActiveX control you need for $16? VOTE NOW)Next Topic (OCX installation) New Topic New Poll Post Reply
AndreaVB Forum : ActiveX : ActiveX Control Instance
Poster Message
cocacolakid
Level: Guest


icon ActiveX Control Instance

How can you tell if an ActiveX control is a Design time or a Run Time instance. I want to show an image during Design Time, and hide it during Run Time.

04-04-2003 at 03:27 PM
| Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 530
icon Re: ActiveX Control Instance

Use this code inside your control
If UserControl.UserMode Then
     'Run Time
Else
     'Design Time
End If


[Edited by admin on 04-04-2003 at 04:51 PM GMT]

____________________________
AndreaVB

04-04-2003 at 03:50 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
cocacolakid
Level: Guest

icon Re: ActiveX Control Instance

Thank You   

UserMode is a member of the ambient properties.

UserControl.Ambient.UserMode


[Edited by cocacolakid on 04-04-2003 at 04:25 PM GMT]

04-04-2003 at 04:24 PM
| Quote Reply
win_dir
Level: VB Guru

Registered: 04-08-2002
Posts: 390
icon Re: ActiveX Control Instance

BTW, if you want to make all of the control hidden at runtime but showing at designtime you might be better using the InvisibleAtRuntime property.

____________________________
We have a Mustek 5 M/Pix GSm@rt USB Digital Camera
for just £74.03 , offer only on until 30th February!

<AllDuck.com>      

Enquiries/Sales: 0845 430 9862
Fax: 0870 950 4532

24-04-2003 at 10:17 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : ActiveX : ActiveX Control Instance
Previous Topic (Would you buy an ActiveX control you need for $16? VOTE NOW)Next Topic (OCX installation) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder