Hello everyone!
I would probably like to address my question to the developers .
Using rainmeter, I didn't pay attention to the fact that windows don't collapse when you press start + D.
I have little experience writing small python programs (starting from tkinter, ending with pyqt and win32.gui). And once again, playing with python, creating a simple gui, I wondered why my widget collapses when hiding all windows (or pressing win + d).
Studying the information on the Internet, I came to the conclusion: It is not possible to create a widget or application in Python that cannot be minimized using the Start+ key in Windows 10. The Start+ key is a system-level shortcut and is not customizable.
Realizing that it was worth digging in the direction of c++, I began to study it (not very effective ). After trying in vain to create a non-collapsible widget, I started looking for information on the Internet again. And here it is, a glimmer of hope! :
"Unfortunately, there is no way to create a widget or application on C++ that cannot be minimized using the Windows 10 Start+ shortcut. The only way to do this would be to create a program with an always-on-top feature, which would prevent the user from minimizing the application."
But trying to create a widget that is always on top, I failed.
After reviewing the source code of rainmeter, I found the only thing that looks like the truth:
m_Window = CreateWindowEx(
WS_EX_TOOLWINDOW,
MAKEINTATOM(className),
RAINMETER_WINDOW_NAME,
WS_POPUP | WS_DISABLED,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
nullptr,
nullptr,
m_Instance,
nullptr);
Summing up all of the above: how does rainmeter bypass the collapsing of all windows?
It is currently October 14th, 2024, 10:06 pm
How Rainmeter bypass start + d ? :)
-
- Posts: 2
- Joined: March 14th, 2023, 3:55 pm
-
- Rainmeter Sage
- Posts: 2746
- Joined: March 23rd, 2015, 5:26 pm
Re: How Rainmeter bypass start + d ? :)
I'm not a C/C++ dev, but I think the key is the parameter in red:
m_Window = CreateWindowEx(
WS_EX_TOOLWINDOW,
MAKEINTATOM(className),
RAINMETER_WINDOW_NAME,
WS_POPUP | WS_DISABLED,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
nullptr,
nullptr,
m_Instance,
nullptr);
This is the handle of the window menu (normally this is the "Control Menu" in the upper left corner of the title bar). If this parameter is NULL, then the window has no control menu. If there is no control menu, Windows cannot minimize or restore the window. All Win+D is really doing is cycling through every window and activating the minimize/restore menu option if it exists.
-
- Posts: 2
- Joined: March 14th, 2023, 3:55 pm
Re: How Rainmeter bypass start + d ? :)
Thanks for the tip I was able to find the parameter I needed in the PyQt library. When creating a window, you must specify :
Code: Select all
self.setWindowFlags(Qt.SplashScreen | Qt.WindowStaysOnTopHint)
SilverAzide wrote: ↑March 14th, 2023, 4:48 pm I'm not a C/C++ dev, but I think the key is the parameter in red:
m_Window = CreateWindowEx(
WS_EX_TOOLWINDOW,
MAKEINTATOM(className),
RAINMETER_WINDOW_NAME,
WS_POPUP | WS_DISABLED,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
nullptr,
nullptr,
m_Instance,
nullptr);