G
Guest
Hello,
I have a form with a panel which contains a radiobutton. When I click the
radiobutton, I invoke the Paint event of the panel using me.Invalidate. The
paint event gets called and runs through code to draw a line. But the line
does not draw on the panel until I press either the Alt key or Tab key. Here
is my code:
Sub rad_Click(...)handles...
Me.Invalidate()
End Sub
Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
If rad.Checked.Equals(True) Then
Dim bPen As Pen
bPen = New Drawing.Pen(Color.Blue, 3)
e.Graphics.DrawLine(bPen, 0, 186, 446, 186)
End If
End Sub
How can I make the line draw when I check the radionbutton?
Thanks,
Rich
I have a form with a panel which contains a radiobutton. When I click the
radiobutton, I invoke the Paint event of the panel using me.Invalidate. The
paint event gets called and runs through code to draw a line. But the line
does not draw on the panel until I press either the Alt key or Tab key. Here
is my code:
Sub rad_Click(...)handles...
Me.Invalidate()
End Sub
Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
If rad.Checked.Equals(True) Then
Dim bPen As Pen
bPen = New Drawing.Pen(Color.Blue, 3)
e.Graphics.DrawLine(bPen, 0, 186, 446, 186)
End If
End Sub
How can I make the line draw when I check the radionbutton?
Thanks,
Rich