Introduction

Screen Snaper is an simple application for Screen capture and snapshot. The application use exported function from library SnaperHelper.dll compatible with VC, VB, Delphi and other languages that can use DLL.

Snapshot features

Get Desktop window

Get Window on the Desktop

Get Region of the desktop

Trap Print Screen key

In Window and Region capture mode, an helper show the zoomed position under the cursor and the current color. These modes also include keys shortcut and pop menu to permit switch between mode and much more...

About demo

This demo application include source code for clients in VC and VB. The source code of library SnaperHelper.dll is not provided.

History

8 december 2002 - Demo project updated. Now include missing SnaperHelper.lib and SnaperHelperLib.h.

NOTE: there is also a bug with the tracking window that displays the zoom and mouse coordinates. sometimes it will refuse to repaint itself when certain types of windows were open when calling the getregionimage or getwindowimage. id like to be able to fully disable the tracking window.

If I have a machine with no sessions, but jobs are running, will your program be able to capture the screen shot .I want to manage remote machines, which send a screen shot of their screens every 15 seconds. That I can find out if any error message has popped up on any of the machines.

Please help , I would desperately appreciate it if you could send methe source code for screencapture.dll , I am currently creating an application that requires the image from the desktop to be stored in a file.

The tears shed in vainand the hatred and painwill be nothing but dustat the end of the day

hy, Everybody,Can it posible that capturing image of any application windowwithout displying it.I mean that application is running in backgroud that mean it`s window is hide,Now can i capture that window which is hide? if yes then how?

I was wondering what would be the best way to send a form to the printer. I have a form the user fills in. Once they are done it needs to be printed. Is there a way to do a screen capture to a bitmap? Maybe I can then print the bitmap.

Is it possible to fix the width while capturing? (something like region capturing, just that the mouse's width will be fixed after once clicking to make the square for capturing area)I tried to add couple of functions but the DLL somehow seemed to do everythingso I couldn't get my hands into it

I have seen some anomalies in your code, if we run the multiple instances of this application then printscreen message dose not goto your application. Instead it goes to system directly. I figure out that you are registering your own windows message "UWM_PRINTSCREEN", thats why it fails for other instances (while registering message). Is there any work around to send printscreen message to application only, instead of system while the multiple instances of application are active.

hum - they want the source screen capture can be done using winAPI like this: call GetDC(0) to get the screen dc where all is painted;determine the rectangle size - by call to GetClientRect, with window handle from GetDesktopWindow(); CreateBitmap with the determined size; call BitBlt to copy to our bitmap from screen;finally use ReleaseDc to free allocated DC;sorry that i have no time to write it in C. DLL will be needed if you want to hook keyboard clicks.

HBITMAP hbm;
HDC screendc;
HDC imagedc;
int w;
int h;
int init(void)
{
screendc = GetDC(NULL);
imagedc = CreateCompatibleDC(screendc);
w = GetSystemMetrics(SM_CXSCREEN);
h = GetSystemMetrics(SM_CYSCREEN);
hbm = CreateCompatibleBitmap(imagedc,w,h);
ReleaseDC(NULL,screendc);
}
void CaptureSave(LPSTR szFname)
{
SelectObject(imagedc,hbm);
screendc = GetDC(NULL);
BitBlt(imagedc,0,0,w,h,screendc,0,0,SRCCOPY);
ReleaseDC(NULL,screendc);
ConvertSaveDIB(szFname,hbm);
}
void ConvertSaveDIB(LPSTR fn,HBITMAP bm)
{
//???
//I have no idea how to convert from DDB to DIB....
//I know how to save the file , but in C it's an altogether
//different problem to get it into the right format...
//I think I saw some code once to do this , but I forgot where...
//Sorry guys , I wish I could be of more help... but I'm stuck on this
//one as well....if anyone can help , it would be appreciated.
}

The tears shed in vainand the hatred and painwill be nothing but dustat the end of the day

Hi , I have a good way for you to get a hold of the screen.... : this method has worked for me without fail , for more than a year now , and Im still waiting to find a pc that won't be able to perform this function

To use it simply add the forward declaration (prototype) at the top of your file :int SnapShot(char* fname);

And then , when you want to use it , simply call it with a file name :

This is a joke. If you dont want to share the .dll source you should post your program under some other topic such as "PictureBox with Scrollbars". This site is for sharing source code. What exactly was you looking in here? Admiration? Bleh...

I couldn't help noticing that the icon provided in the screen-shot is very similar to the one Hyper-Snap[^] is using. Do you work for Hyper Ionics and are making public a dll without providing the source code? Just curios.