Results 1 to 23 of 23

Thread: Drawing on the screen with an overlay Window

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    629

    Arrow Drawing on the screen with an overlay Window

    Hello all.

    I have a bit of an issue here. I made a "Colour picker" dialog in my program with which you can pick the colour at the mouse.
    It is a simple topmost form with an OnPaint handler used to draw a coloured border around the cursor:

    It uses a transparency key to make the non-drawn parts of the form transparent.

    It uses the following code to prevent the mouse from clicking through the screen:
    Code:
            Window.FromControl(Me).ExStyle(Window.ExStyles.Layered) = True
            Window.FromControl(Me).ExStyle(Window.ExStyles.Transparent) = False
    It sets Layered to True and Transparent to False. This works in Windows 7, but on a XP machine it fails.
    When moving the mouse the event does not go to the forms' event handler and you can just click through.
    For a screen region selector I simply made a screenshot, but I want the Colour Picker to remain updated.
    (just in case you want to get the colour of an animated control)

    How can I get this to work on a Windows XP machine?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width