Public const Max_path = 260
Public const csidl_favorites = & h6
Public Declare Function LaunchInternetControlPanel 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 submmand1_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 submmand2_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 SubPrivate 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