cs_Booster
Messages postés235Date d'inscriptionmercredi 30 octobre 2002StatutMembreDernière intervention 6 octobre 2009
-
7 déc. 2002 à 21:26
TheSaib
Messages postés2367Date d'inscriptionmardi 17 avril 2001StatutMembreDernière intervention26 décembre 2007
-
8 déc. 2002 à 01:27
Slt je voudrais ne pas ordonner un disque dur a mon programe je voudrais que mon programme cherche automatiquement le disque dur ou ce trouve windows
par exemple : au lieu de lui dire copie le fichier dans c:\windows\fichiercopier.txt ( car si windows n'est pas dans c: ben erreur :sad) )
je lui dise : qq chose\fichierciopier.txt
TheSaib
Messages postés2367Date d'inscriptionmardi 17 avril 2001StatutMembreDernière intervention26 décembre 200723 8 déc. 2002 à 01:27
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
------------------
Function WindowsDir() As String
Dim x As Long
Dim strPath As String
strPath = Space$(1024)
x = GetWindowsDirectory(strPath, Len(strPath))
strPath = Left$(strPath, x)
If Right$(strPath, 1) <> "" Then strPath = strPath & ""
WindowsDir = strPath
End Function