473,324 Members | 2,166 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,324 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 1318
"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 ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.