怎样在窗体上建立一个超连接,单击后调用IE打开

pcube 2003-08-14 06:03:46
怎样在窗体上建立一个超连接,单击后调用IE打开,多多指教
...全文
74 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wgy081 2003-08-15
  • 打赏
  • 举报
回复
用shellexecte这个api函数就可以了
同意楼上的。
snowcloud2002 2003-08-14
  • 打赏
  • 举报
回复
ShellExecute
capricciososoft 2003-08-14
  • 打赏
  • 举报
回复
请在窗体上放置两个标签控件:Label1、Label2
Option Explicit
Private 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

Private Sub Label1_Click()
ShellExecute 0&, "Open", "mailto:support@capricciososoft.com", "", App.Path, 1
End Sub
Private Sub Label2_Click()
ShellExecute 0&, "Open", "http://www.capricciososoft.com", "", App.Path, 1
End Sub
射天狼 2003-08-14
  • 打赏
  • 举报
回复
Private 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

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1(4).ForeColor = vbBlue
End Sub

Private Sub Label1_Click(Index As Integer)
On Error resume next
'Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE www://sohu.com, vbMinimizedFocus
ShellExecute Me.hwnd, "open", "http://www.sohu.com", vbNullString, vbNullString, 1
Exit Sub
End Sub

7,789

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧