怎么在GUI窗口上添加作者版权信息
本帖最后由 d12990 于 2012-2-12 00:55 编辑加一段关于软件的介绍说明文字 , 加上一个代超链接的网址 ,下面是 2个按钮 ,点击分别在下面窗口显示网站www.a.com 和 www.b.com
哪位大神给个完整代码 ,谢谢。
不要说让我去看什么帮助文件,能看懂就不来这里了,没办法, 脑子笨,只会捡现成的{:face (396):}
本帖最后由 lixiaolong 于 2012-2-17 01:48 编辑
回复 1# d12990
模仿上面的图~
#include<ie.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
$oIE = _IECreateEmbedded()
$Form1 = GUICreate("专用", 750, 550, -1, -3, $WS_SIZEBOX)
$B1 = GUICtrlCreateButton("百度", 5, 90, 58, 25)
$B2 = GUICtrlCreateButton("新浪", 65, 90, 58, 25)
GUICtrlCreateLabel("", 5, 10, 740, 3, $SS_ETCHEDHORZ)
GUICtrlCreateLabel("Don't say let me to see what help files, can understand will not come" & @CRLF & _
"here, can't, the brain stupid, will only pick up the ready-made", 10, 20)
GUICtrlCreateLabel("", 5, 80, 740, 3, $SS_ETCHEDHORZ)
$ClearEdit1 = GUICtrlCreateLabel("www.autoitx.com", 10, 57, 120)
GUICtrlSetFont($ClearEdit1, 10, 800)
GUICtrlSetColor($ClearEdit1, 0x000090)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 120, 1000, 1000)
GUISetState()
Local $hWndb, $sTafa = True, $sTafb = True
While 1
$Pos = GUIGetCursorInfo($Form1)
If Not @error Then _Hyperlink($Pos)
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $b1
_IENavigate($oIE, "http://www.baidu.com")
Case $msg = $b2
_IENavigate($oIE, "http://www.sina.com.cn")
Case $msg = $ClearEdit1
ShellExecute("www.autoitx.com")
EndSelect
WEnd
Func _Hyperlink($hWnda)
If $hWnda = 8 Then
If $sTafb = True Then
GUICtrlSetFont($hWnda, 10, 800, 4)
;~ GUICtrlSetColor($hWnda, 0x0080CC)
$hWndb = $hWnda
$sTafb = False
$sTafa = False
EndIf
Else
If $sTafa = False Then
GUICtrlSetFont($hWndb, 10, 800)
;~ GUICtrlSetColor($hWndb, 0x000000)
$sTafa = True
$sTafb = True
EndIf
EndIf
EndFunc ;==>_Hyperlink
分享支持。学习了。 试下2楼的…… 试下2楼的…… 多谢2 楼 大哥 回复d12990
模仿上面的图~
lixiaolong 发表于 2012-2-17 01:46 http://www.autoitx.com/images/common/back.gif
效果不错,就是这个程序窗口和网页窗口都没有调节大小的功能啊 .打开网页只能看到一部分, 回复 7# au3fans2012
这个很简单,试试这个.
#include<ie.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
$oIE = _IECreateEmbedded()
$Form1 = GUICreate("专用", 750, 550, -1, -3, $WS_SIZEBOX)
$B1 = GUICtrlCreateButton("百度", 5, 90, 58, 25)
$B2 = GUICtrlCreateButton("新浪", 65, 90, 58, 25)
GUICtrlCreateLabel("", 5, 10, 740, 3, $SS_ETCHEDHORZ)
GUICtrlCreateLabel("Don't say let me to see what help files, can understand will not come" & @CRLF & _
"here, can't, the brain stupid, will only pick up the ready-made", 10, 20)
GUICtrlCreateLabel("", 5, 80, 740, 3, $SS_ETCHEDHORZ)
$ClearEdit1 = GUICtrlCreateLabel("www.autoitx.com", 10, 57, 120)
GUICtrlSetFont($ClearEdit1, 10, 800)
GUICtrlSetColor($ClearEdit1, 0x000090)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 120, 750, 550) ; GUICtrlCreateObj($oIE, 0, 120, 1000, 1000)==>GUICtrlCreateObj($oIE, 0, 120, 750, 550)
GUICtrlSetResizing(-1, 1) ;添加了GUICtrlSetResizing(按照新窗口的大小重新设置窗口大小和坐标.)
GUISetState()
Local $hWndb, $sTafa = True, $sTafb = True
While 1
$Pos = GUIGetCursorInfo($Form1)
If Not @error Then _Hyperlink($Pos)
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $B1
_IENavigate($oIE, "http://www.baidu.com")
Case $msg = $B2
_IENavigate($oIE, "http://www.sina.com.cn")
Case $msg = $ClearEdit1
ShellExecute("www.autoitx.com")
EndSelect
WEnd
Func _Hyperlink($hWnda)
If $hWnda = 8 Then
If $sTafb = True Then
GUICtrlSetFont($hWnda, 10, 800, 4)
;~ GUICtrlSetColor($hWnda, 0x0080CC)
$hWndb = $hWnda
$sTafb = False
$sTafa = False
EndIf
Else
If $sTafa = False Then
GUICtrlSetFont($hWndb, 10, 800)
;~ GUICtrlSetColor($hWndb, 0x000000)
$sTafa = True
$sTafb = True
EndIf
EndIf
EndFunc ;==>_Hyperlink
回复 8# lixiaolong
这个比上一个好些,右侧多了一个滑动块, 但最好能做成像一般窗口一样,有最大化,最小化,效果会更好些. 回复 9# au3fans2012
#include <StaticConstants.au3>下面添加 Opt("GUIResizeMode", 512)
; $WS_SIZEBOX 改为 0x00070000
$Form1 = GUICreate("专用", 750, 550, -1, -3, 0x00070000) 如果能单击不同网址,实现不同窗口大小更加好!
即是这里:
$Form1 = GUICreate("专用", 750, 550, -1, -3, $WS_SIZEBOX)
能否实现不同网址不同大小呢? 好东西,学习了 {:face (239):} 跟着学习一下。。。谢谢2楼的兄弟 更新的双窗口
页:
[1]
2