code for right click(mouse) then copy
hi, what is the code of right click (mouse) then copy..
example i have a Textbox the textbox contains word.. like for example
TextBox: vbforums
and i have a button COPY if press COPY then ill go to any textbox, i will right click (mouse) then u will see the paste button if i press the paste button i want the vbforums to display...
thanks
Re: code for right click(mouse) then copy
You don't have to code that - each textbox by default has context menu (it pops up when right mouse button is pressed) with buttons you need. ;)
Re: code for right click(mouse) then copy
what you would do is
VB Code:
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
'make a menu in the menu editor and call it here and make the menu not visible
End If
End Sub
Or that too..
Re: code for right click(mouse) then copy
Use the Clipboard object and set the desired text in the Command Button's Click event.
VB Code:
Private Sub cmdCopy_Click()
Clipboard.Clear
Clipboard.SetText Text1.Text, vbCFText
End Sub