How can I determine if a user control is in design mode?
Printable View
How can I determine if a user control is in design mode?
Mike <mike@nospam.somewhere.nu> wrote in message
news:3ab5fb09$1@news.devx.com...
>
> How can I determine if a user control is in design mode?
Controls are derived from System.ComponentModel.MarshalByRefComponent, which
provides a GetDesignMode() method. So from within the user control, you can
use...
If Me.GetDesignMode() Then
'-- design-time code
Else
'-- run-time code
End If
--
David.
If you're in an VB6 usercontrol, you can use the Ambient.UserMode property.
If you're in VB.NET, all controls inherit from the RichControl class, which
gives them the Site.GetDesignMode property.
-Rob
"Mike" <mike@nospam.somewhere.nu> wrote:
>
>
>How can I determine if a user control is in design mode?
>
> If you're in an VB6 usercontrol...
....you should have posted this message to vb.controls.creation.dcom. ;-)
---
Phil Weber
DevX Newsgroup Admin
"Phil Weber" <pweber@devx.com> wrote in message
news:3ab69d08@news.devx.com...
> > If you're in an VB6 usercontrol...
>
> ...you should have posted this message to vb.controls.creation.dcom. ;-)
Holy Police State Batman!
Phil...You're out of control, man! (I just read about 6 posts in a row from
you - all on the same patrol-beat-theme) <g>
> Phil...You're out of control, man! (I just read about 6 posts
> in a row from you - all on the same patrol-beat-theme) <g>
Just trying to keep the signal-to-noise ratio high by encouraging people to
post to the most appropriate groups. Thank you (all) for your cooperation!
:-)
---
Phil Weber
DevX Newsgroup Admin
On Mon, 19 Mar 2001 19:42:11 -0500, "Mark Burns" <mark@iolofpa.com>
wrote:
>Holy Police State Batman!
>Phil...You're out of control, man! (I just read about 6 posts in a row from
>you - all on the same patrol-beat-theme) <g>
Uhhh... I think it's his job, mon. Check da badge.
Dan
Language Stability is a *feature* I wish VB had!
(#6)
"Phil Weber" <pweber@devx.com> wrote in message
news:3ab6aca3$1@news.devx.com...
> Just trying to keep the signal-to-noise ratio high by encouraging people
to
> post to the most appropriate groups.
OK, but one more string like that, and I'm gonna have to bust you down to
drinking only DECAF after 10AM...(Eastern Time, that is) =)