Re: Measure point to point



Thanks for useful post. I've been thinking about how this is done.

One further question:
What I would like to do is have a panel within the "screen capture" form
that has total transparency, while the form itself has partial transparency.
This way the selected region is nicely highlighted.

Any ideas on how to do this?

Rael


"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.



.



Relevant Pages

  • Re: Image with transparency?
    ... onscreen graphics context such as a panel using draw(...). ... transparency "key" color, and yields another Image object that posesses ... transparent pixels. ...
    (comp.lang.java.gui)
  • Re: how to emulate the invisibility effect
    ... true your way is better unless there is some other constraint, ... choice would be to draw with transparency. ... >> or make it transparent with alpha. ... I use the draw/no draw system all the time and it is ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Rendering and transparency
    ... The OpenGL renderer is the only one that supports ... transparency, so switching to another renderer isn't ... rendering technology that uses zbuffering (e.g. OpenGL). ... you need to draw all of the objects. ...
    (comp.soft-sys.matlab)
  • Re: Rendering and transparency
    ... whatever rendering method i used, either the rendering itself went wrong, or the transparency is ... other object which has already been drawn at that pixel. ... you need to draw all of the objects. ...
    (comp.soft-sys.matlab)
  • Re: Image Libraries
    ... alpha value combined for image draw operations. ... easily support operations with transparency etc. ... Is there any other decent image libraries for python? ... Ken Seehart ...
    (comp.lang.python)