Iain Macmillan Guest
|
Posted: Tue May 15, 2007 8:13 am Post subject: How to make a TWebbrowser do something useful |
|
|
I have instantiated a TWebBrowser and can load an HTML file into it.. it
shows up. From the UI I can select all, etc using the context menu
If I call this:
var olevar:TOleVariant;
begin
olevar:=NULL;
WebBrowser1.ExecWB(OLECMDID_SELECTALL,
OLECMDEXCEPTOPT_DODEFAULT,
olevar,olevar);
end;
- it raises oleexception "Trying to revoke a drop target that has not been
registered"
- What??? I didn't ask it to do anything about drop targets, I really don't
care if it is a drop target or not!
It makes no difference if I add
WebBrowser1.RegisterAsDropTarget:= FALSE;
.. or TRUE.. or set registerasbrowser false, or true..
I haven't the faintest idea why it won't work, or what to do about it.
<sigh> I hate interfaces, and com, and all this "say the magic words or I
won't work but I'm not telling you what they are" type of programming. :(
Anybody know what I have to do?
(TIA) |
|