本帖最后由 kxing 于 2010-4-19 19:06 编辑 #include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Local $GethWnd,$Cur=True
$Form=GUICreate("URL",200,100) ;创建主窗口
GUISetBkColor(0x000000)
$Web=GUICtrlCreateLabel("点击访问无忧天空技术论坛",10,10,180,20) ;创建文字控件
GUICtrlSetColor(-1, 0x999fff)
GuiCtrlSetCursor(-1,0) ;指定一个鼠标指针
$Email=GUICtrlCreateLabel("点击 E-Mail 与我联系",10,40,180,20) ;同上
GUICtrlSetColor(-1, 0x999fff)
GuiCtrlSetCursor(-1,0) ;同上
GUISetState() ;显示已创建的窗口及控件
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Web ;双击Url 打开天空官网
ShellExecute("http://sky808.com")
Case $Email;双击Email 打开Outlook
ShellExecute("Mailto:sky808@126.com?subject=hi!!!","",@SW_HIDE)
EndSwitch
$Pos = GUIGetCursorInfo($Form)
If Not @error Then _Hyperlink($Pos[4])
WEnd
Func _Hyperlink($GethWnda)
If $GethWnda = $Web Or $GethWnda = $Email Then
If $Cur = True Then
$GethWnd = $GethWnda
GUICtrlSetFont($GethWnda, 9, 400, 4)
GUICtrlSetColor($GethWnda, 0x0080CC)
$Cur = False
EndIf
Else
If $Cur = False Then
GUICtrlSetColor($GethWnd, 0x999fff)
$Cur = True
EndIf
EndIf
EndFunc
|