Hi Sou,
for the purposes you describe, i am using a powershell script. Powershell is part of windows so you usually dont need to install anything.
Here we are using
user32.dll to get a window handle and then we use
SetWindowPos to change window appearance.
File:
alwaysOnTop.ps1
$signature = @’
[DllImport("user32.dll")]
public static extern bool SetWindowPos(
IntPtr hWnd,
IntPtr hWndInsertAfter,
int X,
int Y,
int cx,
int cy,
uint uFlags);
‘@
$type = Add-Type -MemberDefinition $signature -Name SetWindowPosition -Namespace SetWindowPos -Using System.Text -PassThru
$handle = (Get-Process "OBS Projector Window").MainWindowHandle
$alwaysOnTop = New-Object -TypeName System.IntPtr -ArgumentList (-1)
$type::SetWindowPos($handle, $alwaysOnTop, 0, 0, 0, 0, 0x0003)
If you save the code above to the a file and run it with powershell, it will set projector window "always on top", so that no other program should appear above it anymore...
It is not persistent setting = you may have to run the script again if you close and reopen the window and/or OBS.
I hope it helps...
EDIT: you will need to set execution policy to Unrestricted or you will need to sign the scrpt with your signature and set execution policy to Remote-Signed.
More information you can get here (sections 10. and 11.) - LINK
TLDR: you can quickly bypass security settings and allow your windows to run powershell scripts via command "set-executionpolicy unrestricted", but you should know what you are doing and you should not do it on production machine (do it like that for test purposes only).