Re: Measure point to point



Andy wrote:

I am trying to create a tray application that allows the user to
measure 2 points on the screen, in pixels, mm, cm, etc. What
tools/components do I need to get this done?

Basically none. You can do this by creating a full screen empty form
(Borderstyle bsNone, all Bordericons set to false, Windowstate set to
maximized) that is transparent (or shows a bitmap image of the full
screen in its client area). You can fake transparency easily by setting
the forms Brush.Style to bsClear in the forms OnCreate event. The form
then simply does not draw anything, so the previous background appears
unchanged. The form will get mouse events, though, and you can draw on
its Canvas (use an xor pen to be able to erase what you have drawn, if
needed).

Search the newsgroup archives for "unit PBCaptureFormU" as a phrase,
that should turn up an old post of mine that shows the technique.

--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
.