Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DesignMode
Message
From
28/08/2010 05:08:12
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
DesignMode
Miscellaneous
Thread ID:
01479015
Message ID:
01479015
Views:
100
Hi,
In VS many things what make me crazy.. one of them "DesignMode".
I am one year with VS, time to be professional :))) but.. there exist things which I can't understand

I have a container class.. in the Load event I wrote some code which communicate with my BusinessObjects and getting data
Ok, then I write the code
IF Not Me.DesginMode
......

So I expect, when I working in Visual Studio and design class - this code will never executed. Its correct, sometimes.. and sometimes not

Next situation I made a subclass of Container 1
Modify Designer - DesignMode works super - all fine - no problem

Next I put this container to the Form on the page of TabFrame.. and now - Class can't be open without error.. lots error and all depends from DataAccess.. but the dataAccess comes only from Load.. and in the Load writen
IF Not Me.DesignMode

Put the messagebox to Load of parent container - Modify designer - Bingo.. messagebox appears - Container fill in Runtime..

Ok. So I google it.. found 1 million pages where 1 million programmers asks - how to check REAL DESIGN MODE .. and found 0 answers. One of most interesting was about ISite interface.... and then.. it seems one of the PARENT container where my container located does not support ISite interface, then DesignMode can't be inherited from top container and my control thinking ("I am in Runtime")

Thats bad.. because it happens often. For example with diffrent BAR's (like toolbar, statusbar and so on) - they Ignore this ISite.


Final question.
When the Me.DesignMode - works just partial.. maybe its possible to write some function "IsRuntime" ?
How to recognize - is currently designed class in VisualStudio - or running by my own Exe?
So.
The question is
When someone has an Idea how to replace Me.DesignMode in controls in VisualStudio with something more usefull - please let me know,
Next
Reply
Map
View

Click here to load this message in the networking platform