Bezak
asked on
Stoplight Project - Graphics and GDI+
Hello All,
I have an idea for a project I want to do so I can become familiar with GDI+. My program is a simple collection of images (let’s say JPEGs for now) that I want to construct into a stoplight. I want to have the light change colors from red, to green, to yellow and repeat over again.
The images I have are:
-- The stoplight: an orange box with three black circles
-- The red light: one red circle
-- The yellow light: one yellow circle
-- The green light: one green circle
I am looking to use all these images and have an almost layered effect. In thirty second intervals, I would like the top black circle to change red (using the red light image) then they yellow and then the green.
Could anyone help me get the basics down for this idea?
I have an idea for a project I want to do so I can become familiar with GDI+. My program is a simple collection of images (let’s say JPEGs for now) that I want to construct into a stoplight. I want to have the light change colors from red, to green, to yellow and repeat over again.
The images I have are:
-- The stoplight: an orange box with three black circles
-- The red light: one red circle
-- The yellow light: one yellow circle
-- The green light: one green circle
I am looking to use all these images and have an almost layered effect. In thirty second intervals, I would like the top black circle to change red (using the red light image) then they yellow and then the green.
Could anyone help me get the basics down for this idea?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Idle_Mind
How can I click on one of the three lights and make it pop up a box that says the color red, yellow or green?
How can I click on one of the three lights and make it pop up a box that says the color red, yellow or green?
ASKER
Idle_Mind,
Working on this with your suggestion and ran into a question...how do I find the specific point on the PB? I am not clear on how to find the exact coordinate.
Working on this with your suggestion and ran into a question...how do I find the specific point on the PB? I am not clear on how to find the exact coordinate.
When you click down on the PB, the MouseDown event will fire. The "e" parameter will give you the coordinates as in "e.x" and "e.y".
I've never worked with "svg" images before. My only suggestion there is to move to a more common format...
ASKER
Yea, I am going to stick with jpeg...it was just a suggestion from a person I know. I didn't find any helpful information in converting those images from SVG anyway.
Thanks for the tips on finding the coordinate. I will look into further and hopefully get this thing working. It seems like a great beginner project.
Thanks for the tips on finding the coordinate. I will look into further and hopefully get this thing working. It seems like a great beginner project.
ASKER