Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can this be done?

Status
Not open for further replies.

butkus

MIS
Sep 4, 2001
114
US
Can a VB Script invoke a "screen print" and open it in Microsoft Photo Editor as a JPG image?

I'm not a programmer so I truly have no idea! Any assistance would be greatly appreciated.

James
 
Thought of something else. The vbs would need to be invoked via key strokes so as not to add unwanted elements to the screen capture.

James
 
Pardon my ignorance, but I don't have a clue what to do with that code. Can you point me to a reference perhaps.

Thanks
James
 
Screen and/or window capturing has been covered a fair number of times in this forum. Just do a keyword search here.

Most of the solutions (including my own) tend to save the results as a BMP rather than a JPG, as that is all that the SavePicture knows how to do. However, there are JPG libraries available, at least one of which I've recommended in the past.

It is worth knowing, however, that VB can save JPG files, if you use GDI+ rather than GDI. I've mentioned this before, although without code examples.
 

There are numerous ways to do the screengrab thing, as strongm has suggested and has demonstrated.

There is something that i used long back, called DIjpg.dll, which you can reference in your project, and use its methods to convert bmp files to jpg. Search for downloads of DIJpg.dll in google.

You need to register the DLL using regsvr32 while deployment and prior to development.

Just for an extended information on strongm's comment, GDI+ can convert from and to a wide array of file formats. GREAT STUFF!
 
>GDI+ can convert from and to a wide array of file formats

It sure can. GDI+ is a great step forward for GDI - but it can be a real pain to use from VB (sadly)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top