際際滷

際際滷Share a Scribd company logo
Vs c# lecture9
Vs c# lecture9
TabControl Control
The TabControl manages tab pages where each page may host different child controls.
 CheckBox has two or three states. This control
provides a way for an option to be selected and
deselected independently of other options.
In this project
 Drag down a Label
 Drag down a checkbox (if the checkbox is checked the text of label
will be true, other wise it will be false.
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
label1.Text = "true";
}
else
{
label1.Text = "false";
}
}
Vs c# lecture9
Coding
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
label1.Text = "You select radioButton11";
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked == true)
label1.Text = "You select radioButton22";
}
Run
 A notification icon notifies the user. In Windows there
is a Notification Icons section typically in the bottom
right corner.
example 1. Open new project.
2. Add NotifyIcon
control to your
project.
Note:- if you dont put
an icon the
notification balloon
will not appear
Coding
 Double click on form1 and write underline code.
private void Form1_Load(object sender, EventArgs e)
{
notifyIcon1.ShowBalloonTip(1000);
}
1- Add balloonTipClicked event
2- Add underline code
private void notifyIcon1_BalloonTipClicked(object sender, EventArgs e)
{
MessageBox.Show("Hello!!!");
}
Execution
Vs c# lecture9

More Related Content

Vs c# lecture9

  • 3. TabControl Control The TabControl manages tab pages where each page may host different child controls.
  • 4. CheckBox has two or three states. This control provides a way for an option to be selected and deselected independently of other options.
  • 5. In this project Drag down a Label Drag down a checkbox (if the checkbox is checked the text of label will be true, other wise it will be false. private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { label1.Text = "true"; } else { label1.Text = "false"; } }
  • 7. Coding private void radioButton1_CheckedChanged(object sender, EventArgs e) { if (radioButton1.Checked == true) label1.Text = "You select radioButton11"; } private void radioButton2_CheckedChanged(object sender, EventArgs e) { if (radioButton2.Checked == true) label1.Text = "You select radioButton22"; }
  • 8. Run
  • 9. A notification icon notifies the user. In Windows there is a Notification Icons section typically in the bottom right corner.
  • 10. example 1. Open new project. 2. Add NotifyIcon control to your project. Note:- if you dont put an icon the notification balloon will not appear
  • 11. Coding Double click on form1 and write underline code. private void Form1_Load(object sender, EventArgs e) { notifyIcon1.ShowBalloonTip(1000); }
  • 12. 1- Add balloonTipClicked event 2- Add underline code private void notifyIcon1_BalloonTipClicked(object sender, EventArgs e) { MessageBox.Show("Hello!!!"); }