1.下面是我临时写的,请大家指教:'需要一个label控件Option ExplicitPrivate 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 Declare Function GetDesktopWindow Lib "user32" () As Long Const SW_SHOWNORMAL = 1Public Function StartURL(URL As String) As Long Dim Scr_hDC As Long Scr_hDC = GetDesktopWindow() StartURL = ShellExecute(Scr_hDC, "Open", URL, vbNullString, "C:\", SW_SHOWNORMAL) End Function Private Sub Form_Load() Label1.Caption = "点击这里访问我的网站" End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If Label1.FontUnderline = True Then Label1.FontUnderline = False End SubPrivate Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label1.FontUnderline = True End SubPrivate Sub Label1_Click() StartURL ("http://sand.yeu-cfans.org") End Sub 2.使用Animation Gif Control (ANIGIF.OCX)这个控件就可以了。
打开outlook发送电子邮件: 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, "open", "mailto:" & "[email protected]", vbNullString, vbNullString, 5
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Const SW_SHOWNORMAL = 1Public Function StartURL(URL As String) As Long
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
StartURL = ShellExecute(Scr_hDC, "Open", URL, vbNullString, "C:\", SW_SHOWNORMAL)
End Function
Private Sub Form_Load()
Label1.Caption = "点击这里访问我的网站"
End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Label1.FontUnderline = True Then Label1.FontUnderline = False
End SubPrivate Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.FontUnderline = True
End SubPrivate Sub Label1_Click()
StartURL ("http://sand.yeu-cfans.org")
End Sub
2.使用Animation Gif Control (ANIGIF.OCX)这个控件就可以了。
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, "open", "mailto:" & "[email protected]", vbNullString, vbNullString, 5