ahgao2
03-12-2003, 08:49 AM
Hi all I have a problem with an interface design. I was playing around with the interface of my program and I have added a toolbar into my form and I have a 'New' button with sub-buttons like 'Romance', 'Complain'.
The codings produced by Visual Basic is as follow below
Private Sub tbMenu_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "btnNew"
'ToDo: Add 'New' button code.
MsgBox "Add 'New' button code."
Case "btnComplain"
'ToDo: Add 'New' button code.
MsgBox "Add 'Complain' button code."
Case "btnRomance"
'ToDo: Add 'New' button code.
MsgBox "Add 'Recommend' button code."
End Select
End Sub
The btnComplain and btnRomance are the sub-buttons of btnNew but the codings only works for btnNew. Do I have to create another Select-Case statement to manage the sub-buttons too?
The codings produced by Visual Basic is as follow below
Private Sub tbMenu_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "btnNew"
'ToDo: Add 'New' button code.
MsgBox "Add 'New' button code."
Case "btnComplain"
'ToDo: Add 'New' button code.
MsgBox "Add 'Complain' button code."
Case "btnRomance"
'ToDo: Add 'New' button code.
MsgBox "Add 'Recommend' button code."
End Select
End Sub
The btnComplain and btnRomance are the sub-buttons of btnNew but the codings only works for btnNew. Do I have to create another Select-Case statement to manage the sub-buttons too?