On my form I've got a picturebox, radio buttons and check boxes. The check boxes relates to a Square/triangle, in which a square/triangle will be displayed on the picturebox. And the radio boxes relate to rectangle/circle which are displayed when either radio button is selected. I have been told to create an array so that when of the radio buttons is checked, that the image is displayed uppermost (at the front). Any ideas of how to create this array and how to use it.

Thanks.

Recommended Answers

All 3 Replies

Use an ImageList in your form. ( See here to learn about ImageList class adn get examples. )

Then add to the image list, the images you want to show.

Then, when a check box has changed, set the picturebox image to the desired image in the ImageList.

Hope this helps

But how do I add drawing shapes e.g. triangle, square, etc to it?

You can use existing images.

IE: use Paint to make the shapes and save them as bit maps.

Hope this helps

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.