怎样屏蔽DELPHI5中的系统错误提示,而用自己的提示(50分)

M

meitc

Unregistered / Unconfirmed
GUEST, unregistred user!
我在DELHPI5中要屏蔽掉系统的出错提示,而使用自己的提示框!
 

Try
Except
....... //自己的出错提示语句
Abort; //记得把这句话写上
End;
 
但是DELPHI系统还会把数据库的提示错误在后面显示出来
 
系统在我的提示前出现提示错误框,还是没屏蔽掉
 
如果是对数据库操作,可以在onposterror中进行处理!
 
Application.OnException:=你的处理程序。
这样就OK了。
 
procedure my_Exception(Sender: TObject; E: Exception);
begin
ShowMessage(E.Message);
end;

Application.OnException :=my_Exception;
 
多人接受答案了。
 
顶部