-
English:
My program starts an other application form a CD (because it's bigger than a 1,44 M disk).
But the users have different CD drive names. So I want that the text of a textbox is the letter of the CD-drive.
Is this possoble ;) (in VB3, but normally this doesn't matter.)????
Matt :)
Deutsch:
Mein Programm startet ein Unterprogramm, das aus Platzgründen auf einer CD-ROM ist. Doch haben die meisten Benutzer verschiedene Laufwerksbezeichnungen. Deshalb möchte ich, daß der Buchstabe des CD-Laufwerks in einem Textfeld erscheint.
Ist das möglich ? (VB3, aber normalerweise stört das nicht)
Matthias :)
-
hmm, i dont know much about VB3 but if you are able to use the API, try this....
Code:
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Sub Form_Load()
'Get information about the C:\
Select Case GetDriveType("C:\")
Case 2
Me.Print "Removable"
Case 3
Me.Print "Drive Fixed"
Case Is = 4
Me.Print "Remote"
Case Is = 5
Me.Print "Cd-Rom"
Case Is = 6
Me.Print "Ram disk"
Case Else
Me.Print "Unrecognized"
End Select
End Sub
near the top of the code it looks at the "C:" drive, simply cycle throught the alphabet until you get to a CD-Rom drive, and BINGO!
------------------
Wossname,
Email me: [email protected] :)