473,395 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Where has UserMode gone in .Net?

In VS 6 there was a UserMode property of the AmbientProperty that told you if you were executing in design mode or run-time. I cannot find this anywhere in .Net 2003. Can anyone tell me where it is or if there is a replacement
Jul 21 '05 #1
2 1483

"Brian Kirk" <Br********@Kaz-group.com> wrote in message
news:CF**********************************@microsof t.com...
In VS 6 there was a UserMode property of the AmbientProperty that told you

if you were executing in design mode or run-time. I cannot find this
anywhere in .Net 2003. Can anyone tell me where it is or if there is a
replacement

The DesignMode property of the System.ComponentModel.Component class is what
you need. All controls (including Forms) inherit directly or indirectly from
this class, so it should work in an form or control.

You need to be careful, though, because you cannot use it in the constructor
of your form or control. This is because the property is actually associated
with the ISite interface, and there is no Site for a control or form while
it is being created. You can accurately check the DesignMode property in the
Load event handler of the Form (or UserControl), so you will need to put
conditional logic there.
Jul 21 '05 #2
Thanks Jeremy, chased that up and it does what I neede

Regard

Brian
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bob Rock | last post by:
Hello, where has the modal frame extended control style (WS_EX_DLGMODALFRAME) gone??? I can't find it among a control's properties. Bob Rock
22
by: ByteSize | last post by:
Dear All, Please, this is not meant to be offensive - but it is a challenge !!! I have posted on over a dozen so called 'vb.net' expert / blog sites - in the vain hope of finding a complete,...
2
by: CoolPint | last post by:
Standard exception classes in C++ have what() which returns const char * and they have constructors accepting string. Where is that string created and when is the string destroyed? In the...
7
by: Muscha | last post by:
My c# application has gone beserk, it consumes 700MB memory griding my machine to a halt. What is the quickest way for me to find out what's happening? Where do all the memory has gone? /m
3
by: Cyrus Donders | last post by:
Hi, We are developing a web application in asp.net and all of a sudden there is this new requirement and I am having problems to implement it. My problem is that when a regular html page posts...
10
by: Stephan Brunner | last post by:
Hi VS 2003 used to have an (Overrides) entry in the left dropdown of the code editor. Where has this handy feature gone in VS 2005?
2
by: Brian Kirk | last post by:
In VS 6 there was a UserMode property of the AmbientProperty that told you if you were executing in design mode or run-time. I cannot find this anywhere in .Net 2003. Can anyone tell me where it is...
7
by: Chris | last post by:
Hello all... I have a program with the following structure (all classes mentioned are of my own creation, and none of the classes contain try or catch blocks): - main() consists of a large...
0
by: Bassam | last post by:
Hello in VS.NET 2003 using VB.NET there was a property for windows forms , SnaptoGrid , True/False and Grid Size where we can set them for individual forms , now those 2 settings are gone from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.