[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

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?
0
bilgehanyildirim
Asked:
bilgehanyildirim
  • 4
  • 2
1 Solution
 
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
 
shaneholmesCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now