Hi,
Why do I only see appearing a red rectangle after 1 sec with the following code, and not a blue one and after a sec a red.
Just used a new forms app with a panel control added and the following code:
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
Graphics G = e.Graphics;
Rectangle R = new Rectangle(10, 10, 50, 50);
G.FillRectangle(new SolidBrush(Color.Blue), R);
Thread.Sleep(1000);
G.FillRectangle(new SolidBrush(Color.Red), R);
}
}
}