Sunday, 24 May 2015

Learn Visual Basic 6.0- Working with Combo Box and its properties-Quick ...


Learn Visual Basic 6.0- Working with Combo Box and its properties-Quick and easy
A ComboBox control is a combination of a TextBox and a ListBox control.
This video demonstration is focused on following points.
How can you add combo box into your form.
How can you add list items into your combo box control during loading of a form.
also how combo box works  with textbox.
as we click on any list item in  drop down list,it shows the values in the text box in the application (Know your Politician App).
it is simple application to demonstrate working of Combo box and its properties.

PLEASE COMMENTS AND SHARE :-)


Code :

Private Sub Combo1_Click()
If Combo1.Text = "Raja Virbadra Singh" Then
Text1.Text = "Present Chief Minister of H.P."
ElseIf Combo1.Text = "Prem Kumar Dhumal" Then
Text1.Text = "Ex -Chief Minister of H.P."
ElseIf Combo1.Text = "Narender Modi" Then
Text1.Text = "Prime Minister of India"
ElseIf Combo1.Text = "Arun Jeitali" Then
Text1.Text = "Finance Minister of India"
Else
End If
End Sub

Private Sub Form_Load()
Combo1.AddItem "Raja Virbadra Singh"
Combo1.AddItem "Prem Kumar Dhumal"
Combo1.AddItem "Narender Modi"
Combo1.AddItem "Arun Jeitali"
End Sub