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:
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) X.label1(Xpos, YPos) End If End Sub
From my class X, I would like create a circle in picturebox1 in form:
VB Code:
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
I know this is not a correct way as I got some errors. Please give me some guidances.




Reply With Quote