2 Replies - 123 Views - Last Post: 03 August 2012 - 08:45 AM Rate Topic: -----

#1 shafiq.chaudhry.cs  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 43
  • Joined: 10-December 10

Printing your drawing

Posted 03 August 2012 - 05:21 AM

Hi
Please guide me.
In a C# application form, I made few basic drawing shapes (ellipse, circle and rectangle) and now I want to print these shapes as A4 dimensional image. I searched through google and found a solution but that solution prints out whole form including its form borders, I just needed to print only my drawing area not whole the form. For this what I should use as container ? a panel or an image box to hold my drawing and later to just print this drawing area? please guide me in a better way, if a tutorial is there then it would be a great favor.. thanks for your efforts

Is This A Good Question/Topic? 0
  • +

Replies To: Printing your drawing

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 6478
  • View blog
  • Posts: 23,551
  • Joined: 12-June 08

Re: Printing your drawing

Posted 03 August 2012 - 07:10 AM

What's your code for printing now?
Was This Post Helpful? 0
  • +
  • -

#3 shafiq.chaudhry.cs  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 43
  • Joined: 10-December 10

Re: Printing your drawing

Posted 03 August 2012 - 08:45 AM

private void saveButton_Click(object sender, EventArgs e)
        {
            objDrawingSurface = new Bitmap(this.Width, this.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            rectBounds = new Rectangle(0, 0, this.Width, this.Height);
            this.DrawToBitmap(objDrawingSurface, rectBounds);
            saveFileDialog1.Filter = "JPG files (*.JPG | *.JPG";
            saveFileDialog1.FileName = questionId;
            if ((saveFileDialog1.ShowDialog() == DialogResult.OK))
            {
                objDrawingSurface.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
            }
        }

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1