I've tried using
window.Focus()
SetForgroundWindow(handle);
SetWindowPos(handle, -1, 0, 0, 0, 0, 0x0001 | 0x0002)
to bring WPF window to front of the fullscreen app.
I want WPF app to be on top the fullscreen app, not focused, and I could do this when spamming ALT+TABs, and clicking my program from taskbar. But I can't make it happen with codes.
Is there anyway except hooking into DirectX or OpenGL to show my app over fullscreen?
Well, I've tried many things to set this my WPF application on top. And I found the answer.
It's not C# code, but it's XAML.
<Window Topmost="True" WindowStyle="None">
<Window.Background>
<SolidColorBrush Opacity="0" Color="White"/>
</Window.Background>
<Dockpanel>
<Dockpanel.Background>
<!-- Background Properties you use --!>
</Dockpanel.Background>
</Dockpanel>
</Window>
I made window's background transparent, then set background to dockpanel which includes buttons, grids, etc. to make my wpf application controllable. You can leave dockpanel background to blank if you don't want it controllable.
With this, you can show your wpf application on top of fullscreen app.