dear fellas,
im trying to create print button. im using this code as below, but i got 2 error which is
Bmp overload resolution because no accesible 'New' can be called with these arguments.
and DrawToBitMap is not a member of System.Web.UI.WebControls.Button
Private Sub PrintButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PrintButton.Click
PrntDoc.Print()
End Sub
Private Sub PrntDoc_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs) Handles PrntDoc.PrintPage
Using Bmp As New Bitmap(PrintButton.Width, PrintButton.Height)
PrintButton.DrawToBitmap(Bmp, New Rectangle(Point.Empty, Bmp.Size))
e.Graphics.DrawImage(Bmp, 100, 100)
End Using
End Sub