1,451
社区成员
发帖
与我相关
我的任务
分享
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const CB_SHOWDROPDOWN = &H14F
Private Sub Combo1_Click()
If Combo1.Text = "电器" Then
Combo2.Clear
Combo2.AddItem "电视"
Combo2.AddItem "电冰箱"
Combo2.AddItem "空调"
r = SendMessageLong(Combo2.hwnd, CB_SHOWDROPDOWN, True, 0)
End If
If Combo1.Text = "纺织品" Then
Combo2.Clear
Combo2.AddItem "毛巾"
Combo2.AddItem "床单"
Combo2.AddItem "被子"
r = SendMessageLong(Combo2.hwnd, CB_SHOWDROPDOWN, True, 0)
End If
If Combo1.Text = "日用品" Then
Combo2.Clear
Combo2.AddItem "肥皂"
Combo2.AddItem "洗发精"
Combo2.AddItem "饭碗"
r = SendMessageLong(Combo2.hwnd, CB_SHOWDROPDOWN, True, 0)
End If
End Sub