What does the Me.DesignMode

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.
 
H

Herfried K. Wagner [MVP]

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
 
M

Malleier Alfred

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top