Hi All
I am trying to write a procedure to stop a file downloading from a WebBrowser.
I am clearly doing something wrong !!
I have declared the class:-
Type
{TStopFileDownloads}
TStopFileDownloads = Class(TEVSWebBrowser)
Public
Class Procedure Stop_Downloads(Sender:TObject; ActiveDocument: WordBool; Var cancelDownload :WordBool);
end;
I have Declared the type:-
Type TStopDownloads = Procedure (Sender:TObject; ActiveDocument: WordBool; Var CancelDownload :WordBool) of Object;Register;
Var Stop_Downloads : TStopDownloads;
I have started the method (but haven't got that far as the compiler throws out the calling event:-
Class Procedure TStopFileDownloads.Stop_Downloads(Sender: TObject;
ActiveDocument: WordBool; Var cancelDownload: WordBool);
begin
end;
Finally, here is the calling event:-
webbrowser2.OnFileDownload :=Stop_Downloads(WebBrowser2 as TObject,True,CancelDownload);
All I get is the error "Error: Incompatible types: got "untyped" expected "<procedure variable type of procedure(TObject,WordBool,var WordBool) of object;Register>"
.
Any help appreciated.....
Laurence