CodeItBetter Programming Another VB Programming Blog

How to copy/cut the content of the text box to the clipboard

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
'Coding Basics - How to copy/cut the content of the text box to the clipboard
Sub cmdCopy_Click()
    Clipboard.SetText Text1.SelText 'Copies only selected text
    'Clipboard.SetText Text1.Text 'Copies whole TextBox content
End Sub
 
Private Sub cmdCut_Click()
    Clipboard.SetText Text1.SelText
    Text1.SelText = ""
End Sub

Related posts:

  1. This subroutine processes the cut, copy and paste commands.
  2. How to set text into Clipboard
  3. How to get text from Clipboard
  4. How to select the content of text box when entering into it.
  5. How to enable or disable the Cut, Copy and Paste menus in Edit menu if the text selected or not in a control.
  6. How to enable/disable submenus of Edit menu (Copy, Cut, Clear, Undo, and so on) based on text selection
  7. How to check whether the format of text in Clipboard is RTF format.
  8. How to Paste the Picture from PictureBox/Clipboard to Rich Text Box
  9. How to Copy List Box Content To Another List Box\Combo Box
  10. How to clear all text from Clipboard

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.