I want to show a notifyicon if for this code:
if (textbox.text == "hello");
Anyone have an idea on how i can do this?
I want to show a notifyicon if for this code:
if (textbox.text == "hello");
Anyone have an idea on how i can do this?
Check this link
This code worked for me(set on a button click)
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "hello")
{
notifyIcon1.BalloonTipText = "hi";
notifyIcon1.ShowBalloonTip(100);
}
}
Remember to add an icon to the notifyicon element.
It looks something like this probably.
if (textBox1.Text.ToLower() == "hello")
notifyIcon1.Visible = true;
else
notifyIcon1.Visible = false;
it shows and hides the notificationicon control
NOTE: add this to an event if you want it to perform automatically or call it explicitly using a method.