Hi,
I have a form in C# 2010 with a size width 768 and height 1036. the developing pc's screen resolution is 1280x1024. When I load the form some part is out the screen. I use printDocument to print the form and I can print the full form regardless of what is displayed on the screen. But when I install the application in another pc with a resolution of 1440x900, the form loads and some part is out screen as in the development pc. But when I when the print form, it prints only the area displayed on the screen. Is there any workaround to solve this problem using resolution settings?
code
void PrintImage (object o, PrintPageEventArgs e)
{
int x = SystemInformation.WorkingArea.X;
int y = SystemInformation.WorkingArea.Y;
int width = this.Width;
int height = this.Height;
Rectangle bounds = new Rectangle (x, y, width, height);
Bitmap img = new Bitmap (width, height);
this.DrawToBitmap (img, bounds);
Point p = new Point (5, 0);
e.Graphics.DrawImage (img, p);
}
private void button1_Click_1 (object sender, EventArgs e)
{
button1.Hide ();
PrintDocument pd = new PrintDocument ();
pd.PrintPage += new PrintPageEventHandler (PrintImage);
pd.Print ();
button1.Visible=true;
}
Please help.
ayha
System.Windows.SystemParam
System.Windows.SystemParam