查看: 4  |  回复: 0
  VB6 按钮打开Windows默认的浏览器网页,API ShellExecute
楼主
发表于 今天 15:48

新建From1(窗体),新建Command1(按钮CommandButton),代码:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpoperation As String, ByVal lpfile As String, ByVal lpparaments As String, ByVal lpdirectory As String, ByVal nshowcmd As Long) As Long

Private Sub Command1_Click()
    Call ShellExecute(0&, vbNullString, "http://manongku.com", vbNullString, vbNullString, 1)
End Sub


您需要登录后才可以回帖 登录 | 立即注册
【本版规则】请勿发表违反国家法律的内容,否则会被冻结账号和删贴。
用户名: 立即注册
密码:
2020-2025 MaNongKu.com