Controls Cut Paste removes Event Handlers

  • Thread starter Thread starter rawCoder
  • Start date Start date
R

rawCoder

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
 
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.
 
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
 
Back
Top