G
Guest
I’ve come across an unusual situation tonight, so I’m going to see if anyone
can give me an explanation for what could be going on here.
I created a new form based on instructions from a Microsoft Press book.
Rather than create the entire form (visually), I decided to copy and paste
all the controls from the training sample to my sample. Then, after words, I
entered all of the form’s code. Now, there are two buttons on the form. In
the form’s code module I found an event for one of the buttons. Anyway, I ran
the project anyway without adding any code to the btnClose button. But, when
I clicked on the close button the form closed. Now, this puzzles the heck out
of me. How can my form close when the form’s event modules do not include a
click event or any other event associated with the close button? If fact,
there’s no CLOSE command anywhere in the form’s code at all.
Does anyone have an explanation why something like this could happen?
I know this you might think this can’t be, but its happening and it makes no
sense to me. I’m assuming there must be a way to embed code in a control that
is not visible in the code editor?
I also set a breakpoint on every single line of code in the form and still,
the close button closes the form. Plus, I added an event handler to the click
event to display a message and it worked, but still closed the form. This
makes no sense to me and how can this be possible.
can give me an explanation for what could be going on here.
I created a new form based on instructions from a Microsoft Press book.
Rather than create the entire form (visually), I decided to copy and paste
all the controls from the training sample to my sample. Then, after words, I
entered all of the form’s code. Now, there are two buttons on the form. In
the form’s code module I found an event for one of the buttons. Anyway, I ran
the project anyway without adding any code to the btnClose button. But, when
I clicked on the close button the form closed. Now, this puzzles the heck out
of me. How can my form close when the form’s event modules do not include a
click event or any other event associated with the close button? If fact,
there’s no CLOSE command anywhere in the form’s code at all.
Does anyone have an explanation why something like this could happen?
I know this you might think this can’t be, but its happening and it makes no
sense to me. I’m assuming there must be a way to embed code in a control that
is not visible in the code editor?
I also set a breakpoint on every single line of code in the form and still,
the close button closes the form. Plus, I added an event handler to the click
event to display a message and it worked, but still closed the form. This
makes no sense to me and how can this be possible.