Hey I want to draw 3 shapes for example 3 squares in 3 different "private new async void". To achieve this I'm using:
using (Graphics g = Graphics.FromHwnd(IntPtr.Zero))
{
g.DrawRectangle(Pens.Red, SizeX, SizeY, X, Y);
}
The isssue is that it starts flickering and also slows down the program (feels like it is lagging). I want to keep the square refreshing like every 1ms since it is moving.
I already set DoubleBuffering to true but each square flickers on its on successively really fast.
Is there another method to fix this than Double Buffering or am I doing smth wrong.