|
本帖最后由 yikang8888 于 2010-12-14 10:22 编辑
如下代码,请教哪位高手,我怎样才能打开程式时把光标定位在$Input1!感谢
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\autoit3\编程\form1.kxf
$Form1_1 = GUICreate("Auto Run Tool", 282, 336, 207, 121)
$Test = GUICtrlCreateTab(8, 0, 265, 321)
GUICtrlSetFont(-1, 8, 400, 0, "@黑体")
$TabSheet1 = GUICtrlCreateTabItem("Test")
$Input1 = GUICtrlCreateInput("Input1", 24, 264, 129, 29)
GUICtrlSetFont(-1, 12, 400, 0, "微软雅黑")
$Edit1 = GUICtrlCreateEdit("", 16, 24, 249, 209)
GUICtrlSetData(-1, "Edit1")
GUICtrlSetFont(-1, 12, 400, 0, "微软雅黑")
$Button1 = GUICtrlCreateButton("Button1", 168, 264, 97, 33)
GUICtrlSetFont(-1, 12, 400, 0, "微软雅黑")
$Label1 = GUICtrlCreateLabel("Label1", 24, 240, 53, 25)
GUICtrlSetFont(-1, 12, 400, 0, "微软雅黑")
$TabSheet2 = GUICtrlCreateTabItem("Tool")
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 88, 37, 113, 25)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 88, 69, 113, 25)
$Checkbox3 = GUICtrlCreateCheckbox("Checkbox2", 88, 101, 113, 25)
$Checkbox4 = GUICtrlCreateCheckbox("Checkbox2", 88, 133, 113, 25)
$Checkbox5 = GUICtrlCreateCheckbox("Checkbox2", 88, 165, 113, 25)
$Input2 = GUICtrlCreateInput("Input2", 96, 200, 65, 21)
$Input3 = GUICtrlCreateInput("Input3", 96, 240, 65, 21)
$Input4 = GUICtrlCreateInput("Input4", 96, 272, 65, 21)
$Button2 = GUICtrlCreateButton("Button2", 176, 216, 73, 65)
$Label2 = GUICtrlCreateLabel("Label2", 16, 208, 36, 17)
$Label3 = GUICtrlCreateLabel("Label3", 16, 240, 36, 17)
$Label4 = GUICtrlCreateLabel("Label4", 16, 272, 36, 17)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Test
Case $Checkbox1
EndSwitch
WEnd |
评分
-
查看全部评分
|