totally annoying IDE stuff in VB.NET


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I have ignored this until now. I hope for the love of God that I am missing a setting somewhere and this is not the way things are in the .NET world.



When I cut a button (or other control) that has code in one of its events and add it to another container on the form, the new control has no code, the code is stranded up in an event tied to the old (non-existent button).



Also, if I rename a control this happens as well, what a pain.



Here is hoping I am just missing the obvious, in VFP I could cut 40 controls and paste them into a pageframe page (panel page) if I wanted to and everything moved. I tend to focus on "make it work", then go back and make it pretty (and fix control names).



Thanks.




Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
When I cut a button (or other control) that has code in one of its events and add it to another container on the form, the new control has no code, the code is stranded up in an event tied to the old (non-existent button).

This is actually correct.  It is not like VFP where the code is stored within a control.  All .NET events are properly handled versus executing an embedded procedure as in VFP.  This is actually better because in VFP if you moved a control to another parent or page, then your references died.  As you have learned, this doesn't happen in .NET.  The code is just a handler of the objects events.

Also, if I rename a control this happens as well, what a pain.

It sounds like you are doing this the hard way.  .NET is AWESOME in this respect!!!  Instead of manually renaming a variable or method, right-click the method and select "Rename..."  This will rename the variable, method, etc. and all references to the old name.  Very nice.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search