如何拦ACTIVEX控件的出错信息(100分)

L

liguang

Unregistered / Unconfirmed
GUEST, unregistred user!
请问如何拦ACTIVEX控件的出错信息。
 
好象只能用try ... except...end;
 
支持cytown的说法.
 
呵呵,怪呀。可以自己写错误处理程序,替换application.onexception
 
用try ... except...end,如果错误信息不能用前面的方法捕获,可惜如下代码实现


procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnException := AppException;

end;

procedure TForm1.AppException(Sender: TObject
E: Exception);

begin
showmessage('关键字不能重复');
abort;
end;

procedure AppException(Sender: TObject
E: Exception);
必须定义载创体类中

 
接受答案了.
 
顶部