SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

photo Printing in Samll : DrawImage

Last post 08-06-2008 8:36 PM by ematrix. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-06-2008 8:36 PM

    photo Printing in Samll : DrawImage

    ok as I am involved as a programmer in SharpDevelop novice, I need help I'm writing a program to print photos on a scale of 90 high and width of 60 This code is below that I read an image of a database but the true picture is 800 X 600 as I do in this code in order to resize to 120 X 60 to print on a card.

    Code: private void imprime_imagen(object sender, PrintPageEventArgs e)

    {

    Point _lastPrintPosition = new Point(0,0);

    Graphics g = e.Graphics; Restangle sourceRect = new Rectangle(_lastPrintPositione.MarginBounds.Size);

    Rectangle destRect=e.MArginBounds; g.DrawImage(picturebox1.Image,destRect,sourceRect,GraphicsUnit.Pixel);

    }

    void Button1Click(object sender, EventArgs e)

    {

    PrintDocument PD = new PrintDocument();

    Pd.PrintPage += new PrintPageEventHandler (this.imprime_imagen);

    PD.Print();

    }

    Thanks Team SharpDevelop, success in your work

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.