象vfoxpro版的combox一样.
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
if combo1.tag="" then
SendMessage Combo1.hwnd, CB_SHOWDROPDOWN, True, ByVal 0&
combo1.tag="1"
else
command1.setfocus
combo1.tag=""
end if
end if
Const CB_SHOWDROPDOWN = &H14F
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendMessage Combo1.hwnd, CB_SHOWDROPDOWN, True, ByVal 0&
End Sub