关于网页连接
如下图这样的效果,点击也可以打开网页#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 203, 153, 193, 125)
$Label1 = GUICtrlCreateLabel("关于", 64, 56, 28, 17)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Label1
MsgBox(0,"关于本程序","www.baidu.com" )
EndSwitch
WEnd
[ 本帖最后由 botanycc 于 2008-10-21 18:18 编辑 ] #include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 299, 78, 295, 229)
$Label1 = GUICtrlCreateLabel("http://www.baidu.com", 64, 24, 154, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Label1
ShellExecute("IEXPLORE.EXE",GUICtrlRead($Label1))
EndSwitch
WEnd 不是这样的,我要的是点击那个关于之后,弹出来的那个界面 显示这种效果 道理是一样的,只不过要点关于才出那链接,是多出了一个GUI窗口 #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+ ($xy-225)/2 , $xy+ ($xy-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
页:
[1]