Private Declare Function SHGetSpecialFolderPath Lib "shell32.dll" Alias "SHGetSpecialFolderPathA" ( ByVal hwnd As Long, ByVal pszPath As String, ByVal csidl As Long, ByVal fCreate As Long) As Long
Private Sub Form_Load() Dim Chemin As String, Réponse As Long Chemin = Space$(300) Réponse = SHGetSpecialFolderPath(Me.hwnd, Chemin, 5, 0) If (Réponse <> 0) Then Chemin = Left$(Chemin, InStr(Chemin, vbNullChar) - 1) Drive1.Drive = "C:" Dir1.Path = Chemin End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question