Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Word, PowerPoint, Outlook, and Other Office Products > from clipboard to image control??


Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2002, 09:42 AM
grashopper's Avatar
grashopper grashopper is offline
Junior Contributor
 
Join Date: May 2001
Location: Illinois
Posts: 376
Default from clipboard to image control??


Is there a way I can (in run-time) take what is on the clipboard and paste it into an image control?
__________________
Sometimes you feel like a nut....sometimes you are....
Reply With Quote
  #2  
Old 11-01-2002, 09:55 AM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer

Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,685
Default

Code:
Const CF_BITMAP As Long = 2 Form1.Picture = Clipboard.GetData(CF_BITMAP)
__________________
Quis custodiet ipsos custodues.
Reply With Quote
  #3  
Old 11-01-2002, 11:38 AM
grashopper's Avatar
grashopper grashopper is offline
Junior Contributor
 
Join Date: May 2001
Location: Illinois
Posts: 376
Default

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
__________________
Sometimes you feel like a nut....sometimes you are....
Reply With Quote
  #4  
Old 11-01-2002, 01:44 PM
grashopper's Avatar
grashopper grashopper is offline
Junior Contributor
 
Join Date: May 2001
Location: Illinois
Posts: 376
Default

ok, I'm guessing I might be missing a reference....but I can't figure out which reference the clipboard is in....any ideas?
__________________
Sometimes you feel like a nut....sometimes you are....
Reply With Quote
  #5  
Old 11-01-2002, 01:46 PM
grashopper's Avatar
grashopper grashopper is offline
Junior Contributor
 
Join Date: May 2001
Location: Illinois
Posts: 376
Default

Oh yeah, I'm on a Windows NT machine if that makes any difference
__________________
Sometimes you feel like a nut....sometimes you are....
Reply With Quote
  #6  
Old 11-01-2002, 04:55 PM
AndreRyan AndreRyan is offline
Contributor
 
Join Date: Jan 2002
Posts: 489
Default

You don't need to request a Bitmap because the Image Box supports other formats
Code:
Image1.Picture = ClipBoard.GetData
__________________
If you're a beginner or have little experience don't launch into something beyond your abilities, for example don't start game programming by trying to make a 3D first person shooter if you have no idea how to use DirectX and/or OpenGL or how to keep track of objects in a 2D plane let alone a 3D one.
Reply With Quote
  #7  
Old 11-04-2002, 10:08 AM
grashopper's Avatar
grashopper grashopper is offline
Junior Contributor
 
Join Date: May 2001
Location: Illinois
Posts: 376
Default

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?
__________________
Sometimes you feel like a nut....sometimes you are....
Reply With Quote
  #8  
Old 11-06-2002, 08:34 AM
grashopper's Avatar
grashopper grashopper is offline
Junior Contributor
 
Join Date: May 2001
Location: Illinois
Posts: 376
Default One last cry for help....

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
__________________
Sometimes you feel like a nut....sometimes you are....
Reply With Quote
  #9  
Old 11-06-2002, 10:12 AM
dexmix's Avatar
dexmix dexmix is offline
Contributor

* Expert *
 
Join Date: Oct 2002
Location: Arlington MA
Posts: 475
Default

VBA doesnt have the Clipboard object

You can use API to get data from the clipboard
__________________
Megan Down pipe . Megan resonated test pipe . stock Catback . Exedy Twin SD . 23psi . Jestr M1 Flash
12.6 @108.9 1.7 60' - NED 6/8

Last edited by dexmix; 11-06-2002 at 10:24 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->