I have a WinForms application. It’s written to disk. I run the application from disk and eject the disk from CD. Then I take the exception: there is no disk in the drive. please insert a disk into drive. How can I catch this exception and correctly close my application?
Share
You should try to detect cd eject. Here is a working sample: publicjoe.f9.co.uk/csharp/snip/snip002.html
you can also check out this:
Detecting Eject/Insert of Removeable Media