Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. resend mouse messages

resend mouse messages

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    likefood
    wrote on last edited by
    #1

    I have a program that is semitransparent and is topmost. If a different program has focus, the keyboard messages reach it (the other program) just fine, but my topmost form intercepts mouse input (understandably so). How can I make my program take all mouse input and resend it through Windows's message pool so that it's as if my program wasn't there? I want to be able to function in the other active applications as if my program wasn't there (wasn't topmost). The reason it has to be topmost is because it has a duplicate of the user's background image on it. Being semitransparent, it gives the effect that, instead, all of the other programs are semitransparent (the ultimate goal), so that the user can still faintly see their wallpaper "behind" their programs (because I don't know how to forcefully reduce all other programs' opacity).

    -Daniel Typing too fast fro my owngood

    D 1 Reply Last reply
    0
    • L likefood

      I have a program that is semitransparent and is topmost. If a different program has focus, the keyboard messages reach it (the other program) just fine, but my topmost form intercepts mouse input (understandably so). How can I make my program take all mouse input and resend it through Windows's message pool so that it's as if my program wasn't there? I want to be able to function in the other active applications as if my program wasn't there (wasn't topmost). The reason it has to be topmost is because it has a duplicate of the user's background image on it. Being semitransparent, it gives the effect that, instead, all of the other programs are semitransparent (the ultimate goal), so that the user can still faintly see their wallpaper "behind" their programs (because I don't know how to forcefully reduce all other programs' opacity).

      -Daniel Typing too fast fro my owngood

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      My shameless plug[^] on click-through forms. You can't force another app's window to be opaque. You have no control over how another app paints it's windows. On top of that, what you have to do to the window to support opacity could very well make the other app's painting code crash.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      L 1 Reply Last reply
      0
      • D Dave Kreskowiak

        My shameless plug[^] on click-through forms. You can't force another app's window to be opaque. You have no control over how another app paints it's windows. On top of that, what you have to do to the window to support opacity could very well make the other app's painting code crash.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        L Offline
        L Offline
        likefood
        wrote on last edited by
        #3

        I understand that I can't alter how another window paints itself. That's why I needed a click-through-able window. Your shameless plug is exactly what I needed! (well... after manually converting the VB to C#) However, it wasn't working exactly 100%. I took out the lines that changed [myform].Opacity and it seems to be working just fine now (using SetLayeredWindowAttributes instead of Form.Opacity). Thank you! I now have a wallpaper that seems to "show through" all of my windows (as if all of my windows were semitransparent)!

        -Daniel Typing too fast fro my owngood

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups