#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$List1 = GUICtrlCreateList("", 104, 40, 97, 214, BitOR($LBS_SORT, $LBS_STANDARD, $LBS_EXTENDEDSEL, $WS_VSCROLL, $WS_BORDER))
GUICtrlSetData(-1, "001|002|003|004|005|006|007|008|009|010")
$List2 = GUICtrlCreateList("", 272, 40, 81, 214)
$Button1 = GUICtrlCreateButton("添加>>", 216, 80, 49, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
For $i = _GUICtrlListBox_GetCount($List1) - 1 To 0 Step -1
If _GUICtrlListBox_GetSel($List1, $i) Then
GUICtrlSetData($List2, _GUICtrlListBox_GetText($List1, $i))
_GUICtrlListBox_DeleteString($List1, $i)
EndIf
Next
EndSwitch
WEnd
|