Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking the A: drive
Message
From
09/09/1996 12:07:25
 
 
To
09/09/1996 11:27:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00007467
Message ID:
00007470
Views:
33
>How can I check to see if a disk has been inserted into the A: drive before I receive a system message?
>
>Thanks,
>Don Pollock

Try this:

Function Test()
Local lnError

* Initialize the flag
lnError = 0

* Trap the errors
ON ERROR DO ErrHand With ERROR(), @lnError

* Try to open an unexistent file just to trap errors
= FOpen("A:\XPTO.TXT")

If lnError != 0 && No errors, keep on working
...
EndIf

* The error handler follows...
Return
Alexandre Nobre
Alpha Bytes Computer Corp.

Did you know that there are innocent people dying in East Timor?
It helps if you do...

I suppose you don't need glasses if you're able to read this line

Previous
Reply
Map
View

Click here to load this message in the networking platform