I am using the following code to draw a line (this will ultimately become a table):
This works fine as long as I call the sub from a click event, or a text change, etc. If I call it from a Form Load or Form Activate command, it won't draw the lines. I know the code is being executed because I put a MessageBox in there for testing, but the line just isn't being drawn. Any idea what's going on and how to fix it?Code:Private Sub DrawLines() Dim g As Graphics Dim PenColor As New Pen(Color.Black) Dim APoint As New Point(30, 350) Dim BPoint As New Point(500, 350) g = Me.CreateGraphics g.DrawLine(PenColor, APoint, BPoint) End Sub
Thanks in advance




Reply With Quote