回复 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[4])
$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
|