Hi,
I have a class X and I would like create an instance of class X from Form1 according to the mousebutton click and location of the click
From my class X, I would like create a circle in PictureBox1 in Form1:
I know this is not a correct way as I got some errors. Please give me some guidances.
I have a class X and I would like create an instance of class X from Form1 according to the mousebutton click and location of the click
VB.NET:
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
Dim i As Integer
Dim Xpos, YPos As Single
Xpos = e.X
YPos = e.Y
If MouseButtons.Left Then
i = i + 1
X.node(Xpos, YPos)
End If
End Sub
VB.NET:
Public Class X
Dim X, Y As Single
Public Property node() As Single
Get
PictureBox1.Circle(Xpos, Ypos)
End Get
Set(ByVal Value As Single)
X = Value
Y = Value
End Set
End Property