-
Controld
I want to write a cd player in VB. I have custom controls. i want to have a access-bar from which you can access any song by clicking the corresponding button, but how can I add the corresponding number of buttons depending on the number of songs? So, how can I add or remove controls at runtime?
-
add control at runtime
Try something like...
for i = 0 to iSongCount - 1
Set cmdButton = Controls.Add("VB.CommandButton", "cmdButton")
With cmdButton
.Caption = "&Main Menu"
.Left = 500
.Top = 100
.Width = 2000
.Visible = True
End With