本帖最后由 heroxianf 于 2016-11-6 12:43 编辑
#Include <Misc.au3>
#include <ComboConstants.au3>
#include <WindowsConstants.au3>
GUICreate("Form1", 280, 100)
$Combo1 = GUICtrlCreateCombo("Combo1", 20, 20, 200, 30)
GUICtrlSetData(-1, "Combo2|Combo3|Combo4|Combo5")
$Combo2 = GUICtrlCreateCombo("Combo2", 20, 50, 200, 30)
GUICtrlSetData(-1, "Combo2|Combo3|Combo4|Combo5")
GUISetState(@SW_SHOW)
$dll = DllOpen("user32.dll")
While 1
If _IsPressed("0D", $dll) Then MsgBox(0,'回车键被按下', GUICtrlRead($Combo2))
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
EndSwitch
WEnd
|