|
楼主 |
发表于 2009-7-5 15:45:08
|
显示全部楼层
;为了更明白的说明这一点,你可以看看下面的范例,注意注释部分,去掉那一行你试验一下吧!
#include <GUIConstantsEx.au3>
$forms = GUICreate('', 800, 600)
GUISetState(@SW_SHOW, $forms)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 800, 560)
$button1 = GUICtrlCreateButton('1', 10, 570, 20, 20)
$button2 = GUICtrlCreateButton('2', 40, 570, 20, 20)
GUISetState(@SW_SHOW, $forms)
$oIE.navigate("http://www.google.com")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
Exit
Case $button1
GUICtrlSetState($button1 , $gui_focus) ;等页面加载完,没有这一行你试试,
GUISetState(@SW_HIDE, $forms)
$forms2 = GUICreate('', 800, 600)
$editbox = GUICtrlCreateEdit('试验一下退格吧', 0, 0, 800, 600)
GUISetState(@SW_SHOW, $forms2)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
GUISetState(@SW_SHOW, $forms)
GUIDelete($forms2)
ExitLoop
EndSwitch
WEnd
EndSwitch
WEnd |
|