Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitlePaste a picture into a RichTextBox
KeywordsRichTextBox, rich text, rtf, paste, picture
CategoriesControls
 
This program uses the Clipboard object to copy a picture to the clipboard. It then uses the SendMessage API function to send the RichTextBox a WM_PASTE message.
 
Private Sub Command1_Click()
    ' Copy the picture into the clipboard.
    Clipboard.Clear
    Clipboard.SetData Picture1.Picture

    ' Paste the picture into the RichTextBox.
    SendMessage RichTextBox1.hwnd, WM_PASTE, 0, 0
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated