Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
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-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated