Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
Using a textBox for alert
Israel
Apr 26 2016 10:54 AM
341
Reply
Hi!
I would like to make a textbox alerting when I make an operation. These codes work well. But I need to use a Textbox to boot an alert.
private void textBox3_TextChanged(object sender, EventArgs e)
{
string s = (sender as TextBox).Text;
int i = Convert.ToInt16(s);
if (i > 5)
{
MessageBox.Show("Number greater than 5");
(sender as TextBox).Focus();
}
}
For instance, TextBox1.Text + TextBox2.Text = TextBox3.Text //If the answer its more than five (5). Then popup the message.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
String was not recognized as a valid DateTime.
Progess bar before opening windows application