Your code is nearly correct. However, you don't need the call to Application.HandleException - this is presumably what is still showing you the unwanted error message.
You don't need the call because by writing a try..except block, you are handling the exception yourself - in this case, by not doing anything. Simply, take that call out and you should be fine. HTH, Conor -----Original Message----- From: gajo [mailto:[EMAIL PROTECTED] I have to convert a string to integer. When a string is not correct, then the StrToInt procedure raises an exception, and the user gets an error message. I would like to prevent the error message from being displayed. How can I do that? I was trying the following with no results: try a := StrToInt(Text); except on EConvertError do begin Application.HandleException(Self); ShowMessage('The user did not get the message') end; end --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/