不错呦!smile@林凯西,确保“准备文件”中的几个文件都有安装,S...您好,看了您这篇帖子觉得很有帮助。但是有个问题想请...我的修改过了怎么还被恶意注册呢 @jjjjiiii 用PJ快9年了,主要是A...PJ3啊,貌似很少有人用PJ了,现在不是WP就是z...@332347365,我当时接入时错误码没有-10...楼主,ChkValue值应为-103是什么意思呢?...大哥 你最近能看到我发的信息,请跟我联系,我有个制...
在VB中实现链接的方法
编辑:admin 日期:2006-06-27
一、运行服务器网页
新建立一个模块
然后再其中添加如下代码 :
Option Explicit
Public Const email = "support@online.com"
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 即可!
二、运行本地文件
1.利用ShellExecute
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
ShellExecute hwnd, "open", App.Path & "\index.htm", vbNullString, vbNullString, 1
2.利用Shell
Shell "explorer.exe " & App.Path & "\index.htm", 1
新建立一个模块
然后再其中添加如下代码 :
Option Explicit
Public Const email = "support@online.com"
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 即可!
二、运行本地文件
1.利用ShellExecute
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
ShellExecute hwnd, "open", App.Path & "\index.htm", vbNullString, vbNullString, 1
2.利用Shell
Shell "explorer.exe " & App.Path & "\index.htm", 1
评论: 1 | 引用: 0 | 查看次数: 5711
发表评论
请登录后再发表评论!