|
-
January 21st, 2000, 07:54 PM
#1
Dropping Images to a Picture Control
Does anyone know how to be able to drop an image from the clipboard onto an image control?
I would like to be able to allow someone to do press "print scrn" and have the image in the clipboard like usual, but then have a control on the form where they could Past it by either "shift Insert" (or Ctrl X or what the other option is) or by some other method to paste the clipboard image to the control.
Does anyone know if this is easily available?
Thank you very much
David Stephen
-
January 21st, 2000, 09:46 PM
#2
Re: Dropping Images to a Picture Control
Piece of cake
private Sub Form_KeyPress(KeyAscii as Integer)
If KeyAscii = 22 then 'Ctrl+V was pressed
If Clipboard.GetFormat(vbCFBitmap) then 'Make sure a bitmap is in the clipboard
Image1.Picture = Clipboard.GetData(vbCFDIB) 'Load the picture on to the image control
End If
End If
End Sub
private Sub Form_Load()
me.KeyPreview = true 'allow the form to view all key press events
Image1.Stretch = true 'I want the iamge to size into the image control
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|