新建立一个模块
然后再其中添加如下代码 :
option explicit
public const email = "[email protected]"
public const url = "http://blog.csdn.net/flm2003/"
public declare function shellexecute lib "shell32.dll" alias "shellexecutea" (byval hwnd as long, byval lpoperation as string, byval lpfile as string, byval lpparameters as string, byval lpdirectory as string, byval nshowcmd as long) as long
public const sw_shownormal = 1
public sub gotoweb()
dim success as long
success = shellexecute(0&, vbnullstring, url, vbnullstring, "c:/", sw_shownormal)
end sub
public sub sendemail()
dim success as long
success = shellexecute(0&, vbnullstring, "mailto:" & email, vbnullstring, "c:/", sw_shownormal)
end sub
接着就简单不过了!
在你所要进行超连接的窗体中,如实现label的超连接
那就在label的click事件中加入 gotoweb或sendemail 即可!
新闻热点
疑难解答