Solved

How to copy from the Internet Explorer component?

Posted on 2004-04-28
5
156 Views
Last Modified: 2010-05-18
On a Delphi form I have a TWebBrowser component, and it works well in many ways. But why doesn't it perform my JavaScript instructions for copying and retrieving to and from the clipboard? When displayed in the stand alone MS Internet Explorer it works, but not within my Delphi program. What can I do?
0
Comment
Question by:haab
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
Try the embedded browser from

http://www.euromind.com/iedelphi/index.htm

Shane
0
 
LVL 12

Expert Comment

by:Ivanov_G
Comment Utility
WebBrowser1.ExecWB( OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT );
0
 

Author Comment

by:haab
Comment Utility
The ExecWB method raises an exception class EOleException; "trying to cancel a drop destination which is not registered" - even though the RegisterAsDropTarget property is true. What should I do?
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 50 total points
Comment Utility
uses ActiveX;

procedure TForm1.Button2Click(Sender: TObject);
begin
  WebBrowser1.ExecWB(OLECMDID_COPY, OLECMDEXECOPT_PROMPTUSER);
end;

initialization
  OleInitialize(nil);

finalization
  OleUninitialize;

end.
0
 

Author Comment

by:haab
Comment Utility
Excellent solution! Thank you!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now