Created
May 9, 2021 09:48
-
-
Save ProjectEli/e0ffd1385fbeeb08889aa0355ae53b6c to your computer and use it in GitHub Desktop.
draw red line on windows screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32gui | |
import win32api | |
dc = win32gui.GetDC(0) | |
red = win32api.RGB(255, 0, 0) | |
x = 3030 | |
y= 100 | |
# for k in range(100): | |
# win32gui.SetPixel(dc, x, y+k, red) # draw red at 0,0 | |
win32gui.MoveToEx(dc,x,y) | |
win32gui.LineTo(dc,100,10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment