Home Products Downloads Purchase Support About Us
RSS Magic for .NET
VB Image Map OCX

VB Image Map Support

General    Properties    Methods    Events    Example

  1. Description
  2. Usage
  3. Individual Hotspot Colors
  4. System Requirements
  5. Image Map Creation Software

Description:

The VB Image Map OCX gives you the ability to insert an image map into your Visual Basic projects. Hotspot coordinates use standard HTML syntax, entered via a string variable or read from a file on disk.

Usage:

Place the "Silverband VB Image Map" control on your form. In your code or in the Properties Window, load an image into the Picture property. This works exactly the same as the PictureBox control that comes with Visual Basic. Define the coordinates of the hotspots, using HTML syntax, by setting the CoordsString property or by pointing the CoordsFile property to an existing HTML file on disk.

For the most basic usage, that is all you need to know. The VB Image Map control has many events to notify you of the user's interaction with specific hotspots or the image map as a whole.

Individual Hotspot Colors:

Each hotspot can have a unique color. You can set the color of individual hotspots in the <map> HTML, whether in the CoordsString property or in an HTML file. Just add an attribute called "color" to the <area> tag of the hotspot you wish to have a different color, and use standard HTML color syntax for the value. For example:

<area shape="circle" coords="171,127,44" id="Sphere" color="#0000ff">

The line above came from the file "objects.htm" that is part of the sample project included in the download package. If you run the sample project, and check the box to "Show Hotspots" at the top of the window, notice that the sphere and cone are blue. You can change the Hotspot Color for the other hotspots in the picture, but the sphere and cone will remain blue. This is because if the "color" attribute is found in an <area> tag, the HotspotColor property will no longer apply to that hotspot.

To change the color of a hotspot at runtime, you must change the HTML in the CoordsString property, OR in the HTML file and re-set the CoordsFile property, depending on if you are using a string or file to set the map coordinates.

See the CoordsFile property for more details on the HTML image map syntax.

System Requirements:

Windows 9x/NT/Me/2000/XP
Visual Basic 6 Runtimes

Image Map Creation Software:

So how do you come up with the coordinates for the hotspots? What is the easiest way to make an HTML image map? Many popular HTML editors, such as Macromedia Dreamweaver, Microsoft FrontPage, and Allaire Homesite, have image map editors built right in. In any of these applications, just start a new HTML page, insert an image, and choose the option to edit/create an image map. They will allow you to draw your hotspots directly on the image using a simple point-and-click method of drawing shapes. For those of you who do not already own an HTML editor with built-in image map editing capabilities, download and try one of the freeware or shareware WYSIWYG image map creators/editors listed below.

Map This! (Freeware)
Very good (and totally free) image map editor, but is no longer supported. The US map in the Demo project was created using Map This!. The author is now focusing on LiveImage (below), an updated shareware version of this program.
http://www.abdn.ac.uk/tools/ibmpc/mapthis/

GeoHTML (Freeware)
Untested but looks very nice and is Free.
http://www.fegi.ru/geohtml/index.htm

CoffeeCup Image Mapper (Shareware $20.00)
http://www.coffeecup.com/mapper/

CuteMAP (Shareware $19.95)
http://www.globalscape.com/products/cutemap/

LiveImage (Shareware $29.95)
http://www.liveimage.com/

You can also find more listed at the TUCOWS site.

 


Copyright © 2000, Silverband Software