Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a control see if in Run-time / Design mode?

Status
Not open for further replies.

micman

Technical User
Jul 5, 2002
71
GR
Hello everyone.

Is there any way to see (thru the code of an ActiveX control that i made) whether the properties of my control are being changed during design-mode or Run-time.

The thing is that i want to prevent my ActiveX from executing the main body of a <Property Let> when in Design-time.

Example:

Public Property Let mmTestProp (Byval vNewValue as string)

If Not <<<Design-Mode>>> then
.
.
.
.
end if
.
.
.
.
.


I know there is a way to do that but despite my search, i could not find out how !!!!!

Thanks a lot ...

Michael Manos
Automation R&D
 
The UserMode property of the control tells you if the control is running in the IDE, or if it is running as a compiled program. This is part of the AmbientProperties object in the ActiveX control.

UserMode = False (Code is running under the IDE, Design time )
UserMode = True ( Code is running compiled, Run time )


Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top