本帖最后由 iori2882 于 2012-4-18 22:42 编辑
下面的代码,,在3.7几的版本有个问题,点$Button2可以刷新界面,在点回$Button1也可以刷新界面,但是 点到$Button3在点回Button2就切换不回去了点击界面的叉退出也退出不了。但是在3.3.6.1就完全好用,,,麻烦大家用3.7几版本的,帮忙测试一下,看是我机器问题还是版本问题。
而且我大量的用到了GUISetState(@SW_SHOW, $zhu_gui)之类的语句,导致在页面切换到时候有的时候会卡,有别的办法么?
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#region ### START Koda GUI section ### Form=
Global $zhu_gui = GUICreate("界面预览", 600, 400, -1, -1)
GUISetBkColor(0x4682B4)
$Button1 = GUICtrlCreateButton("Button1", 24, 24, 83, 57)
$Button2 = GUICtrlCreateButton("Button2", 232, 32, 75, 49)
$Button3 = GUICtrlCreateButton("Button3", 432, 32, 75, 49)
$ne_gui1 = GUICreate("", 600 - 20, 260, 10, 110, $WS_POPUP, $WS_EX_MDICHILD, $zhu_gui)
$Button4 = GUICtrlCreateButton("Button4", 64, 168, 75, 25)
$Input1 = GUICtrlCreateInput("Input1", 176, 192, 145, 21)
$Edit1 = GUICtrlCreateEdit("", 400, 208, 121, 105)
GUICtrlSetData(-1, "Edit1")
$MonthCal1 = GUICtrlCreateMonthCal("2012/04/16", 184, 120, 267, 153)
$ne_gui2 = GUICreate("", 600 - 20, 260, 10, 110, $WS_POPUP, $WS_EX_MDICHILD, $zhu_gui)
$Button5 = GUICtrlCreateButton("Button5", 64, 168, 75, 25)
$List1 = GUICtrlCreateList("", 224, 208, 121, 97)
$Combo1 = GUICtrlCreateCombo("Combo1", 416, 168, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
$Progress1 = GUICtrlCreateProgress(424, 288, 150, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Local $oIE = _IECreateEmbedded()
$ne_gui3=GUICreate("", 580, 260, 10, 110,$WS_POPUP,$WS_EX_MDICHILD,$zhu_gui)
GUICtrlCreateObj($oIE, 1, 1, 580, 260)
Local $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
Local $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
Local $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
Local $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)
GUICtrlSetColor(-1, 0x0860a8)
GUISetState(@SW_SHOW, $zhu_gui)
GUISetState(@SW_SHOW, $ne_gui1)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
GUISetState(@SW_SHOW, $zhu_gui)
GUISetState(@SW_SHOW, $ne_gui1)
GUISetState(@SW_HIDE, $ne_gui2)
GUISetState(@SW_HIDE, $ne_gui3)
Case $Button2
GUIDelete($Button3 )
GUISetState(@SW_SHOW, $zhu_gui)
GUISetState(@SW_HIDE, $ne_gui1)
GUISetState(@SW_SHOW, $ne_gui2)
GUISetState(@SW_HIDE, $ne_gui3)
Case $Button3
GUISetState(@SW_HIDE, $ne_gui1)
GUISetState(@SW_HIDE, $ne_gui2)
GUISetState(@SW_SHOW, $zhu_gui)
GUISetState(@SW_SHOW, $ne_gui3)
_IENavigate($oIE, "http://www.163.com")
Case $Button4
MsgBox(0, 0, 4)
Case $Button5
MsgBox(0, 0, 5)
EndSwitch
WEnd
GUIDelete()
|