|
|
Title | Paste a picture into a RichTextBox |
Keywords | RichTextBox, rich text, rtf, paste, picture |
Categories | Controls |
|
|
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
|
|
|
|
|
|