|
-
Feb 1st, 2003, 04:50 PM
#1
Thread Starter
New Member
What this code mean ???
Private Sub txtName_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtFirstName.Validating, txtLastName.Validating
If CType(sender, TextBox).Text = "" Then
MessageBox.Show("You must enter a first and last name.", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Warning)
e.Cancel = True
End If
End Sub
I write this code from the book and it's work but I don't know what I wrote??
What is ...
1 - CType mean?
2 - Sender mean?
3 - TextBox mean? (My TextBox name is txtFirstName why I use TextBox not txtFirstName?)
Thanks all,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|