Here's an easy way. Create a form, any size or background color. Then add the following:<br>
<br>
Private Sub Form_Load()<br>
NumXlines = 100 'draw 100 line horizontal & vertical<br>
NumYlines = 100<br>
Xinc = Width / NumXlines 'get the line spacing<br>
Yinc = Height / NumYlines<br>
For Xrep = 1 To NumXlines 'draw the vertical lines<br>
Line (X, 0)-(X, Height), 0 'substitute any color for 0<br>
X = X + Xinc<br>
Next<br>
For Yrep = 1 To NumYlines 'draw the horizontal lines<br>
Line (0, Y)-(Width, Y), 0 <br>
Y = Y + Yinc<br>
Next<br>
End Sub<br>
<br>
The MouseUp event draws your graph lines.<br>
Private Static Sub Form_MouseUp(Button As Integer, Shift As_<br>
Integer, X As Single, Y As Single)<br>
If OldX = 0 Then<br>
OldX = X<br>
OldY = Y<br>
Else<br>
Line (OldX, OldY)-(X, Y), 0 'substitute any color for 0<br>
OldX = X<br>
OldY = Y<br>
End If<br>
End Sub<br>
<br>
You may want to keep the X and Y values in an array so you can save the graph to a file.<br>