找回密码
 加入
搜索
查看: 1691|回复: 4

关于网页连接

[复制链接]
发表于 2008-10-11 17:43:24 | 显示全部楼层 |阅读模式
如下图这样的效果,点击也可以打开网页



#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 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2008-10-13 17:07:42 | 显示全部楼层
#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
 楼主| 发表于 2008-10-14 12:00:32 | 显示全部楼层
不是这样的,我要的是点击那个关于之后,弹出来的那个界面 显示这种效果
发表于 2008-10-14 16:40:49 | 显示全部楼层
道理是一样的,只不过要点关于才出那链接,是多出了一个GUI窗口
发表于 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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-11 20:04 , Processed in 0.076535 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表