Vp lecture 4 ararat
• ComboBox is a combination TextBox with a drop-
down. Its drop-down list presents preset choices. The
user can type anything into the ComboBox.
Alternatively, he or she can select something from the
list.
Vp lecture 4 ararat
private void button1_Click(object sender, EventArgs e)
{
if (comboBox1.SelectedItem.ToString() == "two")
MessageBox.Show( comboBox1.SelectedItem.ToString());
}
private void button1_Click(object sender, EventArgs e)
{ comboBox1.Items.Add(textBox3.Text); }
private void button2_Click(object sender, EventArgs e)
{ comboBox1.Items.RemoveAt(comboBox1.SelectedIndex); }
Inserting
items to
combobox
Remove
items from
combobox
• ListBox stores several text items. It can interact with
other controls, including Button controls. We use this
control in Windows Forms. In the example program it
interacts with two Buttons—through the Button Click
event handler.
• CheckedListBox presents several items in a list. Each
item is checkable—the user can check a box. The
CheckedListBox control in Windows Forms is a way to
make longer, dynamic checkable lists.
From:
• ListBox
• ComboBox
• CheckedListBox
Vp lecture 4 ararat
private void button1_Click(object sender, EventArgs e)
{ checkedListBox1.Items.Add(textBox1.Text); }
private void button2_Click(object sender, EventArgs e)
{ checkedListBox1.Items.RemoveAt(checkedListBox1.SelectedIndex); }
private void button5_Click(object sender, EventArgs e)
{ comboBox1.Items.Add(textBox3.Text); }
private void button6_Click(object sender, EventArgs e)
{ comboBox1.Items.RemoveAt(comboBox1.SelectedIndex); }
private void button3_Click(object sender, EventArgs e)
{ listBox1.Items.Add(textBox2.Text); }
private void button4_Click(object sender, EventArgs e)
{ listBox1.Items.RemoveAt(listBox1.SelectedIndex); }
private void button8_Click(object sender, EventArgs e)
{
MessageBox.Show(checkedListBox1.SelectedItem.ToString()+'n'+
comboBox1.SelectedItem.ToString() + 'n' +
listBox1.SelectedItem.ToString());
}
private void button7_Click(object sender, EventArgs e)
{
Application.Exit();
}
Vp lecture 4 ararat

More Related Content

PPTX
Vs c# lecture3
PPTX
Vp lecture 6 ararat
PPTX
Latihan visual basic 2010/Looping/Perulangan
DOC
Correction s+ rie_vb
DOCX
.net progrmming part4
PPTX
Colegio municipal
PDF
Calculator code
DOCX
Ejercicio de Visual Basic IF THEN ELSE
Vs c# lecture3
Vp lecture 6 ararat
Latihan visual basic 2010/Looping/Perulangan
Correction s+ rie_vb
.net progrmming part4
Colegio municipal
Calculator code
Ejercicio de Visual Basic IF THEN ELSE

Similar to Vp lecture 4 ararat (19)

DOCX
Federico landinez docx
DOCX
Christian rodriguez then else
PDF
Federico landinez docx
PDF
Guevara rene if then., else
DOCX
Federico landinez docx
PDF
Parra maxi IF THEN ELSE
PDF
Inventory management
PPT
Listbox+checkedlistbox
DOCX
Código Editor Net
PPT
Combo box
PPT
vdocument.in_vb-combobox.ppt
PDF
Vb6 ch.7-3 cci
PPT
Combo box
PDF
Windows Forms For Beginners Part 5
DOC
Calculadora
PPTX
ComboBox in C#.pptxhshshzzjzhzjzhzhzhjsh
PPTX
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
DOCX
PPTX
Vs c# lecture9
Federico landinez docx
Christian rodriguez then else
Federico landinez docx
Guevara rene if then., else
Federico landinez docx
Parra maxi IF THEN ELSE
Inventory management
Listbox+checkedlistbox
Código Editor Net
Combo box
vdocument.in_vb-combobox.ppt
Vb6 ch.7-3 cci
Combo box
Windows Forms For Beginners Part 5
Calculadora
ComboBox in C#.pptxhshshzzjzhzjzhzhzhjsh
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
Vs c# lecture9
Ad

More from Saman M. Almufti (20)

PPTX
Lecture 7- domain name
PPTX
Vp lecture 11 ararat
PPTX
Vp lecture 10 ararat
PPTX
Vp lecture 12 ararat
PPTX
Vp lecture 9 ararat
PPTX
Lecture 6- http
PPTX
Lecture 5- url-dns
PPTX
Vp lecture 7 ararat
PPTX
Lecture 4- ip
PPTX
Vp lecture 5 ararat
PPTX
Lecture 3- tcp-ip
PPTX
Vp lecture 3 ararat
PPTX
Lecture 2- terminology
PPTX
Vp lecture 2 ararat
PPTX
Vp lecture1 ararat
PPTX
Lecture 1- introduction
PPTX
Vs c# lecture12
PPTX
Vs c# lecture11
PPTX
Vs c# lecture10
PPTX
Vs c# lecture8
Lecture 7- domain name
Vp lecture 11 ararat
Vp lecture 10 ararat
Vp lecture 12 ararat
Vp lecture 9 ararat
Lecture 6- http
Lecture 5- url-dns
Vp lecture 7 ararat
Lecture 4- ip
Vp lecture 5 ararat
Lecture 3- tcp-ip
Vp lecture 3 ararat
Lecture 2- terminology
Vp lecture 2 ararat
Vp lecture1 ararat
Lecture 1- introduction
Vs c# lecture12
Vs c# lecture11
Vs c# lecture10
Vs c# lecture8
Ad

Recently uploaded (20)

PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPT
What is a Computer? Input Devices /output devices
PDF
Architecture types and enterprise applications.pdf
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
Configure Apache Mutual Authentication
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
The various Industrial Revolutions .pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
STKI Israel Market Study 2025 version august
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPT
Geologic Time for studying geology for geologist
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
What is a Computer? Input Devices /output devices
Architecture types and enterprise applications.pdf
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Getting started with AI Agents and Multi-Agent Systems
Configure Apache Mutual Authentication
A proposed approach for plagiarism detection in Myanmar Unicode text
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
sbt 2.0: go big (Scala Days 2025 edition)
The various Industrial Revolutions .pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Hindi spoken digit analysis for native and non-native speakers
STKI Israel Market Study 2025 version august
Developing a website for English-speaking practice to English as a foreign la...
sustainability-14-14877-v2.pddhzftheheeeee
Abstractive summarization using multilingual text-to-text transfer transforme...
CloudStack 4.21: First Look Webinar slides
Flame analysis and combustion estimation using large language and vision assi...
Geologic Time for studying geology for geologist
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx

Vp lecture 4 ararat

  • 2. • ComboBox is a combination TextBox with a drop- down. Its drop-down list presents preset choices. The user can type anything into the ComboBox. Alternatively, he or she can select something from the list.
  • 4. private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedItem.ToString() == "two") MessageBox.Show( comboBox1.SelectedItem.ToString()); }
  • 5. private void button1_Click(object sender, EventArgs e) { comboBox1.Items.Add(textBox3.Text); } private void button2_Click(object sender, EventArgs e) { comboBox1.Items.RemoveAt(comboBox1.SelectedIndex); } Inserting items to combobox Remove items from combobox
  • 6. • ListBox stores several text items. It can interact with other controls, including Button controls. We use this control in Windows Forms. In the example program it interacts with two Buttons—through the Button Click event handler.
  • 7. • CheckedListBox presents several items in a list. Each item is checkable—the user can check a box. The CheckedListBox control in Windows Forms is a way to make longer, dynamic checkable lists.
  • 10. private void button1_Click(object sender, EventArgs e) { checkedListBox1.Items.Add(textBox1.Text); } private void button2_Click(object sender, EventArgs e) { checkedListBox1.Items.RemoveAt(checkedListBox1.SelectedIndex); } private void button5_Click(object sender, EventArgs e) { comboBox1.Items.Add(textBox3.Text); } private void button6_Click(object sender, EventArgs e) { comboBox1.Items.RemoveAt(comboBox1.SelectedIndex); } private void button3_Click(object sender, EventArgs e) { listBox1.Items.Add(textBox2.Text); } private void button4_Click(object sender, EventArgs e) { listBox1.Items.RemoveAt(listBox1.SelectedIndex); }
  • 11. private void button8_Click(object sender, EventArgs e) { MessageBox.Show(checkedListBox1.SelectedItem.ToString()+'n'+ comboBox1.SelectedItem.ToString() + 'n' + listBox1.SelectedItem.ToString()); } private void button7_Click(object sender, EventArgs e) { Application.Exit(); }