Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pygame pin to top

#!/usr/bin/python
# -*- coding: utf-8 -*-


from ctypes import windll, Structure, c_long, byref #windows only


class RECT(Structure):
    _fields_ = [
    ('left',    c_long),
    ('top',     c_long),
    ('right',   c_long),
    ('bottom',  c_long),
    ]
    def width(self):  return self.right  - self.left
    def height(self): return self.bottom - self.top


def onTop(window):
    SetWindowPos = windll.user32.SetWindowPos
    GetWindowRect = windll.user32.GetWindowRect
    rc = RECT()
    GetWindowRect(window, byref(rc))
    SetWindowPos(window, -1, rc.left, rc.top, 0, 0, 0x0001)
Comment

PREVIOUS NEXT
Code Example
Python :: python jointly shuffle list 
Python :: k fold CV with xgboost 
Python :: # read table data from PDF into dataframe and save it as csv or json 
Python :: python print exection type 
Python :: how to convert frame number in seconds python 
Python :: decision tree best param 
Python :: feature importance plot using lasso regression 
Python :: intersection of 3 array in O(n) python 
Python :: cmake python interpreter 
Python :: enumerate() 
Python :: pytesseract restrict char 
Python :: install requests-html in jupyter notebook 
Python :: python detect script exit 
Python :: python code to demonstrate inheritance with animal class 
Python :: how to slice a set in python 
Python :: null=true django 
Python :: how to use drive link in pandas dataframe 
Python :: download google drive link collab 
Python :: flask tutorial 
Python :: remove grid in imshow 
Python :: gdscript fixed decimal 
Python :: pandas to_csv hebrew 
Python :: keras embedding 
Python :: List get both index and value. 
Python :: how to add path to python in windows 
Python :: The function to be built, amino_acids, must return a list of a tuple and an integer when given a string of mRNA code. 
Python :: remove SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame 
Python :: Getting the first element from each list in a column of lists 
Python :: last element of python list 
Python :: software developer tools list 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =