|
发表于 2008-10-14 19:43:53
|
显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 439, 297, 281, 213)
$Button1 = GUICtrlCreateButton("关于", 176, 128, 75, 25, 0)
GUISetState(@SW_SHOW,$Form1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$xy=WinGetPos($Form1,"")
$Form2 = GUICreate("Form2", 225, 109,$xy[0]+ ($xy[2]-225)/2 , $xy[1]+ ($xy[3]-109)/2)
$Button2 = GUICtrlCreateButton("关闭", 70, 50, 75, 25, 0)
$Label1 = GUICtrlCreateLabel("http://www.baidu.com", 35, 15, 154, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW,$Form2)
While 1
$nMsg2 = GUIGetMsg()
Switch $nMsg2
Case $Button2
GUIDelete($Form2)
ExitLoop
Case $Label1
ShellExecute("IEXPLORE.EXE",GUICtrlRead($Label1))
EndSwitch
WEnd
EndSwitch
WEnd |
|