pygame pin to top

Solutions on MaxInterview for pygame pin to top by the best coders in the world

showing results for - "pygame pin to top"
Santiago
04 Jun 2016
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4
5from ctypes import windll, Structure, c_long, byref #windows only
6
7
8class RECT(Structure):
9    _fields_ = [
10    ('left',    c_long),
11    ('top',     c_long),
12    ('right',   c_long),
13    ('bottom',  c_long),
14    ]
15    def width(self):  return self.right  - self.left
16    def height(self): return self.bottom - self.top
17
18
19def onTop(window):
20    SetWindowPos = windll.user32.SetWindowPos
21    GetWindowRect = windll.user32.GetWindowRect
22    rc = RECT()
23    GetWindowRect(window, byref(rc))
24    SetWindowPos(window, -1, rc.left, rc.top, 0, 0, 0x0001)
similar questions
queries leading to this page
pygame pin to top