TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
spencer20012
NA
20
0
changing a colour of circlwe based on timer
Mar 22 2004 11:57 AM
hi, i have a timer and an onpaint method see below. i need to change the colour of the circles after 10- seconds how do i do this? private void Form1_Load(object sender, System.EventArgs e) { //northSensor = new TrafficSensor(north); //southSensor = new TrafficSensor(south); counter = 0; timer1.Interval = 1000; timer1.Enabled = true; // Hook up timer's tick event handler. this.timer1.Tick += new System.EventHandler(this.timer1_Tick); } private void OnPaint(object sender,System.Windows.Forms.PaintEventArgs e) { Brush bru=new SolidBrush(Color.Blue); //lights at top g.FillEllipse(bru, 394, 54, 30, 30); g.FillEllipse(bru, 425, 54, 30, 30); g.FillEllipse(bru, 456, 54, 30, 30); }
Reply
Answers (
2
)
Largest Area of a triangle
how to change colours based on a timer