Re: Measure point to point



Hi Peter,

Thanks for the great tip and I am able to make some reasonable progress
on it. I am still searching for a way to draw a line between 2 points that
will show the measurement.

Andy

"Peter Below (TeamB)" <none> wrote in message news:xn0faj2yy8xi9n00f@xxxxxxxxxxxxxxxxxxxxxxxxx
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

.



Relevant Pages

  • Re: Measure point to point
    ... (Borderstyle bsNone, all Bordericons set to false, Windowstate set to ... the forms Brush.Style to bsClear in the forms OnCreate event. ... The form will get mouse events, though, and you can draw on ... Search the newsgroup archives for "unit PBCaptureFormU" as a phrase, ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Digramming tool (but not Dia)?
    ... I came across this post while searching for an application to draw a ... circuit diagram, not being entirely happy with dia, and Inkscape seemed ... like maybe not the right tool, though it would certainly be able to draw ... it will draw circuits for me, and then even use gnucap to simulate ...
    (Ubuntu)
  • Re: Drawing a bitmap on screen
    ... draw stuff using Graph, but how can I put a bitmap from a file on ... I have literally been searching for hours but I can't find an ...
    (comp.lang.pascal.misc)
  • Re: Measure point to point
    ... Andy wrote: ... progress on it. ... I am still searching for a way to draw a line between ...
    (borland.public.delphi.thirdpartytools.general)
  • ACAD2008 3D tutorial - where to find it?
    ... i am searching for acad2008 3D tutorial. ... i know how to draw in 2D (i am making house plans-student) but i need to ... i need to insert trees and other plants. ...
    (comp.cad.autocad)