Solved

WebBrowser Component and Copy/Paste

Posted on 2004-04-25
6
326 Views
Last Modified: 2010-04-05
Hi there,

I've placed a WebBrowser component on my form and let's say an editbox as well. When I select a text from a page loaded on my WebBrowser component and copy the selected text, I cannot paste it in to the EditBox. Is there any way for that?
0
Comment
Question by:bilgehanyildirim
  • 4
  • 2
6 Comments
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10914328

I tried this, it works fine....

Right click on Browser, select copy to copy selected text to clipboard.
Right click on Edit , select paste to past selected text from clipboard to Edit Box

You maay need to do the folowing:

you could try adding the following lines to the bottom of your main unit

initialization
  OleInitialize(nil);

finalization
  OleUninitialize;


http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10551601.html?query=TWebbrowser+Selected&searchType=topic


Shane
0
 

Author Comment

by:bilgehanyildirim
ID: 10914340
I couldn't quite understand what you mean with "you could try adding the following lines to the bottom of your main unit". Coul you please make it a little bit clear?

Thanks in advance.
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 50 total points
ID: 10914824
This is a stripped doen version with out the form declaration

you should get the idea though...

SHane

unit UntMain;

interface

implementation

initialization
  OleInitialize(nil);

finalization
  OleUninitialize;

end.
0
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.

 

Author Comment

by:bilgehanyildirim
ID: 10915818
Thanx!
0
 

Author Comment

by:bilgehanyildirim
ID: 10917495
I tried what you said but i came up with an error

"Undeclared Identifier : ' OleInitialize'
"Undeclared Identifier : ' OleUnInitialize'
0
 

Author Comment

by:bilgehanyildirim
ID: 10917527
Solved.. Added Activex to the USES.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
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 video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

765 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