Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Force always on top #8

Open
Yousefjb opened this issue Nov 14, 2017 · 1 comment
Open

[Feature Request] Force always on top #8

Yousefjb opened this issue Nov 14, 2017 · 1 comment

Comments

@Yousefjb
Copy link

Can we have always on top feature ? it would be amazing for resize youtube windows to show video only and force top it

@LazoCoder
Copy link
Owner

I can't add this feature at the moment since I don't have access to my Windows computer (I'm on a Mac right now). But I think this is how to do it.

WinAPI-Wrapper is what allows Windows Hacks to do its magic. Currently it doesn't have a method for forcing windows to the top. Somebody needs to go into Window.cs and add the method:

/// <summary>
/// Set a window to be always on top.
/// </summary>
/// <param name="windowTitle">The title of the window.</param>
public static void SetAlwaysOnTop(IntPtr hWnd)
{
    WinAPI.SetWindowPos(hWnd, new IntPtr(-1), 0, 0, 0, 0, 0x0001 | 0x0002);
}

Then produce a WindowsAPI.dll with the new code and update the one in External in Windows-Hacks. From here it should be easy to add the feature.

I'm not sure how to turn it off though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants