bilgehanyildirim
asked on
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?
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?
ASKER
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.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanx!
ASKER
I tried what you said but i came up with an error
"Undeclared Identifier : ' OleInitialize'
"Undeclared Identifier : ' OleUnInitialize'
"Undeclared Identifier : ' OleInitialize'
"Undeclared Identifier : ' OleUnInitialize'
ASKER
Solved.. Added Activex to the USES.
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;
https://www.experts-exchange.com/questions/10551601/copy-doesn't-work-in-TWebbrowser.html?query=TWebbrowser+Selected&searchType=topic
Shane