Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TWebBrowser cannot copy/paste ! 1

Status
Not open for further replies.

Rockafella

Programmer
Nov 4, 2002
4
ZA
Hi,

It seems that when using a TWebBrowser component to view
a web page, you cannot select any test on the web page to
copy and then paste elsewhere.

I'm using D6.1 and Win2000. IE6 installed.
Has anyone got any ideas why?
 
i think there is a way,

it is to do with the webbrowser1.execvb(somethinggoeshere);

if u have visual basic, put a web browser control on it, and just double click on the form, then type this in until the drop down menu pops up

webbrowser1.execvb(and something should comeup for cut_TEXT or somehting like that)

sorry i dont have code with me or vb rite now to check
 
I had a look in VB and
webbrowser1.execWB is the function.

But I dont understand why it is necesary to do this,
as the component should handle it.
It works correctly under VB: I add the Webbrowser component
to the form and then navigate it to say "I can the select text with the mouse and right click with the mouse and choose "COPY" from the drop down menu.
I can then paste the text into where ever.

I Delphi it all works the same until I choose to paste.
Then it appears that nothing was copied.

What seems to be the problem with Delphi?
 
there is a way to do it, have a look in the visual basic source code websitess, and search for web browser code, and study it, then just change it do delphi, i no it works, cut copy and paste, cuz i made a web browser tool once, if ur still stuck, get bak to me, ill see wot i can do.
 
Hi Rockafella.

I also had the same problem. I just want to let you know that you solved my problem too..

Thanks a million
Michael
 
no no no thats not the proper way, look, tonite ill do it, tomorow or the day after ill post the righty code, this is NOT finished yet, wait for me ok, ill get the right method, ive never used that method ever in my life, ok ill get the solutions tonite or tomoro,
 
hehe.. :eek:)

Ok AbbasAkhtar. I have faith in you. I hope you have something cool.

Thanks a million
Michael
 
YES YES NOW I HAVE THE ANSWER, it was sendkeys i used and it worked great, all it did was something like this

webbrowser1.setfocus;

umm, then i forgot the sendkeys code, o well, i no it was sendkeys to do most of the cut copy paste etc. features for the web browser, it was quick and easy.

the methods above work well too, but i lost my delphi source code,

neway, i hope this answers all ur questions lol, sorry if i am late, i have been workin on a major project. well, cv ya all latear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top