Re: Code needs to be alerted that a removable disk drive's state
- From: Dennis <Dennis@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Apr 2005 19:01:02 -0700
You can just start a thread the checks the drive status periodically then
raises an event to notify your main thread or set the status appropriately.
I don't think there is an event raised when a disk is removed or inserted.
"Just Me" wrote:
> I wonder if I wasn't clear as to what I need.
> Think of Windows Explorer like app showing
> 31/2 Floppy (A:) {Not Ready}
>
> If the floppy "ready" state changes I need to be notified so that the
> display can be changed.
>
> I could, for example, have a timer tick event periodically check the drive
> but hope that is not the only way to do it.
>
> Thanks
>
>
> "Dennis" <Dennis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:A9AD035C-F59E-406C-9A83-BE94707E6A1E@xxxxxxxxxxxxxxxx
> > There is probably something that does this directly but I would consider
> > putting any reads/writes to any drive inside a try/catch/finally loop. If
> > the file can't be written/read, an exception will be thrown that contains
> > the
> > reason why (e.message).
> >
> > "Just Me" wrote:
> >
> >> I check to see if the Floppy drive is ready and display it's state.
> >>
> >> But if the user inserts or removes a floppy disk I need an event or
> >> Windproof
> >> message to cause the code to display the new state.
> >>
> >> Is the some way the code can be alerted to the fact that a removable disk
> >> drive's state changed?
> >>
> >>
> >>
> >> Thanks
> >>
> >>
> >>
> >>
>
>
>
.
- References:
- Prev by Date: Re: Code needs to be alerted that a removable disk drive's state chan
- Next by Date: Re: How is this conditional able to execute?
- Previous by thread: Re: Code needs to be alerted that a removable disk drive's state chan
- Next by thread: Check is coputer online/live
- Index(es):
Relevant Pages
|