WebBrowser Component and Copy/Paste

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?
bilgehanyildirimAsked:
Who is Participating?
 
shaneholmesConnect With a Mentor Commented:
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
 
shaneholmesCommented:

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
 
bilgehanyildirimAuthor Commented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
bilgehanyildirimAuthor Commented:
Thanx!
0
 
bilgehanyildirimAuthor Commented:
I tried what you said but i came up with an error

"Undeclared Identifier : ' OleInitialize'
"Undeclared Identifier : ' OleUnInitialize'
0
 
bilgehanyildirimAuthor Commented:
Solved.. Added Activex to the USES.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.