Software Development Network>> Visual C#>> Printing an image
thanks, greatfully received.Ed.
{
PrintDocument pd =
pd.PrintPage +=
_bmp = (Bitmap)Image.FromFile(Application.StartupPath + "\\test.jpg");
pd.Print();
}
e.Graphics.DrawImage(_bmp,0,0);
Printing an image
JSMARTIN
thanks, greatfully received.
Ed.
Randy R Jackson
private Bitmap _bmp; private void Form1_Load(object sender, System.EventArgs e)
{
PrintDocument pd =
new PrintDocument();pd.PrintPage +=
new PrintPageEventHandler(this.PrintImage);_bmp = (Bitmap)Image.FromFile(Application.StartupPath + "\\test.jpg");
pd.Print();
}
private void PrintImage(Object sender, PrintPageEventArgs e){
e.Graphics.DrawImage(_bmp,0,0);
}
edit: Oops, sorry, originally posted VB.NET code instead of C# :)