Auto Copy and Paste

Atos
07-20-2003, 11:32 AM
Hi,
how do I code the clipboard paste function?

I want to paste whatever is in the clipboard into a rich text box when i click on the text box (give it focus)...i am having troubles using the example code generated by the wizard.

also, another part of this, how do i copy into clipboard, whatever text is selected?...i have a text box that when clicked on a word, selects the whole word...i would like to have it copied into clipboard automatically.

can you help?

thanx in advance.

Csharp
07-20-2003, 11:39 AM
Private Sub Command1_Click()
If InStr(Text1.Text, "testing") Then
Clipboard.SetText "testing", vbCFText
End If

Text2.Text = Clipboard.GetText
End Sub

something like that ?

Atos
07-20-2003, 11:42 AM
Yeah, thanx! I will try this out...

passel
07-20-2003, 11:47 AM
Private Sub Command1_Click()
If InStr(Text1.Text, "testing") Then
Clipboard.SetText "testing", vbCFText
End If

Text2.Text = Clipboard.GetText
End Sub

something like that ?

To put your selected text on the clipboard,

clipboard.SetText text1.SelText

Atos
07-20-2003, 11:57 AM
Awsome! Thanx guys...it works!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum