Solved

How to copy from the Internet Explorer component?

Posted on 2004-04-28
5
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Magic Software info 18 143
tidtcpserver connection lost handle 2 110
FMX and jaudiotracker playing memory stream 29 98
Typecasting TBytes to Integer in Delphi XE8 2 35
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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