窗体的声明部分: 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:[email protected]", vbNullString, vbNullString,0&) http的使用: ShellExecute(Me.hwnd, vbNullString,"http://www.yahoo.com", vbNullString, vbNullString,0&)
哦,如果没有一个long型的变量接收返回值,应该把 ShellExecute 后的一对括号去掉。
窗体的声明部分: 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:[email protected]", vbNullString, vbNullString,0& http的使用: ShellExecute Me.hwnd, vbNullString,"http://www.yahoo.com", vbNullString, vbNullString,0&
我想在鼠标移动到label上就变成蓝色,当鼠标移走再变回来!
在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
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:[email protected]", vbNullString, vbNullString,0&)
http的使用:
ShellExecute(Me.hwnd, vbNullString,"http://www.yahoo.com", vbNullString, vbNullString,0&)
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:[email protected]", vbNullString, vbNullString,0&
http的使用:
ShellExecute Me.hwnd, vbNullString,"http://www.yahoo.com", vbNullString, vbNullString,0&
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