Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programming image maps in VB

Status
Not open for further replies.

Trowser

IS-IT--Management
Dec 16, 2002
125
GB
Ok I have no idea what-so-ever in how to do this.

Does anyone?

or can anyone point me somewhere to a place that can show me/teach me/ or give me examples of how to do it ?
 
If the imagemap hotspots are rectangular in shape, then you try the following procedure.

Add a picture box to a form, and load the image into the picture box.

Then add a series of labels to the picture box, set the captions to null, flat, no border, and transparent. Then use the labels' click events to trigger the action. The desired action would dependant on which label is clicked. An array of labels would work well in this case.
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
thanks Cajun didn't think of that but I suppose that would work :)
80 maps and over 50 click points on each :)
4k labels Erk :)
hmm maybe I will just add alot of them and fill the picture box so that I can enable and disable them as needed.
Or I suppose I can create dynamic ones?

Ok thanks will look into it and experiment maybe if I get something decent working I will post it in the tips as I prolly aint the only one that would want to do this
 
Trowser... can you elaborate a little on the final goal of this project? Tuna - It's fat free until you add the Mayo!
 
Because of number of controls limitations, you'll have to use a control array for the labels. If you can determine the number, position, and size of each label, then adding them programmatically makes sense, and its the approach that I would take. I might even go a step further, and create a database which contains the specifics for each label, and have the program read that from the database, and dynamically add each label to the control array and position accordingly. One advantage is that you can move and/or resize any or all of the labels without having to change the program every time. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Tuna well for this part of the project its so that when a person hovers over a point on the map it tells the user everything about that point.

Cajun hmm never thought of adding the points into the DB and then when they choose the map have the program pull the label co-ordinates from the DB.

thanks for your help guys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top