from clipboard to image control??

grashopper
11-01-2002, 09:42 AM
Is there a way I can (in run-time) take what is on the clipboard and paste it into an image control?

OnErr0r
11-01-2002, 09:55 AM
Const CF_BITMAP As Long = 2

Form1.Picture = Clipboard.GetData(CF_BITMAP)

grashopper
11-01-2002, 11:38 AM
hrm...it's not recognizing Clipboard...is it different in VBA? I thought it was just a general question otherwise I would have posted in the VBA Forum....Sorry

grashopper
11-01-2002, 01:44 PM
ok, I'm guessing I might be missing a reference....but I can't figure out which reference the clipboard is in....any ideas?

grashopper
11-01-2002, 01:46 PM
Oh yeah, I'm on a Windows NT machine if that makes any difference

AndreRyan
11-01-2002, 04:55 PM
You don't need to request a Bitmap because the Image Box supports other formats

Image1.Picture = ClipBoard.GetData

grashopper
11-04-2002, 10:08 AM
it's just not recognizing "ClipBoard", I'm getting that "Variable not defined" message when I compile....do I need to turn on a certain reference?

grashopper
11-06-2002, 08:34 AM
Ok...this is my story...I have an object on the screen that can be rotated with a userform by changing a property the object has called "RotationAngle". I want a way on the userform to display the rotation of the current object.

The problem is that once you click away from the object Rotation Angle get reset to 0. So since I can't tell from the Rotation Angle what position they have the object in I decided to Copy the object on the fly and then paste it on the form and go from there.

My problem is that VBA is not recognizing "Clipboard". So I haven't been able to retrieve anything from the Clipboard after i get it copied there.

I am working on Windows NT machines with Version 6 VBA

The error message I get is the "Variable not defined" error message.

Any Ideas? Thanks in advance.

Jessica

dexmix
11-06-2002, 10:12 AM
VBA doesnt have the Clipboard object

You can use API to get data from the clipboard

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum