Landin Martens
Landin Martens

Reputation: 3333

Display WPF Form on top of another third party full screen application?

I have a regular WPF windows form that I would like to display on-top of another running full screen application without the full screen application minimizing and the windows task bar showing up. The other application is in full screen mode like how a game is when in full screen mode.

From what I understand setting Top Most only works when there is no application in a true full screen mode. My form is NOT a full screen window, it is just a small form I would like running and displaying on top of the other full screen application.

How can this be done using .net [I am fine with window invokes if needed]?

As an added note, if what is above is possible, what would happen when the user clicks on my form, would it cause the other full screen application to minimize [as I do not want that to happen] or cause the windows task bar to show up?

THANKS!

Upvotes: 0

Views: 393

Answers (1)

tomatino
tomatino

Reputation: 108

Try this:

[DllImport("user32.dll")] static extern bool SetForegroundWindow(IntPtr hWnd);

and on Loaded event SetForegroundWindow(new WindowInteropHelper(this).Handle);

Let me know if it works

Upvotes: 1

Related Questions