Bonjour a tous.
j'ai besoin de savoir si au moment de l'execution mon appli se lance
depuis le Dusque dur ou un CD.
est ce que le code suivant rend une reponce corecte :
ImgPath = Application.StartupPath
If GetDriveType(ImgPath & Chr(0)) <> _
Drives.DRIVE_CDROM Then..........
je ne connais pas la méthode GetDriveType, mais systelm.io tu as driveinfo qui est très partique
exemeple pour tester si tu as affaire à un lecteur de CD
Dim d As New System.IO.DriveInfo(Application.StartupPath.Substring(0, 1))
If (d.DriveType = IO.DriveType.CDRom) Then '... End If
-- Jérémy JEANSON MCP http://jeremy.blogdns.net
Dan
Ok je vais tester ca merci beaucoup "Jérémy Jeanson" a écrit dans le message de news:%
je ne connais pas la méthode GetDriveType, mais systelm.io tu as driveinfo qui est très partique
exemeple pour tester si tu as affaire à un lecteur de CD
Dim d As New System.IO.DriveInfo(Application.StartupPath.Substring(0, 1))
If (d.DriveType = IO.DriveType.CDRom) Then '... End If
-- Jérémy JEANSON MCP http://jeremy.blogdns.net
Ok je vais tester ca
merci beaucoup
"Jérémy Jeanson" <jeremy.jeanson@free.fr> a écrit dans le message de
news:%23Dt0fngTJHA.588@TK2MSFTNGP06.phx.gbl...
je ne connais pas la méthode GetDriveType, mais systelm.io tu as driveinfo
qui est très partique
exemeple pour tester si tu as affaire à un lecteur de CD
Dim d As New System.IO.DriveInfo(Application.StartupPath.Substring(0, 1))
If (d.DriveType = IO.DriveType.CDRom) Then
'...
End If