You can control which error messages Windows display by using the "SetErrorMode" Win API function as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~
var
wOldErrorMode : Word;
begin
{
tell windows to ignore critical
errors and save current error mode
}
wOldErrorMode :=
SetErrorMode(
SEM_FAILCRITICALERRORS ) ;
try
{
code that might generate a
critical error goes here...
}
finally
{
go back to previous error mode
}
SetErrorMode( wOldErrorMode ) ;
end;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» Converting from TFileTime to TDateTime
« How to calculate the date of Easter for a given year

