rengga_patria <[EMAIL PROTECTED]> wrote:
Hallo Om2 semua nya....
saya mo tanya ... ada gak yah cara ngedect USB (Flash
Disk) supaya bisa dianggap local drive atau sebagai
map drive di VB
Terima Kasih
Rengga H Patria
coba code ini
Private Declare Function GetLogicalDrives Lib "kernel32" () As Long
Private Sub GetLogicalDrive()
Dim arrDrive() As String
Dim LDs As Long
Dim Cnt As Long
Dim sDrives As String
LDs = GetLogicalDrives
For Cnt = 0 To 25
If (LDs And 2 ^ Cnt) <> 0 Then
sDrives = sDrives + Chr$(65 + Cnt) & ";"
End If
Next Cnt
arrDrive = Split(Left(sDrives, Len(sDrives) - 1), ";")
For Cnt = LBound(arrDrive) To UBound(arrDrive)
List1.AddItem "Drive : " & arrDrive(Cnt)
Next
End Sub
Private Sub Form_Load()
GetLogicalDrive
End Sub
---------------------------------
Do you Yahoo!?
With a free 1 GB, there's more in store with Yahoo! Mail.
[Non-text portions of this message have been removed]
Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED]
Ikuti juga forum diskusi VB.net dengan
mengirim email kosong ke [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/indoprog-vb/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/