0

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?

Victor
  • 13,914
  • 19
  • 78
  • 147

1 Answers1

5

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/

Marwen Trabelsi
  • 4,167
  • 8
  • 39
  • 80
  • don't you have a C# source for that kind of service, because I don't know VB and this is the first time when I have to create a service... – Victor Dec 29 '12 at 12:01
  • @Victor If you cannot read VB.NET then simply compile the code to MSIL and have [Reflector](http://www.reflector.net/) display it as C#. Seriously, though, if you know C# then you should be able to read VB.NET without difficulty. – IInspectable Dec 29 '12 at 12:33
  • I read it, but I am not as good in VB as in C#. I do not often program in VB – Victor Dec 29 '12 at 15:56