473,396 Members | 1,900 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,396 software developers and data experts.

Runtime code and VS DesignMode property

PW
I have a UserControl that executes a method in its constructor. The method
contains client/server code which populates a ComboBox in the UserControl. I
have a few problems with this:

1) The constructor code in question will throw an exception in the designer
because the server is not running. I can wrap the code with an exception
handler, but this could potentially have adverse effects during runtime.

2) The VS DesignMode property is not being set, and is otherwise useless
here.

Is there an alternative/workaround to hide the method from the designer?

Thanks.
Nov 17 '05 #1
0 1003

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

Similar topics

7
by: Lucas Sain | last post by:
Hi, How can I make a code in an event not execute in design time. I have a Baseform that has X code in the event "VisibleChanged". All my forms inherit from this form. The code in this event...
29
by: Charles Law | last post by:
Further to my issue about user controls, I have a problem with DesignMode. Here is the project hierarchy: MainApp |_ Project1 |_ SubProject (UserControl) SubProject has a default constructor...
4
by: elziko | last post by:
How do I make a property of a class Readonly but only at RUNTIME? I want to be able to edit the value in a property browser after dragging my component on a form but then not allow any code to...
7
by: Fabio Cannizzo | last post by:
How can I prevent a few lines of code contained in the constructor of a Form from being executed by the Designer? Thanks, Fabio
4
by: Kyjan | last post by:
Greetings! In doing some research, I've learned that some other people have had problems with Me.DesignMode not working correctly when it's used in a user control that is placed on another form....
4
by: Janiek Buysrogge | last post by:
Hi, Is there any kind of check like #if DESIGNER ... #endif I don't want my control's OnLoad code to execute whan I drag it onto a parent container, only when I run the application.
2
by: TerryStone | last post by:
I have created a control that displays a list of items. During design mode I fill it with junk data using calls from the constructor. So when I look at a form with the control on, instead of...
2
by: Martin Arvidsson | last post by:
Hi! I have developed a component that creates a lookup for selecting values. At designtime i want to display the windows as well but with certain criterias. is there a property or something to...
2
by: Johnny Jörgensen | last post by:
I would like to be able to tell whether my component code is executed when I instanciate a control in runtime or in designtime. Can anybody give me a clua as to how you can do that? Cheers,...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.