#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ie.au3>
$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 8, 8, 621, 400)
_IENavigate($oIE, "http://tool.admin5.com/dw/")
_IELoadWait($oIE)
$BTN = GUICtrlCreateButton("测试在第二个GUI输入文字", 176, 415, 219, 25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $BTN
GUISetState(@SW_HIDE) ;隐藏$Form1
GUI2()
EndSwitch
WEnd
;============================
Func GUI2()
_IENavigate($oIE, "about:blank") ;跳转到空白页
Local $Form_2 = GUICreate("我是第二个GUI", 316, 240, Default, Default, 0, 0, $Form1)
Local $Label1 = GUICtrlCreateLabel("输入内容:", 16, 16, 64, 17, $ES_NOHIDESEL)
Local $BtnName = GUICtrlCreateInput("内容", 80, 16, 200, 21)
Local $Edit1 = GUICtrlCreateEdit("", 80, 50, 200, 89)
Local $Button1 = GUICtrlCreateButton("关闭", 184, 150, 75, 25)
Local $Label1 = GUICtrlCreateLabel("左右方向键,退格键,删除键都不灵了,是什么原因呢?", 8, 180, 300, 17)
GUISetState(@SW_SHOW)
While 1
Local $nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
_IENavigate($oIE, "http://tool.admin5.com/dw/") ;切换回_IENavigate($oIE, "http://tool.admin5.com/dw/")
WinSetState("Form1", "", @SW_SHOW) ;显示$Form1
ExitLoop
EndSwitch
WEnd
GUIDelete($Form_2)
EndFunc ;==>GUI2
|