Use Of C# RadioButton Control :
private void button1_Click(object sender, EventArgs e)
Thursday, 29 November 2012
C# CheckBox Control
Use Of C# CheckBox Control :
private void button1_Click(object sender, EventArgs e)
CheckBox Control Allow User To Choose Multiple Items From List Of Items.
Important Property Set Of CheckBox Control From Property Window :
Text : Represent String, That String Display With CheckBox Control.
Checked : True/False, If You Set True Then CheckBox Control Display With Checked Mark.
Code To Display User Selected Color In Label Control When User Click On Button
private void button1_Click(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
label1.Text = label1.Text + checkBox1.Text;
}
if (checkBox2.Checked == true)
{
label1.Text = label1.Text + checkBox2.Text;
}
if (checkBox3.Checked == true)
{
label1.Text = label1.Text + checkBox3.Text;
}
}
Output :
C# Label Control
Use Of C# Label Control :
private void button1_Click(object sender, EventArgs e)
Label Controls are Used to Display Text and cannot be modify by the user. They are used to identify objects on a form.
Important Property Set Of Label Control From Property Window :
Text : Represent String, That String Display With Label Control.
Code To Merge Label Control Text With Textbox Text When User Click On Button
private void button1_Click(object sender, EventArgs e)
{
label2.Text = label2.Text + textBox1.Text;
}
Output :
C# Textbox Control
Use Of C# TextBox Control :
A text box is a Windows control used to get or display text to the user.
Important Property Set Of Textbox Control From Property Window :
Text : Represent String, That String Display With TextBox Control.
Code To Display MessageBox With Textbox Text When User Click On Button
private void button1_Click(object sender, EventArgs e)
{
string s = textBox1.Text;
MessageBox.Show("Message : " + s, "Message");
}
Output :
Subscribe to:
Posts (Atom)



