Hello guys, how to track the mouse click coordinate inside the form , save it to listbox or variable. Right now i am using checkbox method which already specify the coordinate. I attach the image to illustrate my program

To capture the mouse co-ordinates, try something like -

'In a module add the following code...
Private Type POINTAPI
      x       As Long
      y       As Long
End Type

'Private Declare Function M_GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long

Public Sub GetCursorPos(xX As Long, xY As Long)
Dim pt      As POINTAPI
Call M_GetCursorPos(pt)

xX = pt.x
xY = pt.y
End Sub

To draw a line with the mouse, you can use the click events of the mouse as in -

'Enter the following code in the Form_MouseDown ( ) procedure, Form_MouseMove ( ) procedure and cmdClear_Click ( ) procedures respectively.

Private Sub cmdClear_Click()
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
frmDraw.CurrentX = X
frmDraw.CurrentY = Y
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Line (frmDraw.CurrentX, frmDraw.CurrentY)-(X, Y)
End If
End Sub