-
printscreen saved as a file
Is there of referencing the printscreen as an image object and saving it to a location?
To put it simply:
1) press printscreen
2) on Access form press a commandbutton
3) vba code saves contents of clipboard as image file to a location.
Is such a thing possible?
-Once my PC stopped working, so I kicked it......Then it started working again
-
While the link below will not directly answer your question it will give a general idea of how to use an ADODB.Stream with image objects. Once you can move a clipboard object to a Stream, saving it to a file or a DB field is trivial. Stan
http://visualbasic.ittoolbox.com/gro...irectly-134154
-
That code looks interesting, but the problem I am having is trying to find a way of getting the data from the clipboard, which I don't see any reference to on that page. Thanks for the link anyway though
I did find this code:
[VBA]SavePicture Clipboard.GetData, "c:\temp\MyCopiedPicture.bmp"[/VBA]
But Access doesn't like clipboard.getdata, "variable not defined."
Any ideas on what reference file I need to load?
-Once my PC stopped working, so I kicked it......Then it started working again
-
I think you have to link in GDI to get that functionality. There is a workaround, a bit clumsy but.
1. Save image to clipboard
2. Open up Excel, paste image into graph
3. Export Graph to a file
when I did this I would always set the visible property of Excel to False so the screen didn't get too busy. I am sure someone else on this board can direct you to specific code to accomplish this. Stan
-
I have found some code at the following site:
http://www.la-solutions.co.uk/conten...-Clipboard.htm
But have yet to get it to work. Keeps saying error type mismatch, cannot open the file '0'.
Any help?
-Once my PC stopped working, so I kicked it......Then it started working again
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