发布网友 发布时间:2022-05-07 08:06
共4个回答
热心网友 时间:2023-10-21 21:57
'API函数定义热心网友 时间:2023-10-21 21:57
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 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
这是一个API ,ShellExecute 自己百度一下。
Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub
自己写的函数过程,可以省略。
Private Sub Command1_Click()
OpenUrl Text1.Text 也可以是 ShellExecute Me.hwnd, "Open", 网址, 0, 0, 0
End Sub
调用过程。
热心网友 时间:2023-10-21 21:58
从引用对话框中引用该项目: Microsoft Internet Controls热心网友 时间:2023-10-21 21:57
'API函数定义热心网友 时间:2023-10-21 21:57
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 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
这是一个API ,ShellExecute 自己百度一下。
Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub
自己写的函数过程,可以省略。
Private Sub Command1_Click()
OpenUrl Text1.Text 也可以是 ShellExecute Me.hwnd, "Open", 网址, 0, 0, 0
End Sub
调用过程。
热心网友 时间:2023-10-21 21:58
从引用对话框中引用该项目: Microsoft Internet Controls热心网友 时间:2023-10-21 21:58
Private Sub Command1_Click()热心网友 时间:2023-10-21 21:58
Private Sub Command1_Click()热心网友 时间:2023-10-21 21:57
'API函数定义热心网友 时间:2023-10-21 21:57
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 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
这是一个API ,ShellExecute 自己百度一下。
Private Sub OpenUrl(tUrl As String) 'url函数
ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub
自己写的函数过程,可以省略。
Private Sub Command1_Click()
OpenUrl Text1.Text 也可以是 ShellExecute Me.hwnd, "Open", 网址, 0, 0, 0
End Sub
调用过程。
热心网友 时间:2023-10-21 21:58
从引用对话框中引用该项目: Microsoft Internet Controls热心网友 时间:2023-10-21 21:58
Private Sub Command1_Click()