uses Forms;procedure TForm1.OnCreate(); begin Application.OnException:=YourOwnExceptionFunction; end;procedure TForm1.YourOwnExceptionFunction(...); var Message:String; begin Message:=Exception.Message; if Message='recordindex out of range' then begin Message:='chinese message'; end; MessageBox(Handle,PChar(Message),PChar(Application.Title),MB_ICONERROR); end;大致就是这样吧。
具体点
我没用过,应当加在那个单元?
如果处理啊?
给点简单的代码好吗
Forms;procedure TForm1.OnCreate();
begin
Application.OnException:=YourOwnExceptionFunction;
end;procedure TForm1.YourOwnExceptionFunction(...);
var
Message:String;
begin
Message:=Exception.Message;
if Message='recordindex out of range' then begin
Message:='chinese message';
end;
MessageBox(Handle,PChar(Message),PChar(Application.Title),MB_ICONERROR);
end;大致就是这样吧。