Article ID: 178490
Article Last Modified on 5/13/2003
Control Default Name Property Setting -------------------------------------------------------------------- ComboBox Combo1(0) Style 0-DropDown Combo ComboBox Combo2(1) Style 1-Simple Combo ComboBox Combo3(2) Style 2-Dropdown List
Option Explicit
Dim bytCount As Byte
Dim captions(0 To 2) As String
Private Sub Form_Load()
Dim i As Integer
bytCount = 0
Command1.Caption = "Change Style"
captions(0) = "Dropdown Combo"
captions(1) = "Simple Combo"
captions(2) = "Dropdown List"
Label1.AutoSize = True
For i = 0 To 2
With Combo1(i)
.Left = 2400
.Top = 360
.Visible = False
End With
Next i
Label1.Caption = captions(bytCount)
Combo1(bytCount).Visible = True
Combo1(1).Height = 2000
For i = 1 To 10
Combo1(0).AddItem i
Combo1(1).AddItem i
Combo1(2).AddItem i
Next i
End Sub
Private Sub Command1_Click()
Combo1(bytCount).Visible = False
bytCount = (bytCount + 1) Mod 3
Combo1(bytCount).Visible = True
Label1.Caption = captions(bytCount)
End Sub
Additional query words: kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport kbControl read only run time design time runtime readonly
Keywords: kbprb KB178490