phoebe_ccy
Member
- Joined
- Oct 12, 2009
- Messages
- 6
- Programming Experience
- Beginner
Hi, currently I have a Customer Master screen. Inside the screen, I have a button which call the Customer sub window.
When I call the sub window, I want the set the cursor at Textbox1.
The problem is, when I call the window for 1st time, the cursor stops at Textbox1. When I call the window for 2nd or 3rd time, the cursor stops at other textbox or buttons inside the sub window.
Seems like Textbox1.focus is not working.
'***************Calling sub window from main screen**********
Private Sub BTN_CUSTOMER_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_SEARCH.Click
With Me
w_Form = WSW001
w_Form.WSW001_Load()
w_Form.ShowDialog()
End With
End Sub
'**************Screen Load for Sub Window***************
Public Sub WSW001_Load()
Me.Textbox1.Text = ""
Me.Textbox1.Focus()
End Sub
When I call the sub window, I want the set the cursor at Textbox1.
The problem is, when I call the window for 1st time, the cursor stops at Textbox1. When I call the window for 2nd or 3rd time, the cursor stops at other textbox or buttons inside the sub window.
Seems like Textbox1.focus is not working.
'***************Calling sub window from main screen**********
Private Sub BTN_CUSTOMER_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_SEARCH.Click
With Me
w_Form = WSW001
w_Form.WSW001_Load()
w_Form.ShowDialog()
End With
End Sub
'**************Screen Load for Sub Window***************
Public Sub WSW001_Load()
Me.Textbox1.Text = ""
Me.Textbox1.Focus()
End Sub