創(chuàng)建上下箭頭按鈕(UpDown)控件.
GUICtrlCreateUpdown ( 控件ID [,樣式] )
控件ID | 將創(chuàng)建 Updown 的合作控件ID. |
樣式 | [可選參數(shù)] 控件的樣式. 查看附錄 GUI 控件樣式表. 默認(rèn)樣式 (-1) : $UDS_ALIGNRIGHT. 強(qiáng)制樣式 : $UDS_SETBUDDYINT and $UDS_ALIGNRIGHT (如果不定義對(duì)齊). |
成功: | 返回控件標(biāo)識(shí)符(控件ID). |
失敗: | 返回 0. |
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local
$title,
$input,
$msg
$title = "我的上下箭頭 GUI"
GUICreate($title, -1,
-1, -1, -1,
$WS_SIZEBOX)
$input = GUICtrlCreateInput("2", 10, 10, 50, 20)
GUICtrlCreateUpdown($input)
;
嘗試調(diào)整輸入控件
GUICtrlSetPos($input, 10, 10, 100, 40)
GUISetState()
; 運(yùn)行 GUI, 直到
GUI 被關(guān)閉
While
1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
MsgBox(0, 0, "上下調(diào)整:
" & GUICtrlRead($input))
EndFunc ;==>Example
provider with jb51.net (unicode) |