#include <inet.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1) ;程序生成模式为事件模式
InetGet("http://www.baidu.com/img/baidu_logo.gif","logo.gif",1,0) ;下载百度的LOGo
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 342, 174, 192, 114)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") ;注册程序窗体关闭事件,函数为Form1Close
$Pic1 = GUICtrlCreatePic("", 48, 24, 209, 89)
GUICtrlSetOnEvent(-1, "Pic1Click") ;注册图片点击事件,函数为Pic1Click
GUICtrlSetCursor($Pic1,0) ;设置图片上的鼠标格式为 手形
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetImage($Pic1,"logo.gif") ;设置图片控件上显示的图片
While 1
Sleep(10000)
WEnd
Func Form1Close()
Exit
EndFunc
Func Pic1Click()
Run(@ProgramFilesDir&"\Internet Explorer\IEXPLORE.EXE"&" [url]http://www.baidu.com[/url]")
EndFunc
|