Closed mimi99528 closed 1 month ago
You can probably hide the window border in a similar manner using win32.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The message to post on the issue when closing it. If none provided, will not comment when closing an issue.
Specification
Description
......
定义一些Windows API函数和常量
user32 = windll.user32 gdi32 = windll.gdi32
def set_window_region(hwnd, radius): rect = win32gui.GetWindowRect(hwnd) width = rect[2] - rect[0] height = rect[3] - rect[1] hRgn = windll.gdi32.CreateRoundRectRgn(0, 0, width + 1, height + 1, radius, radius) if hRgn != 0: windll.user32.SetWindowRgn(hwnd, hRgn, True) windll.gdi32.DeleteObject(hRgn)
......
if name == 'main': api = API() window = webview.create_window('JS API example', html=custom_titlebar_html, js_api=api, frameless=True, background_color='#000000')
The code makes the window have a white frame, like below:
Practicalities
YES I am willing to work on this issue myself.
YES I am prepared to support this issue financially.