vb中toolbar上面有多个图标时,怎样才能单个的写代码?
1个回答
展开全部
Private Sub tlb_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "k1"
mnuTablePatientAdd_Click
Case "k2"
munTableCheckAdd_Click
Case "k3"
munTableCheckRegist_Click
Case "k4"
munTableCheckSetResult_Click
Case "k5"
mnuTablePatientOther_Click
Case "k6"
munTableCheckOther_Click
Case "k7"
Form_Activate
End Select
End Sub
‘’‘’‘’‘’‘’‘’‘’‘
其中 tlb是toolbar的名字
"k1" "k2"这些是每个toolbar按钮的key
Select Case Button.Key
Case "k1"
mnuTablePatientAdd_Click
Case "k2"
munTableCheckAdd_Click
Case "k3"
munTableCheckRegist_Click
Case "k4"
munTableCheckSetResult_Click
Case "k5"
mnuTablePatientOther_Click
Case "k6"
munTableCheckOther_Click
Case "k7"
Form_Activate
End Select
End Sub
‘’‘’‘’‘’‘’‘’‘’‘
其中 tlb是toolbar的名字
"k1" "k2"这些是每个toolbar按钮的key
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询