Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 17974
Number of posts: 55343

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Drive List Posted by sad.boy on 23 Feb 2006 at 11:59 AM
i made program with "Drive List" but when i run it the user can easily
choose say floppy drive and it causes error "Device Unavailable" if no disketts are in the drive or no disks in the cd-rom
i want to know 2 things
1.how to remove for example floppy drive from the drive list!
2.let's not remove it ,how can i make a error myself ,if device is not
available and after the error we are back to proram not letting to quit ;)

thanks :)
Report
Re: Drive List Posted by sj_h1 on 25 Feb 2006 at 4:12 PM
: i made program with "Drive List" but when i run it the user can easily
: choose say floppy drive and it causes error "Device Unavailable" if no disketts are in the drive or no disks in the cd-rom
: i want to know 2 things
: 1.how to remove for example floppy drive from the drive list!
: 2.let's not remove it ,how can i make a error myself ,if device is not
: available and after the error we are back to proram not letting to quit ;)
:
: thanks :)
:

Use the "ON ERROR" statement
for example

On Error goto NoDiskError

... more code here

NoDiskError:
MyDiskErrorform.show




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.