Maaatt Posted January 15, 2005 Posted January 15, 2005 ' Setting clipboard data to textbox TextBox2.Text = Clipboard.GetDataObject.GetData(DataFormats.Text) is the code i use to paste the text from the clipboard into TextBox2 but now im wondering how i would go about pasting the text whereever the mouse has focus. Can anybody help? If you could link me to good sources or possibly do this for me i'd be very appreciative. Thanks in advance. Quote
IngisKahn Posted January 15, 2005 Posted January 15, 2005 The spot where the text cursor is is TextBox2.SelectionStart. Then set TextBox2.SelectedText to your string. Quote "Who is John Galt?"
kanak Posted January 16, 2005 Posted January 16, 2005 hey thats the code which was used in vb6 .. in vb.net there is inbulti support of copyin and pasting the data.... what all u have to do is suppose u have richtextbox1 in which u have some text richtextbox1.cut richtextbox2.copy richtextbox1.paste Quote
IngisKahn Posted January 16, 2005 Posted January 16, 2005 Ya, that works :p I'm used to doing more low level stuff. Quote "Who is John Galt?"
Maaatt Posted January 20, 2005 Author Posted January 20, 2005 Ok so what if i wanted to further this and have it paste whereever the cursor is, say notepad or IE or word etc. rahter than into a specific textbox? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.