Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void setup(object sender, PaintEventArgs e) {
- int x = 50;
- int y = 50;
- int w = 15;
- int h = w;
- Color color = Color.FromArgb(255, 255, 255);
- Point location = new Point(x, y);
- Size size = new Size(w, h);
- Task t = Task.Run(()=> {
- Rectangle Rect = new Rectangle(location, size);
- e.Graphics.DrawRectangle(new Pen(color), Rect);
- e.Graphics.FillRectangle(new SolidBrush(color), Rect);
- Thread.Sleep(5000);
- });
- }
Add Comment
Please, Sign In to add comment