怎么样做超级链接?

forise 2000-08-16 06:32:00
是这样, 我在程序中做了一个ABOUT窗体,点击EMAILTO:lumine@sohu.net标检
可以把OUTLOOK打开,收件人为lumine@sohu.com,点击HTTP://www.yahoo.com
可以把YAHOO网站打开?
...全文
224 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xtra 2000-08-16
  • 打赏
  • 举报
回复
在Form_MouseMove事件中加入:
If X < Label1.Left + Label1.Width And X > Label1.Left And Y < Label1.Height + Label1.Top And Y > Label1.Top Then
Else
Label1.ForeColor = vbBlack
End If
在Label1_MouseMove事件中加入:
Label1.ForeColor = vbBlue
forise 2000-08-16
  • 打赏
  • 举报
回复
我想在鼠标移动到label上就变成蓝色,当鼠标移走再变回来!
prefix 2000-08-16
  • 打赏
  • 举报
回复
窗体的声明部分:
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

然后在要执行的代码段使用:
ShellExecute Me.hwnd, vbNullString, "mailto:lumine@sohu.net", vbNullString, vbNullString,0&
http的使用:
ShellExecute Me.hwnd, vbNullString,"http://www.yahoo.com", vbNullString, vbNullString,0&
prefix 2000-08-16
  • 打赏
  • 举报
回复
哦,如果没有一个long型的变量接收返回值,应该把 ShellExecute 后的一对括号去掉。
prefix 2000-08-16
  • 打赏
  • 举报
回复
窗体的声明部分:
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

然后在要执行的代码段使用:
ShellExecute(Me.hwnd, vbNullString, "mailto:lumine@sohu.net", vbNullString, vbNullString,0&)
http的使用:
ShellExecute(Me.hwnd, vbNullString,"http://www.yahoo.com", vbNullString, vbNullString,0&)
jerrycao 2000-08-16
  • 打赏
  • 举报
回复
用一个Label,在其click事件中调用api函数ShellExecute,具体参数在Msdn上有详细解释

7,763

社区成员

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

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