| |||||
| Dernière réponse | |
|---|---|
| Sujet : VB6 | |
| tegu | Pour récupérer le répertoire de Windows, utilise l'API "GetWindowsDirectory "
Pour l'utiliser fait comme suit. Dans un module: Public Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long Dans ton code: Dim retour, sData As String * 255 retour = GetWindowsDirectory(sData, Len(sData)) sData = Trim$(Left$(sData, InStr(sData, Chr(0)) - 1)) sData contient en retour un caractère chr(0) qu'il faut supprimer. A+ |
| Vue Rapide de la discussion |
|---|