print picturebox image basic question

hello,

i am new to desktop app.

i am loading tiff images to picturebox one by one.what i want is to print the current picture(image) in picture box when the user clicks on the print button.

please help me out...

thnx



Answer this question

print picturebox image basic question

  • rocli

    Hi,
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim TmpPrntPicDoc As New System.Drawing.Printing.PrintDocument
    AddHandler TmpPrntPicDoc.PrintPage, AddressOf TmpPrntPicDoc_PrintPage
    Dim TempPPD As New System.Windows.Forms.PrintPreviewDialog
    TempPPD.Document = TmpPrntPicDoc
    TempPPD.ShowDialog()
    End Sub
    Private Sub TmpPrntPicDoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)
    e.Graphics.DrawImage(PictureBox1.Image, 0, 0)
    End Sub

    Sorry for using Visual Basic.


  • Leedrick_

    woops.can anyone transale this to me in C#... :-S
  • print picturebox image basic question