By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

Controls Cut Paste removes Event Handlers

P: n/a
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 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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 21 '05 #2

P: n/a
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 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.