3

I want to display an semi-transparent always-on-top window with some information, but I do not want this window to take input or receive focus. All mouse-clicks should go to the underlaying window.

I remember seeing this in a shell-replacement application years back, but I can't remeber witch.

Any Ideas how to achieve this effect with delphi or c#?

Update:

I can't quite get the proposed solution to work with delphi. Returning HTTRANSPARENT for the NCHITTEST-message will stop all mousemessages reaching the form, but it want pass it down to the next window in z-order. Is this method ment to work across processes, or is it only ment to work on childelements of a spesific window?

If I set the ExStyle flag WS_EX_TRANSPARENT, though, all mouseclicks will travel through into the next window, but I will not get the NCHITTEST-message at all, and will not be able to control where the windows should be click-through or not...

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Vegar
  • 12,828
  • 16
  • 85
  • 151

1 Answers1

5

This StackOverflow thread should answer your question hopefully.

Community
  • 1
  • 1
Noldorin
  • 144,213
  • 56
  • 264
  • 302
  • Thanks! I shall try this out as soon as possible. I will also try to be better at searching... :-) – Vegar Feb 09 '09 at 12:33
  • Note: This will only be click-through where the window is transparent. If you have, say, a label or image of some sort, these would not be click through. – configurator Feb 09 '09 at 14:09
  • I'm not sure about that actually - have you tested it? If so, you can still get around that issue by intercepting *all* Windows messages for the application and returning that hit test result. – Noldorin Feb 09 '09 at 14:24