What does the Me.DesignMode

  • Thread starter Thread starter Malleier Alfred
  • Start date Start date
M

Malleier Alfred

Hi,

what does the Me.DesignMode-Property turn back. I tried to set a
MsgBox(Me.DesignMode) in my form's and control's Sub New(), but it allways
turns back 'false', even if the form or control is open in Designmode.

To set correctly the properties when changed in the property-browser while
designing I need to know if the control is in designtime or in runtime-mode.
Is there a way to manage this?

thanks, Alfred M.
 
Hello,

Malleier Alfred said:
what does the Me.DesignMode-Property turn back. I tried to set a
MsgBox(Me.DesignMode) in my form's and control's Sub New(), but it allways
turns back 'false', even if the form or control is open in Designmode.

To set correctly the properties when changed in the property-browser while
designing I need to know if the control is in designtime or in runtime-mode.
Is there a way to manage this?

http://msdn.microsoft.com/library/e...mponentmodelcomponentclassdesignmodetopic.asp

HTH,
Herfried K. Wagner
 
Hallo Herfried,

vielen Dank für die Hilfe,

but I saw this article in Helpfile and the only description is:

"Gets a value that indicates whether the Component is currently in design
mode."

The DesingMode-Property allways returns False even if the App or form or
control is in designmode. I want to resize my control each time the user
changes a property belonging to the size or placement of the control. But on
runtime I want to do this only once for performance reasons. The statement
in Sub New()

DoResizeMe = Me.DesignMode

or

Dim DoResizeMe as Boolean = Me.DesignMode

outside the Sub New() does not function.

What I am doing false?

Thanks, Alfred M.
 
Back
Top