cut & past the textbox from tabpage1 to tabpage2

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

it is very strange that " i place some code in my Page1's textbox validated
event'.
then I cut the textbox and paste into page2.
I found that , the validated event is change.
From
Private Sub txtJobNo_Validated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtJobNo.Validated
change into
Private Sub txtJobNo_Validated(ByVal sender As System.Object, ByVal e As
System.EventArgs)

Why ??
 
Agnes said:
it is very strange that " i place some code in my Page1's textbox
validated event'.
then I cut the textbox and paste into page2.
I found that , the validated event is change.
From
Private Sub txtJobNo_Validated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtJobNo.Validated
change into
Private Sub txtJobNo_Validated(ByVal sender As System.Object, ByVal e
As System.EventArgs)

Why ??

When you cut the textbox, the Handles statement is removed because there is
no object that's events can be handled. If you paste the textbox on page 2,
you only insert the cut part. You cut only the visual part if you use the
designer. Solution: Move (=Drag&drop) the textbox outside the tabcontrol,
switch to page 2, then drag&drop it on page 2.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Back
Top