473,406 Members | 2,387 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,406 software developers and data experts.

how do I turn off the form designer's automatic handler code deletion?

Bob
Is there a way to turn off the form designer's automatic deletion of
"handles <control>.<eventname>" when you delete a control? It's extremely
annoying to replace one control with another of the same name, run the
project, then realize that none of the events are being handled any more.
This feature *really* needs to be removed.

Bob

Nov 20 '05 #1
4 1326
"Bob" <no****@nowhere.com> schrieb
Is there a way to turn off the form designer's automatic deletion
of "handles <control>.<eventname>" when you delete a control? It's
extremely annoying to replace one control with another of the same
name, run the project, then realize that none of the events are being
handled any more. This feature *really* needs to be removed.


No, not possible. If there's no control, there can be no "Handles.."
anymore. Only events of existing controls can be handled.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
Bob
> No, not possible. If there's no control, there can be no "Handles.."
anymore. Only events of existing controls can be handled.


Impossible for MS to change such behavior? Highly doubtful. The designer is
perfectly capable of tolerating a compile error outside of
InitializeComponent.

Bob

Nov 20 '05 #3
"Bob" <no****@nowhere.com> schrieb
No, not possible. If there's no control, there can be no
"Handles.." anymore. Only events of existing controls can be
handled.


Impossible for MS to change such behavior? Highly doubtful. The
designer is perfectly capable of tolerating a compile error outside
of InitializeComponent.


If you are capable of tolerating it, yes, then it could make sense.

BTW, your system date/time is wrong.

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
* "Bob" <no****@nowhere.com> scripsit:
No, not possible. If there's no control, there can be no "Handles.."
anymore. Only events of existing controls can be handled.


Impossible for MS to change such behavior? Highly doubtful. The designer is
perfectly capable of tolerating a compile error outside of
InitializeComponent.


I don't see any reason for changing the behavior. You could comment out
the 'Handles...' that would be removed /before/ removing the control in
the designer.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #5

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

Similar topics

5
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving...
7
by: Studio P.M. | last post by:
Dear colleagues, Does anyone have an idea where I could find precise and detailed explanation of each and every statement of the following “Web Form Designer generated code”: #region Web...
3
by: feng | last post by:
We have a windows form project that has multiple child forms inherit from one base form. In our base form's form load event handler, we have some common logic in there. These common logic is...
13
by: Lorne Smith | last post by:
Hi, First, sorry for the crosspost, but it seemed appropriate... :) I've come accross what I consider to be a bug, but I don't know if it's already known or not. (VS .Net 2003 Pro - VB.Net) ...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
3
by: scroopy | last post by:
I've created a form, MyForm, which Program creates an instance of in Main() like this: Application.Run(new MyForm()); but how do i get access to the instance of MyForm the app is using so i...
13
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer...
2
by: Ole Mercano | last post by:
When I create in Designer a new button on my Form it is automatically named e.g. "button1". When I doubleclick on it I am directed to the Form.cs where the following procedure is automatcially...
3
by: Mark Poppers | last post by:
Assume the following sequence of user actions starting with a Form and an e.g. StatusStrip: 1.) User doubleclicks on the StatusStrip 2.) VisualStudio jumps to the new generated source code ...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.