netpicker9
Member
- Joined
- Dec 8, 2004
- Messages
- 17
- Programming Experience
- 1-3
Hi,
I have upgraded VB6 to Vb.net 2005.
In VB6 I have a ComboBox for Country List, and Event called "cboCountry_GotFocus".
Above event fires, once combo box got focus.
After conversion, in VB.net its converted as "cboCountry_Enter".
Problem is once form is loaded The code under "cboCountry_Enter" is executing directly.
Which I don't want..
I tried changing _Enter Event to _GotFocus event, but still same problem.. How to solve this?
Thanks
I have upgraded VB6 to Vb.net 2005.
In VB6 I have a ComboBox for Country List, and Event called "cboCountry_GotFocus".
VB.NET:
Private Sub cboCountry_GotFocus()
If txtAddress.text = "" then
MsgBox "Enter Address First", , App.Title
txtAddress.SetFocus
End if
End Sub
After conversion, in VB.net its converted as "cboCountry_Enter".
Problem is once form is loaded The code under "cboCountry_Enter" is executing directly.
Which I don't want..
VB.NET:
Private Sub cboCountry_Enter(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboCountry.Enter
If txtAddress.text = "" then
MsgBox "Enter Address First", , App.Title
txtAddress.SetFocus
End if
End Sub
Thanks
Last edited by a moderator: