locked
Forwarding MouseEvents to Applications behind transparent Window RRS feed

  • Question

  • Hello everyone,

    I am new to .NET and currently experimenting with the new VS2008, WPF and .NET 3.5.

    Right now I am developing a little tool to support a touch-enabled system. However, since Java could not help me, I am now trying the new .NET Framework.

    Situation:

    I have an full-screen transparent (WPF-)Window.
    Let's say, Microsoft Word is running behind this transparent Window.
    I want all the MouseEvents to be passed through to Word  BUT ALSO to compute the MouseEvents on my transparent Window by drawing a ellipse where ever a double click has taken place.

    The effect would be: You can use Word like usally, but on the transparent extra layer, there is a optical feedback where you have clicked.

    My problem is, that when I am setting the Window to be transparent, all the Events will automatically be passed to the underlying Applications (e.g. Word). But they are never recognized in my transparent Window's EventHandlers (so no ellipse painting).

    When I set my Window to be fake-transparent like:

    this.Background = new SolidColorBrush(new Color() { A = 1, R = 0, B = 0, G = 0 });

    No Events will arrive Word (so no way of using of Word).

    I hope that someone can point me to the right direction.

    Thank you very much!

    Stefan Stinbrecher
    Saturday, March 15, 2008 7:07 PM

Answers