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

VB Code:
  1. Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
  2.         Dim i As Integer
  3.         Dim Xpos, YPos As Single
  4.         Xpos = e.X
  5.         YPos = e.Y
  6.         If MouseButtons.Left Then
  7.             i = i + 1
  8.             X.node(Xpos, YPos)
  9.             X.label1(Xpos, YPos)
  10.        End If
  11.     End Sub

From my class X, I would like create a circle in picturebox1 in form:
VB Code:
  1. Public Class X
  2.     Dim X, Y As Single
  3.     Public Property node() As Single
  4.         Get
  5.             PictureBox1.Circle(Xpos, Ypos)
  6.         End Get
  7.         Set(ByVal Value As Single)
  8.             X = Value
  9.             Y = Value
  10.         End Set
  11.     End Property

I know this is not a correct way as I got some errors. Please give me some guidances.