nishds2
Sep 7th, 2002, 05:29 PM
I have this code to draw a string
Public Sub DrawStringPointF(e As PaintEventArgs)
' Create string to draw.
Dim drawString As [String] = "Sample Text"
' Create font and brush.
Dim drawFont As New Font("Arial", 16)
Dim drawBrush As New SolidBrush(Color.Black)
' Create point for upper-left corner of drawing.
Dim drawPoint As New PointF(150F, 150F)
' Draw string to screen.
e.Graphics.DrawString(drawString, drawFont, drawBrush, drawPoint)
End Sub
How do I then call this sub? If I use DrawStringPointF() I'm not sure what to put in the brackets
Public Sub DrawStringPointF(e As PaintEventArgs)
' Create string to draw.
Dim drawString As [String] = "Sample Text"
' Create font and brush.
Dim drawFont As New Font("Arial", 16)
Dim drawBrush As New SolidBrush(Color.Black)
' Create point for upper-left corner of drawing.
Dim drawPoint As New PointF(150F, 150F)
' Draw string to screen.
e.Graphics.DrawString(drawString, drawFont, drawBrush, drawPoint)
End Sub
How do I then call this sub? If I use DrawStringPointF() I'm not sure what to put in the brackets