TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
softairhk
NA
115
0
How to enable the txtName has the Click function?
Nov 7 2003 2:17 AM
Hello! I would like to make the txtName.Text inputted and press enter got the private void btnShowName_Click function? What's wrong for my coding at private void txtName_KeyPress? Please give me reply asap. Thanks! private void btnShowName_Click(object sender, System.EventArgs e) { string sName=txtName.Text; if(sName.Length!=0) { string sYourName = "Your name is " + sName; MessageBox.Show(sYourName,"Show Name"); } else { MessageBox.Show("Name space should not be empty!","Error",MessageBoxButtons.OK,MessageBoxIcon.Error); } } private void txtName_KeyPress(object sender, System.EventArgs e) { string sName=txtName.Text; if(sName.Length!=0) { string sYourName = "Your name is " + sName; MessageBox.Show(sYourName,"Show Name"); } else { MessageBox.Show("Name space should not be empty!","Error",MessageBoxButtons.OK,MessageBoxIcon.Error); } }
Reply
Answers (
0
)
How to Get PRINTER STATUS
Using the regex class