IE相关的API (转)

IE相关的API (转)[@more@]Public Const MAX_PATH = 260
Public Const CSIDL_FAVORITES = &H6

Public Declare Function LaunchInte.NETControlPanel Lib "inetcpl.cpl" (ByVal hwndParent As Long) As Long
Public Declare Function LaunchConnectionDialog Lib "inetcpl.cpl" (ByVal hwndParent As Long) As Long
Public Declare Function LaunchSecurityDialog Lib "inetcpl.cpl" (ByVal hwndParent As Long) As Long
Public Declare Function LaunchSiteCertDialog Lib "inetcpl.cpl" (ByVal hwndParent As Long) As Long
Public Declare Function OpenFontsDialog Lib "inetcpl.cpl" (ByVal hwndParent As Long) As Long
Public Declare Function DoOrganizeFavDlg Lib "shdocvw.dll" (ByVal hwndParent As Long, ByVal lpszPath As String) As Long
Public Declare Function SHGetSpecialFolderPath Lib "shell32.dll" Alias "SHGetSpecialFolderPathA" (ByVal hwndOwner As Long, ByVal lpszPath As String, ByVal nFolder As Long, ByVal fCreate As Long) As Long

'--------------------------------------------------

Private Sub Command1_Click()
  Dim rc As Long
  
  rc = LaunchInternetControlPanel(Me.hWnd)
  Debug.Print GetLastError
  If rc = 0 Then
    MsgBox "LaunchInternetControlPanel failed!", vbExclamation
  End If
End Sub

Private Sub Command2_Click()
  Dim rc As Long
  
  rc = LaunchConnectionDialog(Me.hWnd)
  Debug.Print GetLastError
  If rc = 0 Then
    MsgBox "LaunchConnectionDialog failed!", vbExclamation
  End If
End Sub

Private Sub Command3_Click()
  Dim rc As Long
  Dim strFavPath As String * MAX_PATH
  
  SHGetSpecialFolderPath Me.hWnd, strFavPath, CSIDL_FAVORITES, False
  rc = DoOrganizeFavDlg(Me.hWnd, strFavPath)
  Debug.Print GetLastError
  If rc = 0 Then
    MsgBox "DoOrganizeFavDlg failed!", vbExclamation
  End If
End Sub

Private Sub Command4_Click()
  Dim rc As Long
  
  rc = LaunchSiteCertDialog(Me.hWnd)
  Debug.Print GetLastError
  If rc = 0 Then
    MsgBox "LaunchSiteCertDialog failed!", vbExclamation
  End If
End Sub


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752043/viewspace-990723/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10752043/viewspace-990723/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值