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

Always On Bottom #150

Closed
Jack251970 opened this issue Nov 20, 2023 · 8 comments
Closed

Always On Bottom #150

Jack251970 opened this issue Nov 20, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@Jack251970
Copy link

I like this project very much and I have used this to build my own WinUI3 app which runs so smoothly. ❤
But I'm looking forward to the function of always on bottom, which can enable me to easily implement windows desktop widgtes.

@dotMorten
Copy link
Owner

dotMorten commented Nov 20, 2023

How do you see this working in a multi-monitor setup? (I have two monitors under my primary monitor for instance - all have task bars)

@dotMorten dotMorten added the enhancement New feature or request label Nov 21, 2023
@Jack251970
Copy link
Author

Maybe I will only show those windows in the primary monitor. After all, you will always connect the primary monitor. And this action makes those widgets easy to manage their positions.
I've used two monitors, and I've used one app that can create widgets. I've found that if I create widgets on a non-primary display, they will automatically appear on the primary display (perhaps in a random location) if the next time it is not connected. 🤔

@dotMorten
Copy link
Owner

dotMorten commented Nov 21, 2023

This feels very special case. All the apis to do this are already available (get screen layout and position windows) but of course requires a little custom logic putting it together.
I'm going to close this as out of scope for winuiex since I can't see a lot of apps needing helpers for this.

@Jack251970
Copy link
Author

You seem to be misunderstanding what I mean, the features I need have nothing to do with window location or screen layout. 🤔

I just need a feature like always-on top, which makes the window always at the bottom (any newly opened windows will always on top of it). 😅

@dotMorten
Copy link
Owner

dotMorten commented Nov 21, 2023

Ooooooh. Yeah I misunderstood. I don't think Windows has such a feature does it? If you can find the win32 API for this I'll be happy to expose it

@Jack251970
Copy link
Author

I've tried looking for relevant information, but I can't seem to find a solution of C#.
Maybe it would be possible to build the desktop as the parent window of this window?
I have relatively little experience, so I'd like to have encapsulated functionality.
What I can make sure is that this feature should be achievable, the open source project Rainmeter is based on the C language, and the windows it creates are indeed located at the bottom of the screen.

@dotMorten
Copy link
Owner

dotMorten commented Nov 21, 2023

That's supposedly the way to go but also heavily recommended against: https://stackoverflow.com/q/365094

That thread have other ideas - all using methods winuiex mostly provide like accessing the windows messages and overriding methods.
I still think my original assessment that this is too special a case to put in a generic api. You'll have to do this in your app - some of the apis in winuiex makes this a lot easier but you'll need to do the last mile in your own app.

@Jack251970
Copy link
Author

Thanks for your answer! It seems harder than initially thought. 🤔

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

No branches or pull requests

2 participants