Click here to Skip to main content
15,888,254 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How would I go about creating a onscreen ruler in VB so you press a button and then you click point a and then point b and it shows the length in pixels, please be understanding as I've been programming in VB for a while but only learnt off by mucking around and learning in the internet and this is my passion. I am still a teen at school and the folks over on another fourm were very minimal in their awnsers such as "break down what needs to be done" but I would like some more help
Posted
Comments
[no name] 28-Sep-14 7:11am    
People give you minimal answers for a couple of reasons:
We can't teach you programming over the internet is the major reason.
"break down what needs to be done" is the correct answer for your non-specific not a question.
Telling us "I would like some more help" tells us nothing at all about what help you really need, what you have tried for yourself, the problem that you had with what you have tried, etc. You will usually find that if you demonstrate that you have actually tried to solve your own problem, people will be more willing to try and help you.
Sergey Alexandrovich Kryukov 28-Sep-14 13:04pm    
It depends on several factors: what do you mean by "VB", exactly? what is your platform, UI library used, etc.
—SA

1 solution

You can read http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseposition(v=vs.110).aspx[^] for getting the mouse position, and http://msdn.microsoft.com/en-us/library/system.drawing.graphics.drawline(v=vs.110).aspx[^] for drawing lines. If you are starting out in programming it is well worth investing in a good study guide to help you learn, or look for online tutorials.
 
Share this answer
 
Comments
Member 11115108 28-Sep-14 18:03pm    
Thanks so much, now I see what these people mean and you put me on the right track!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900