Horje
How to use PatBlt in Python Code Example
How to use PatBlt in Python
#make sure you have pywin32 installed(pip install pywin32) type that in command prompt

from win32gui import*
from win32api import*
from win32ui import*
from win32con import*
from random import*

desk = GetDC(0) #get the frist monitor and stores it in our desk variable
y = GetSystemMetrics(0)
x = GetSystemMetrics(1)

for i in range(0, 100):
  PatBlt(desk, randrange(x), randrange(y), randrange(x), randrange(y), WHITENESS)
  Sleep(10)
ReleaseDC(desk, GetDesktopWindow())
DeleteDC(desk)



#Thats it. Dont run this on your main pc




Python

Related
python program to keep your computer awake Code Example python program to keep your computer awake Code Example
pyqt5 set window icon Code Example pyqt5 set window icon Code Example
python define 2d table Code Example python define 2d table Code Example
How do I mock an uploaded file in django? Code Example How do I mock an uploaded file in django? Code Example
[Solved] TypeError: ‘numpy.float64’ object cannot be interpreted as an integer Code Example [Solved] TypeError: ‘numpy.float64’ object cannot be interpreted as an integer Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8