新建立一個模塊
然后再其中添加如下代碼 :
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 即可!
新聞熱點
疑難解答