G
Guest
For the following document print handler I would like to enable changing the
font with some external event. The font dialog returns a font, but I don't
understand how to equate that return with "myfont".. All my documentation
concerns the fontproperty of a control. But my printdocument has no font
property.
Dim myfont As New Font("Arial", 10)
Private Sub PrintDocument2_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles _
PrintDocument2.PrintPage
e.Graphics.DrawString("string",myfont, Brushes.Black, x , y)
End Sub
How is this done?
font with some external event. The font dialog returns a font, but I don't
understand how to equate that return with "myfont".. All my documentation
concerns the fontproperty of a control. But my printdocument has no font
property.
Dim myfont As New Font("Arial", 10)
Private Sub PrintDocument2_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles _
PrintDocument2.PrintPage
e.Graphics.DrawString("string",myfont, Brushes.Black, x , y)
End Sub
How is this done?