Search code examples
c#windowswinformswinlogonprintscreen

Screen capturing in logon screen


I am trying to take a printscreen of Windows 7 Logon Screen (or Switch User screen) to use in my application.

I don't kow how to do that in fact. Could anyone help me?


Solution

  • You need to make a windows service so it can run even if the user isn't logged, take a look at this article and for more information read the MSDN..

    for the Screenshots:

    ScreenCapture sc = new ScreenCapture();
    // capture entire screen, and save it to a file
    Image img = sc.CaptureScreen();
    // display image in a Picture control named imageDisplay
    this.imageDisplay.Image = img; 
    // capture this window, and save it
    sc.CaptureWindowToFile(this.Handle,"C:\\temp2.gif",ImageFormat.Gif);
    

    source: http://www.developerfusion.com/code/4630/capture-a-screen-shot/