Diskette in A: drive?

P

Phil Hellmuth

Can I programmatically determine if there's a diskette in the A: drive?
Thanks in advance.
 
K

kimiraikkonen

Can I programmatically determine if there's a diskette in the A: drive?
  Thanks in advance.

Hi Phil,
As i don't have a floppy drive right now, however you can try to use
DriveInfo type using with its IsReady property as follows:

'---------------------------
Imports System.IO
Dim drive As New DriveInfo("a:")
If drive.IsReady = True Then
' Then floppy is ready
Else
' Floppy is not ready
End If
'--------------------------

Hope this helps,

Onur Güzel
 
P

Phil Hellmuth

Worked great. Thanks.
Hi Phil,
As i don't have a floppy drive right now, however you can try to use
DriveInfo type using with its IsReady property as follows:

'---------------------------
Imports System.IO
Dim drive As New DriveInfo("a:")
If drive.IsReady = True Then
' Then floppy is ready
Else
' Floppy is not ready
End If
'--------------------------

Hope this helps,

Onur Güzel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top