i have a panel in a form and a button. iwant to write a program that when i push the button,a circle
be drawn in panel but problem is here. because the handler in button is eventArgs but the panel
can someone give me a suggestion for doing this.
thanks in advance.
Public Class Invalidate_Circle_On_Circle
Dim ShowCircle As Boolean
Private Sub MyPanel_Paint(sender As Object, e As PaintEventArgs) Handles MyPanel.Paint
If ShowCircle Then
e.Graphics.DrawEllipse(Pens.Black, New Rectangle(10, 10, 20, 20))
Private Sub MyButton_Click(sender As Object, e As EventArgs) Handles MyButton.Click
ShowCircle = True
Just try to insert this into your code.
Why is there a boolean there?
I put a boolean there because if I don't then the circle might appear on the panel when it is first drawn(on application startup).
If you have anymore questions just start a new post.