Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Ok the idea is simple , I have a picture lets say a 'car figure' picture i want to pre define some areas for example on the 'Left Door' and on the 'right door' and on the 'front part' and on 'the rear part' .

When the users mouse is on an predifined area a tooltip or a label have a description of the area will be shown and if the user click on that area some parameters will be shown to the user and after that the area will be marked with a color border.

I have no idea how to do that , and how to begin i am looking to a white paper for days :)

A thought is to draw some rectangles on the picture box for each area i want to mark (how to draw rectangles in free shapes ? by code)
How to mange the resize of the picture box and arrange the pre defined areas to be corret ? and a lot of more questions

Does anyone have a clue where to start ??
Any ideas will be very usefull ...

Thank you very much ...
Posted

1 solution

Why don't you get started by studying this CodeProject article which shows you how to build an 'imagemap' control for WinForms: [^]

You may also get some ideas from this CP article on an ImageMap for ASP.NET: [^].

Some important choices you'll have to make are:

1. are you going to create two applications: one for defining the "overlay regions" and their associated data (mouseover data, click data) and their relation to the Image they will appear on; and, the other application being a kind of "playback" facility that uses the pre-defined results of the "creator" application.

2. or, do you want to create one application that allows you import an Image, create your overlays, add their associated data, and then "use" them in some mode at run-time.

3. your going to have to consider the relationship of the "cost" of drawing (using the Paint Event) compared to the cost of using some kind of "floating objects": if you have to handle resize of the source Image, then the complexity of the code for painting increases greatly.

Sounds like a great challenge, and I'm sure you will learn a lot taking it on :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900