473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Mouse meter C#

Hey,

for an application i need an option that makes it possible to measure the distance with your mouse in meters.
For example i have a rectangle that is 80 meters X 60 meters with 4 circles in it and if i move my mouse around these cirkels i need to know what the distance between the cirkels is in meters.
Is this possible in WPF or Winforms??

best regards
SLEMPIE
Apr 2 '08 #1
3 1842
The main problem would be that a pixel is not the same size on two different monitors. And if you add CRT, LCD and TV to the monitor types... naw, don't think it's possible.
Apr 2 '08 #2
That is true not every screen is the same but the scale stays the same.
If you draw a rectangle 80m X 60m and you tak 1px = 0,1m then the rectangle
is 800px * 600px on every screen.
So its possible to move in straight lines, you take the coordinates of te beginning and ending of the line and if you moved 40 px then you did 4m but the difficulty is when you move in a curve ore a polygon how doe je measure that...
Apr 2 '08 #3
Plater
7,872 Expert 4TB
You need to know some math for this. Or at least a math trick.

For normal problems, you would need to compute arc-lenth (modified forumla for circumfrence of a circle)

However, you don't have a true arc I would image. I would think you have a series of points that when plotted give the appearance of an arc.
Simple do the distance formula for between each point and add them together to get a length.
The more points you have, the better approximation of the arc length you can produce.
Apr 2 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hugo Gonz?lez | last post by:
Hi, I'm doing a simple text with the Tix Meter widget, in a program as follows import Tix import time mainwin=Tix.Tk() container=Frame(mainwin) bar=Tix.Meter(container, value=0.0)
2
by: Julia Briggs | last post by:
Hello, I've read quite a bit of discussion on different approaches of how to create a download progress meter that can be implemented into a Web site. I understand that by the very nature of...
2
by: BCM | last post by:
I've been asked to display some meter data on the web and I need preliminary advice. We have several hundred meters on site, with a system that writes out xml files at 10 second intervals...
3
by: Brian Birtle | last post by:
**** A CHALLENGE TO THE GURUS - refute the statement "It's impossible to build a file upload progress meter using ASP.NET" **** First person to prove me wrong gets "All Time .NET Programming GOD"...
1
by: Doug | last post by:
In I.E. 6 (and probably other versions as well), there is a sort of progress meter in the panel at the bottom of the window. This meter increments a few pixels at a time when the browser is trying...
1
by: SatishPasala | last post by:
hi I have like three aspx pages. Each page has a few check boxes. So depending on the selection of the check boxes the meter which is a semi circle with a pointer .(I have to build the...
23
ADezii
by: ADezii | last post by:
Many Access Users fail to realize that it has a built-in Progress Meter that can display the relative completion percentage of various processes. It is fairly limited, but nonetheless, does provide...
2
by: DarthPeePee | last post by:
Hello everyone. I am working on a Password Strength Meter and I am running into 1 problem that I would like to fix. When pressing the "Clear Password & Try Again" button, the password clears...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.