Copying and pasting components with events

  • Thread starter Thread starter glenn
  • Start date Start date
G

glenn

I have a very serious problem with my forms and components that I was
wondering if there was a way to turn off. The problem is as follows:

1) create a form and place 50 components on the form with various types of
events attached to each field and grid, such as exit events, key press
events and so on.

2) Deside at some point that you made a mistake and need to have a tabbed
notebook on the form to help break down the clutter and organize
information.

3) Cut all fields from form, drop tabbed notebook down and then paste all
fields back onto the form and let the fun begin.

What happens at this point is all of the fields are pasted back to the form,
except now they have no events attached to them. This is a very serious
problem but for some reason the developers of VS desided to make it worse.

If you decide you would like to relink that exit event for textbox1 and you
go double click on it, instead of linking to the event that has already been
created and has that name associated with it, the sytsem will instead create
a -2 version of the same event and link it to somewhere that has no code
what so ever.

I am looking at starting a new project in VS that is going to become a very
large project with a huge user interface component. However, this one issue
is causing me serious concern as to whether VS is ready for such a
production use. I know there are millions of other programmers using it to
create applications, however, they are a lot more willing to deal with this
stuff that we are. I am wondering if there is some property some where that
can be changed that would cause the environment to link back properly or at
the very least not create more events when an event already exists with that
fields name.

Thanks,

glenn
 
First of all, you should plan out your project before you start building
forms and coding it. If you do need to make changes, you can drag the
components into the tab control intead of cutting and pasting.

When I went to school, we had to do everything in notepad until we knew what
we where doing before we where even allowed to use any development
environment. So when we got to use the IDE... we where greatful.

As far as big systems go. Our system is a very large n-tier system that is
100% OO. I think you just need to get use to certain little quirks and be
grateful you don't have to do the whole thing in notepad:)

bobc
 
Well, thanks for the guideance on the perfect plan but in any software
development project I"ve ever been associated with, planning out the entire
system without making any changes just does not happen. I also appreciate
the drag and drop idea as perhaps that will take care of the problem. I'll
give that a try.

VS is also fully appreciated as being better than notepad, however, my
comparisons come from other IDE's in other languages that handle things such
as this with no problem. I hope that the 2005 stuff fixes this bug as it
could be explained as nothing other than that.

Thanks for the info...

glenn
 
Back
Top