Im trying to print (show in screen ) a screenshot on my main monitor , I think I’ve got all the necessary variables to make that happen but I have no clue how to get past “ PaintEventArgs” . What should I send, how should I do it?
EDIT: Here is what I want to do http://msdn.microsoft.com/en-us/library/8tda2c3c.aspx
static void Main(string[] args)
{
Rectangle rect = Screen.PrimaryScreen.Bounds;
int color = Screen.PrimaryScreen.BitsPerPixel;
PixelFormat pf;
pf = PixelFormat.Format32bppArgb;
Bitmap BM= new Bitmap(rect.Width, rect.Height, pf);
Graphics g = Graphics.FromImage(BM);
g.CopyFromScreen(rect.Left, rect.Top, 0, 0, rect.Size);
Bitmap bitamp = new Bitmap(BM);
print (bmp,) // what now?
}
private static void print(Bitmap BM, PaintEventArgs e)
{
Graphics graphicsObj = e.Graphics; // or "Bitmap bitmap = new Bitmap("Grapes.jpg");"
graphicsObj.DrawImage(BM, 60 ,10); // or "e.Graphics.DrawImage(bitmap, 60, 10);"
graphicsObj.Dispose();
}
PS: this is my first time using the site so excuse any noobish mistakes I might have made