简体   繁体   中英

Keep form on desktop at all times (No Win+D effects)

I'm working on a project in which I need a form to stay on the desktop at all times. This would mean that it should still be showing even if a user clicks Win+D to hide/show desktop.

If anyone uses Rainmeter, they will know how meters stay on the desktop despite clicking on the show desktop key.

I really don't mind how to do it, as long as it works. I've looked through hundreds of examples but half of them don't work..

Maybe someone could help me out.

Thanks in advance.

I fired up C# and created a Windows Forms application. I set the forms' TopMost property to True , and its MinimizeBox property to False .

When I run the app, the Window is always on top, even if I use Win+D or click Show Desktop.

I got the idea from here: What is the difference between Minimize All and Show Desktop?

If you want something to stay on the desktop, you should put it on the desktop. Look at using Windows Gadgets which can do what you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM