Where is the "copytoscreen()" counterpart of "copyfromscreen()"
I want to highlight a rectangle on the screen by pixel manipulation.
It looks like copyfromscreen() gets me the original pixels but how do I put the altered pixels back on the screen
thanks

graphics.copyfromscreen
dj_develop
You can save the Rectangle to Memory Bitmap and then use SetPixel() method of Bitmap setting each pixel in its location then draw the whole image at its original location!
I hope this will Help!
Best Regards,
WishfulDoctor
I know how to do what I want using bitblt() and other api functions.
Yours is smaller though so I will give it a try.
thanks.
Tryin2Bgood
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
private static extern IntPtr CreateDC(string driver, string device, IntPtr res1, IntPtr res2);
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
private static extern bool DeleteDC(IntPtr hDc);
private void button1_Click(object sender, EventArgs e) {
Bitmap bmp = new Bitmap(100, 100);
Graphics grb = Graphics.FromImage(bmp);
grb.CopyFromScreen(0, 0, 0, 0, bmp.Size);
IntPtr hdc = CreateDC("DISPLAY", "DISPLAY", IntPtr.Zero, IntPtr.Zero);
Graphics grs = Graphics.FromHdc(hdc);
grs.DrawImage(bmp, 10, 10);
grs.Dispose();
grb.Dispose();
DeleteDC(hdc);
}