Hello, there. I'm using Visual C#, creating a small game currently.
After
Graphics g = CreateGraphics();
g.DrawLine(new Pen(Color.White, 1), new Point(x, y), new Point(x, y);

How do i delete that line?

public void ClearColor(PaintEventArgs e)
{
// Clear screen with teal background.
e.Graphics.Clear(Color.White);
}

public void ClearColor(PaintEventArgs e)
{
// Clear screen with teal background.
e.Graphics.Clear(Color.White);
}

So how do I call ClearColor?

Implement it via a button click handler or use a menu.

Found another solution: Refresh();

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.