Solved

How to copy from the Internet Explorer component?

Posted on 2004-04-28
5
157 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
ID: 10943105
Try the embedded browser from

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

Shane
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10947079
WebBrowser1.ExecWB( OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT );
0
 

Author Comment

by:haab
ID: 11154594
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
ID: 11157955
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
ID: 11158967
Excellent solution! Thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Memory leak using records in a TVirtualStringTree 11 108
TVirtualStringTree  search using TEdit 7 103
Delphi XE10, MySQL Query 4 125
QRReport  TQrmemo vertical stretching 1 42
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

929 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