D
D
Daniil Shevkunov2021-06-07 23:52:59
Python
Daniil Shevkunov, 2021-06-07 23:52:59

Why does the drawn picture disappear when using win32gui.SetPixel?

There is a simple program:

import win32gui as win
import win32api

comp = win.GetDC(0)
color = win32api.RGB(255,255,255)

for i in range(300, 320):
    for t in range(300, 320):
        win.SetPixel(comp, i, t, color)


But when she draws a square, it disappears after a few seconds, what should I do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question