Solved

How to copy from the Internet Explorer component?

Posted on 2004-04-28
5
164 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 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