S
Sajjad
i have one application running remotly and want to take its window snapshort
at any given time,
Here is a code i wrote
public Bitmap GetPicture()
{
Bitmap sbmp = new Bitmap(1000, 1000);
Graphics g = Graphics.FromImage( sbmp );
System.Windows.Forms.PaintEventArgs pe = new PaintEventArgs(g, new
Rectangle(0, 0, 1000, 1000));
this.InvokePaint(this.picturebox, pe);
g.Dispose();
return sbmp;
}
problem with this code is that it works fine with picture box, but if i
specify this (current form) or any user control or IE webBrowser control i
dont get any thing back its just blank.
requirment is that it should be able to get snapshot even window is
minimized (or even hidden).
Thanks,
Sajjad
at any given time,
Here is a code i wrote
public Bitmap GetPicture()
{
Bitmap sbmp = new Bitmap(1000, 1000);
Graphics g = Graphics.FromImage( sbmp );
System.Windows.Forms.PaintEventArgs pe = new PaintEventArgs(g, new
Rectangle(0, 0, 1000, 1000));
this.InvokePaint(this.picturebox, pe);
g.Dispose();
return sbmp;
}
problem with this code is that it works fine with picture box, but if i
specify this (current form) or any user control or IE webBrowser control i
dont get any thing back its just blank.
requirment is that it should be able to get snapshot even window is
minimized (or even hidden).
Thanks,
Sajjad