The following code snippet dosen't work as I expected, which I think will show the message I wanted it to show without the debugger exception notification 'Process raised exception class EAccessViolation with message 'Access violation at address 0045D9E7 in module XXXX'', but the programme runs opposite as I thougt.Why is that?
procedure TForm1.btn1Click(Sender: TObject);
begin
try
(WebBrowser1.Document as IHTMLDOCUMENT2).execCommand('Refresh',false,0);
except
ShowMessage('caught!');
end;
end;