#include #include #include Local $sCMB_Items = "Apple|Orange|Mango|Banana|Grape" #Region ### START Koda GUI section ### Form= Global $hForm1 = GUICreate("Form1", 283, 188, 312, 166) Global $hCombo1 = GUICtrlCreateCombo("", 40, 48, 185, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlSetData($hCombo1, $sCMB_Items) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode $hWndFrom = $lParam $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $hCombo1 Switch $iCode Case $CBN_DBLCLK ; Insert your code here MsgBox(0,"","$CBN_DBLCLK") Case $CBN_DROPDOWN ; Insert your code here MsgBox(0,"","$CBN_DROPDOWN") Case $CBN_EDITCHANGE ; Insert your code here MsgBox(0,"","$CBN_EDITCHANGE") Case $CBN_SELCHANGE ; Insert your code here MsgBox(0,"","$CBN_SELCHANGE") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND