V
V
Vadim Ushakov2022-03-06 23:48:33
Images
Vadim Ushakov, 2022-03-06 23:48:33

Draw primitives over the desktop in windows?

draw over the workspace in windows image. How can this be achieved?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vindicar, 2022-03-06
@Vindicar

Through WinAPI find the desktop window. It seems like there can be two of them, one with icons, one with a background. Google will tell you what window class is needed there. You can start with FindWindow(), then, if necessary, go through the window hierarchy using EnumChildWindows().
And then it is most practical to place your window as a child of the one found. Then you can draw whatever you want on your window. SetParent() to the rescue. The window itself, in theory, can be created through the GUI framework, and not through the API, but then you have to modify the window styles.
Pulling WinAPI from under Python is inconvenient, but the ctypes module will help.

H
Hemul GM, 2022-03-07
@HemulGM

Draw on top of the desktop - not effective, because. the first redraw of any part of the screen will clear your actions. Create a window and draw into it. No borders, no background
Example
https://youtu.be/lloV6UiOVJw

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question