BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to make a TWebbrowser do something useful

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Iain Macmillan
Guest





PostPosted: Tue May 15, 2007 8:13 am    Post subject: How to make a TWebbrowser do something useful Reply with quote



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)
Back to top
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group
.