473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Controls Cut Paste removes Event Handlers

Hi All,

Create a Form
Add a Button
Double Click the button to create its Event Handler ( Button1_Click )
Now come to design view and Cut the Button
Then Paste it again
Now double click the Button
Notice that there is a new handler ( Button1_Click_1 ) just below the
old handler :-(

ok this might not be a bug , rather a functionality.
(i.e. removing the Handler when control is removed, and not RE-ATTACHED when
the control is created again. )

But, is it still there in VS 2005 ?

Thanx
rawCoder
Nov 16 '05 #1
2 1565
I think that this is by design. The problem is that there is already a
method named Button1_Click. It can't assume that is what you want to use, so
it creates a new one.

--
Lateralus [MCAD]
"rawCoder" <ra******@hotmail.com> wrote in message
news:et****************@TK2MSFTNGP10.phx.gbl...
Hi All,

Create a Form
Add a Button
Double Click the button to create its Event Handler ( Button1_Click )
Now come to design view and Cut the Button
Then Paste it again
Now double click the Button
Notice that there is a new handler ( Button1_Click_1 ) just below the
old handler :-(

ok this might not be a bug , rather a functionality.
(i.e. removing the Handler when control is removed, and not RE-ATTACHED
when
the control is created again. )

But, is it still there in VS 2005 ?

Thanx
rawCoder

Nov 16 '05 #2
No, this does not happen in VS2005 ( at least not in the Beta1 release )
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"rawCoder" <ra******@hotmail.com> wrote in message
news:et****************@TK2MSFTNGP10.phx.gbl...
Hi All,

Create a Form
Add a Button
Double Click the button to create its Event Handler ( Button1_Click )
Now come to design view and Cut the Button
Then Paste it again
Now double click the Button
Notice that there is a new handler ( Button1_Click_1 ) just below the
old handler :-(

ok this might not be a bug , rather a functionality.
(i.e. removing the Handler when control is removed, and not RE-ATTACHED when the control is created again. )

But, is it still there in VS 2005 ?

Thanx
rawCoder

Nov 16 '05 #3

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

Similar topics

1
by: Greg | last post by:
In my ASP.NET application I have a button that when pressed, data needs to be saved based on what the user typed in. I have other controls on the same page that should be updated as a result of the...
2
by: rawCoder | last post by:
Hi All, Create a Form Add a Button Double Click the button to create its Event Handler ( Button1_Click ) Now come to design view and Cut the Button Then Paste it again Now double click the...
2
by: Rob R. Ainscough | last post by:
I selected 3 controls that were in a Frame control, I "Cut" the controls and then pasted them outside the frame on the form. Now, when I double on the control (hoping to load the default event for...
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
1
by: weboweb | last post by:
Hello aspnet experts! I have a design question for the more experienced developers (more than me at least :-)). 1) I have a page in the application I'm building that displays a web user...
3
by: teo | last post by:
When I Cut and Paste controls (ie: from a 'Form' to a 'Tab control' that I just put on the Form) the pasted controls regularly arrive with their properties, but the code behind them remains...
1
by: Dica | last post by:
i've got a script that loops through a dataset and creates dynamic web controls and event handlers: while (oDr.Read()){ RadioButton oRb = new RadioButton(); oRb.ID = oDr.ToString();...
5
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This...
3
balabaster
by: balabaster | last post by:
I've got a user control that builds a table of dynamic data based on a :LINQ class holding the data. The data is loaded using the LoadData(DataInstance) method. The table it builds contains a...
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...
1
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
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.