Make your own free website on Tripod.com

Copy And Paste Picture Using The Clipboard

'Add 2 CommandButton and 2 PictureBoxes To Your Form.
'Assign picture to the first PictureBox (that named Picture1).
'When you press the first button, the picture of the first PictureBox will be copied to the clipboard.
'(You will be able to paste the Picture to Window's paint program by choosing Edit->Paste.
'When you press the second button, the Picture you copied to the clipboard will be pasted to the
'second PictureBox
'Insert the following code to your form:

Private Sub Command1_Click()
Clipboard.Clear
Clipboard.SetData Picture1.Picture
End Sub

Private Sub Command2_Click()
Picture2.Picture = Clipboard.GetData
End Sub

Go Back