$Combo1 = GUICtrlCreateCombo("กรุณาเลือก", 40, 96, 145, 25)
GUICtrlSetData(-1,"Blue|Red|Yellow|Pink","กรุณาเลือก")
$Button1 = GUICtrlCreateButton("start", 224, 32, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If $combobox ..........
(ตรงส่วนนี้แหละครับจะทำไงดี)จะให้ทำ ถ้าเลือกแถบ Blue ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีฟ้า"
ถ้าเลือกแถบ Red ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีแดง"
ถ้าเลือกแถบ Yellow ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีเหลือง"
ถ้าเลือกแถบ Pink ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีชมพู"
EndSwitch
WEnd
มึนตึ๊บ เลยครับ
GUICtrlSetData(-1,"Blue|Red|Yellow|Pink","กรุณาเลือก")
$Button1 = GUICtrlCreateButton("start", 224, 32, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If $combobox ..........
(ตรงส่วนนี้แหละครับจะทำไงดี)จะให้ทำ ถ้าเลือกแถบ Blue ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีฟ้า"
ถ้าเลือกแถบ Red ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีแดง"
ถ้าเลือกแถบ Yellow ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีเหลือง"
ถ้าเลือกแถบ Pink ที่คอมโบบ๊อกให้เป็น
$color1 = "รหัสสีชมพู"
EndSwitch
WEnd
มึนตึ๊บ เลยครับ