paullepa
asked on
Copy / Paste in Visual Studio (VB.NET) looses the 'connected' evetns
I am trying to move some of my objects into a tab. When I cut and then paste the object - the object pastes just fine BUT any associated EVENTS with that objects don't get copied over.
This is a simple test I did. One button on the form. Added a click event test to it.
When I copy the button, then paste it, VB wants to create a new even for it with _X (where x={1...n},
like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
test()
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
test2()
End Sub
Private Sub Button1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
All I'm after is a simple copy/paste where the whole object gets moved over along with all the events, etc.
Any ideas how this is done?
Paul
This is a simple test I did. One button on the form. Added a click event test to it.
When I copy the button, then paste it, VB wants to create a new even for it with _X (where x={1...n},
like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
test()
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
test2()
End Sub
Private Sub Button1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
All I'm after is a simple copy/paste where the whole object gets moved over along with all the events, etc.
Any ideas how this is done?
Paul
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Bob