Posts: 843
Threads: 60
Joined: Mar 2003
well, I finally made this thing.. Kind of useless, but i think its pretty cool anyways. I might be adding more features later on. Right now, all it does it keep track of
pixels
inches
feet
yards
miles
another feature it has is to save and load it from a file to keep track of how far you went even if it acidentaly closes.
i forgot to mention it only saves after you do shift+escape to quit. so if you close it by rightclicking and closing on the bottom, it wont save your data
Download MM.zip
Posts: 525
Threads: 23
Joined: Oct 2004
Posts: 2,404
Threads: 153
Joined: Jan 2005
Cool...
btw: [X] Close isn't enabled,. You can tho and make it do the same thing by either:
Code:
IF INKEY$ = CHR$(255) + "X" THEN EXIT DO
..or..
Code:
LOOP UNTIL INKEY$ = CHR$(255) + "X"
And the loop will exit then save the iformation.... :wink:
Also, does the Pixel to Inch stay correct on all screen res?
Kevin (
x.t.r.GRAPHICS)
Posts: 2,771
Threads: 96
Joined: Oct 2003
how does it translate pixels into distance? They are not a fixed length.
Posts: 235
Threads: 30
Joined: Jun 2002
thats kinda cool, but I was wondering the same thing, if the pixels to inches was accurate for diff resolutions.
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Posts: 843
Threads: 60
Joined: Mar 2003
the way i made it, it is 96 pixels=1 inch.
does it seem accurate on your resolutions?
the ones i tested on, and it seems accurate is 1024x768, 1280x800
thanks for the tip kevin, i never knew how to do that before. :oops:
Posts: 979
Threads: 27
Joined: Aug 2001
You should use the GetDeviceCaps function from the Windows API:
http://msdn.microsoft.com/library/defaul...s_88s3.asp
You can get the pixels per inch of the screen by feeding it GetDC(0), and either LOGPIXELSX or LOGPIXELSY.
Posts: 2,771
Threads: 96
Joined: Oct 2003
Speedlemon, Take my Laptop screen for example. It is 11.25 inches wide, at a res of 1024x768
If we are talking about true life distances,
that gives a horizontal res of ~91 px/inch
If I was to change the res to 800x600, I would get only ~71.1 px/inch
As you can see, with different screen sizes and different resolutions the actual pixels per inch differs.
Posts: 2,404
Threads: 153
Joined: Jan 2005
@ Kiz: That's a good point too, if the screen is wider or narrower, that would effect it also.... Leaving no real way to measure it,... :roll:
Also screen settings, like now, I can size the screen position also effecting it....
Kevin (
x.t.r.GRAPHICS)
Posts: 1,407
Threads: 117
Joined: Dec 2002
Fortunately mouse has no oil to be changed at a fixed mileage
Antoni