Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Looking for a control

Looking for a control

Looking for a control

Dear good hearted person;

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?
Any help you can give me will be gratly appreciated

Thanks in advance

RE: Looking for a control


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.

Anyone else?


Mike Lacey
Cargill's Corporate Web Site

RE: Looking for a control

Here's an easy way. Create a form, any size or background color. Then add the following:

Private Sub Form_Load()
NumXlines = 100 'draw 100 line horizontal & vertical
NumYlines = 100
Xinc = Width / NumXlines 'get the line spacing
Yinc = Height / NumYlines
For Xrep = 1 To NumXlines 'draw the vertical lines
Line (X, 0)-(X, Height), 0 'substitute any color for 0
X = X + Xinc
For Yrep = 1 To NumYlines 'draw the horizontal lines
Line (0, Y)-(Width, Y), 0
Y = Y + Yinc
End Sub

The MouseUp event draws your graph lines.
Private Static Sub Form_MouseUp(Button As Integer, Shift As_
Integer, X As Single, Y As Single)
If OldX = 0 Then
OldX = X
OldY = Y
Line (OldX, OldY)-(X, Y), 0 'substitute any color for 0
OldX = X
OldY = Y
End If
End Sub

You may want to keep the X and Y values in an array so you can save the graph to a file.

RE: Looking for a control

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)


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close