Home All Groups Group Topic Archive Search About

how to tell when in design mode in .NET 2.0

Author
26 Apr 2006 5:59 PM
Brian Henry
in 1.1 I did if DesignMode = true to check this, but in 2005 it seems to
just skip right over that and run the code I dont want to run in design
mode, anyone else have this problem? any solutions to it?

Author
26 Apr 2006 11:38 PM
Kevin Westhead
AFAIK it should still work. Are you certain that DesignMode is returning
true or is it that you expect it to return true? What does the Site property
return? If it's non-null, then you could check if the ISite.DesignMode
property is returning the same value as the DesignMode property.

--
Kevin Westhead

Show quoteHide quote
"Brian Henry" <nospam@nospam.com> wrote in message
news:OPPKGtVaGHA.504@TK2MSFTNGP03.phx.gbl...
> in 1.1 I did if DesignMode = true to check this, but in 2005 it seems to
> just skip right over that and run the code I dont want to run in design
> mode, anyone else have this problem? any solutions to it?
Author
28 Apr 2006 5:32 PM
Brian Henry
it always returns false for me... i even put a check in a control i made
that if its not design mode show a message box, but when i placed it on my
form on the form designer guess what poped up?

Show quoteHide quote
"Kevin Westhead" <spamfree.me@nospam.nospam> wrote in message
news:%23wRuOqYaGHA.4060@TK2MSFTNGP02.phx.gbl...
> AFAIK it should still work. Are you certain that DesignMode is returning
> true or is it that you expect it to return true? What does the Site
> property return? If it's non-null, then you could check if the
> ISite.DesignMode property is returning the same value as the DesignMode
> property.
>
> --
> Kevin Westhead
>
> "Brian Henry" <nospam@nospam.com> wrote in message
> news:OPPKGtVaGHA.504@TK2MSFTNGP03.phx.gbl...
>> in 1.1 I did if DesignMode = true to check this, but in 2005 it seems to
>> just skip right over that and run the code I dont want to run in design
>> mode, anyone else have this problem? any solutions to it?
>
>