Dear good hearted person;<br>
<br>
Do you know if there is a control that's a has dots (like a grid or graph), that the user can draw on it lines?<br>
Any help you can give me will be gratly appreciated<br>
<br>
Thanks in advance<br>
Mendy
Mendy,<br>
<br>
Sorry to let you down on your first posting but - no I don't to be honest. It's quite possible to write one yourself but that could be quite time consuming.<br>
<br>
Anyone else?<br>
<br>
Mike <p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href=
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>
Hehe better yet take that code he has above, and turn it into an ActiveX control and include it into any app you need. (i can think of many things i'd like to use that into an activeX for) <p>Karl<br><a href=mailto:kb244@bellsouth.net>kb244@bellsouth.net</a><br><a href=
<grin> typical - I say "no - too hard", and Alt does about 90% of it in about 20 lines..... <p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.