回复 1# iPAQ
试试
#Include <GuiComboBox.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 313, 77, 192, 124)
$Combo1 = GUICtrlCreateCombo("select", 32, 16, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10")
$Button1 = GUICtrlCreateButton("删除", 208, 16, 75, 25)
GUICtrlSetOnEvent(-1,'del')
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE,'Quit')
While 1
Sleep(100)
WEnd
Func Quit()
Exit
EndFunc
Func del()
If _GUICtrlComboBox_DeleteString($Combo1, 1) = -1 Then MsgBox(0,'','没有可以删除的了')
EndFunc
|