本帖最后由 heroxianf 于 2016-11-23 11:06 编辑
请教一个基本问题,界面在func里面 还是不使用func 有什么区别吗?
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
test()
Func test()
$Form1 = GUICreate("Form1", 372, 196, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 24, 40, 121, 21)
$Button1 = GUICtrlCreateButton("Button1", 64, 104, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
-----------------------------------------------------------
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 372, 196, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 24, 40, 121, 21)
$Button1 = GUICtrlCreateButton("Button1", 64, 104, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|