How to make the frame transparent with selected area

I’m new to Wxpython,I’m trying to design an screenshot capture tool by selecting area.

  1. To create full screen frame window and SetTransparent(150)

  2. select box area by cursor, in this step how to make the select area full transparent?
    currently I use shaped window to exclude the selected area to achieve the target.
    But this is not exactly what I want, because If I move back to the selected area the cursor
    position lost due to this area without window frame.

    Is there any way just make the selected area full transparent, the cursor in this area still can get
    position.

Hello Timmy,
Look at the link below:
How to take a screen shot

Personally, I use the “QQ-screenshot” version from CorttChan (醉仙灵芙).
I think this source is exactly what you are looking for.
I attached the modified file to make it compatible with python 3 and wxPython 4.2.

QQ screenshot made by wxPython (master)
QQ screenshot made by wxPython
Github

CopyScreen (updated).py (16.4 KB)

1-screenshot

Greetings

Thanks for sharing. I checked this code, it takes an screenshot as BMP and select area in this BMP to save partial of the screenshot.

But this is not exactly what I want, I just wan to select the area in a half transparent window, then make the selected area full transparent. Then process final position to crop the screenshot at back end.

I designed this kind of function with Tkinter and Pyside6, just want make same function with WxPython.

well, only TopLevelWindows may be set transparent, I think :hot_face: