Microsoft VB技术
发布网友
发布时间:2022-05-30 17:27
我来回答
共1个回答
热心网友
时间:2023-10-22 07:14
首先在声明中粘贴如下的API声明:
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 Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
然后给给图像控件的Click事件中加入如下的代码即可:
Call ShellExecute(Me.hwnd, "open", "http://dggyx52.5d6d.com", vbNullString, vbNullString, SW_SHOWNORMAL)