Fullscreen Python TKinter or wxPython window, but 'stay at the bottom' of all windows?

笑着哭i 提交于 2019-12-04 07:43:35

This is how I set the window position in pygame on windows. With this, it will cover all other windows, if you change the -1 to a 1 it will be behind other windows, I only know it works in windows.

import pygame, time, datetime, ctypes
from pygame.locals import *
from ctypes import windll

pygame.init()
set_window_pos = windll.user32.SetWindowPos
monitorsize = ctypes.windll.user32
resolution_X = monitorsize.GetSystemMetrics(0)
resolution_Y = monitorsize.GetSystemMetrics(1)

screen = pygame.display.set_mode((255, 242), pygame.NOFRAME)
set_window_pos(pygame.display.get_wm_info()['window'], -1, (resolution_X - 255), 50, 0, 0, 0x0001)

Making a window FULLSCREEN is done with:

screen = pygame.display.set_mode((800, 350), FULLSCREEN) # this works in linux
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!