Python win32gui.SystemParametersInfo() Examples
The following are 4
code examples of win32gui.SystemParametersInfo().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
win32gui
, or try the search function
.
Example #1
Source File: tray_worker.py From attack_monitor with GNU General Public License v3.0 | 5 votes |
def is_screensaver_running(self): return win32gui.SystemParametersInfo(win32con.SPI_GETSCREENSAVERRUNNING)
Example #2
Source File: earthWallpaper.py From Tools with MIT License | 5 votes |
def setWallPaper(imagepath='download/cache_wallpaper.png'): keyex = win32api.RegOpenKeyEx(win32con.HKEY_CURRENT_USER, "Control Panel\\Desktop", 0, win32con.KEY_SET_VALUE) win32api.RegSetValueEx(keyex, "WallpaperStyle", 0, win32con.REG_SZ, "0") win32api.RegSetValueEx(keyex, "TileWallpaper", 0, win32con.REG_SZ, "0") win32gui.SystemParametersInfo(win32con.SPI_SETDESKWALLPAPER, imagepath, win32con.SPIF_SENDWININICHANGE)
Example #3
Source File: base.py From gxpy with BSD 2-Clause "Simplified" License | 5 votes |
def restore_font_smoothing(): win32gui.SystemParametersInfo(win32con.SPI_SETFONTSMOOTHING, True)
Example #4
Source File: winapi.py From gui-o-matic with GNU Lesser General Public License v3.0 | 5 votes |
def create_fonts( self ): ''' Create all font objects ''' self.known_fonts = {} def handle_font( font_config, text_metric, font_type, param ): #print font_config.lfFaceName self.known_fonts[ font_config.lfFaceName ] = font_config return True hdc = win32gui.GetWindowDC( self.main_window.window_handle ) #print "=== begin availalbe fonts ===" win32gui.EnumFontFamilies( hdc, None, handle_font, None ) #print "=== end available fonts ===" # https://stackoverflow.com/questions/6057239/which-font-is-the-default-for-mfc-dialog-controls self.non_client_metrics = win32gui.SystemParametersInfo( win32con.SPI_GETNONCLIENTMETRICS, None, 0 ) self.default_font = self.non_client_metrics[ 'lfMessageFont' ].lfFaceName #print "Default font: " + self.default_font keys = ( 'title', 'details', 'notification', 'splash', 'buttons' ) font_config = self.config.get( 'font_styles', {} ) self.fonts = { key: self.create_font( hdc, **font_config.get(key, {}) ) for key in keys } if 'buttons' not in self.fonts: self.fonts['buttons'] = win32gui.CreateFontIndirect( self.non_client_metrics[ 'lfMessageFont' ] ) win32gui.ReleaseDC( self.main_window.window_handle, hdc )