Hi , i'm research about VNC , at source code of NVNC ( C# ), I see it use CopyFromScreen function :
public static Bitmap CreateScreenCapture(Rectangle r)
{
try
{
int width = r.Width;
int height = r.Height;
Bitmap bitmap = new Bitmap(width, height);
Graphics g = Graphics.FromImage(bitmap);
g.CopyFromScreen(r.X, r.Y, 0, 0, new Size(width, height));
return bitmap;
}
catch (Exception)
{
System.Threading.Thread.Sleep(500);
try
{
int width = r.Width;
int height = r.Height;
Bitmap bitmap = new Bitmap(width, height);
Graphics g = Graphics.FromImage(bitmap);
g.CopyFromScreen(r.X, r.Y, 0, 0, new Size(width, height));
}
catch (Exception)
{
return null;
}
return null;
}
}
Then how can it capture LOG ON WINDOW and send to clients ( what i know is window service can't capture Image at LOG ON )
I read some articles , know about some way to take screenshot :
+ Using GDI
+ Using DirectX ( I have try slimX and it's not working )
+ Using Mirror Driver ( no project examle , wonder if it can take image at window service )
+ Using Window Media ( no project examle , wonder if it can take image at window service )
.....
I hope everybody help me , thank you very much