Re:Drive combo box problem
Ivan Azic wrote
Quote
> Can somebody tell me how to handle the following error with drive
> combo box: When the user selects for example drive A:, and there is
> nothing in the drive, program prompts an message box with I/O error.
> Is there possiblity to display a messagebox saying drive A is
> inaccesible, RETRY, CANEL ?
> I can't do that because th OnChange event of the drive combo box
> happens after it tries to access the drive.
> Hope somebody can help me, Please a-mail me on ivan.a...@zd.tel.hr if
> you can.
> Thanks.
> Ivan Azic
> ivan.a...@zd.tel.hr
A solution is to disable critical I/O Errors being displayed and handle the
error yourself.
To disable critical I/O Errors use the following code:
var ErrorMode : word
{ Get the current ErrorMode to restore it afterwards }
ErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS);
{ Put your own code here }
{ Reset ErrorMode to its original value }
SetErrorMode(ErrorMode);
Sander Carmiggelt
carmi...@xs4all.nl