CyDAS Home funded by   Sponsor: DFG
CyDASGeneralControls Documentation Class ImageMapAreaSelectedEventArgs Documentation Section HowTo Section Online Analysis Section Download Section Resources Section About Section

CyDAS General Controls: Class ImageMapControl

The class ImageMapControl provides a click sensitive map for windows desktop applications. For more information on its deployment, see overview of the image map.

Overview


ImageMapControl
New() 
AutoNavigate: Boolean
AutoSize: Boolean
Bitmap: System.Drawing.Bitmap {readonly}
Data: ImageMapData
AreaSelected(ByRef sender As Object, ByRef e As ImageMapAreaSelectedEventArgs)

Programming Language

Availability

Constructors

Public Sub New()

Instantiates a new ImageMapControl object. There are no parameters for this function. The constructor call and
its coding will normally happen automatically within the windows form designer.

Interfaces

Inherits

System.Windows.Forms.UserControl

Enumerations

The class does not provide enumerations.

Properties

AutoNavigate As Boolean

Determines if the control will executed the command given in the Command property of a clicked ImageMapArea automatically or instead raise an AreaSelected event.

Property Value

Remarks

AutoSize As Boolean

Determines if the control is resized to fit the size of the image.

Property Value

Remarks

ReadOnly Property Bitmap As System.Drawing.Bitmap

Gets the bitmap associated with the image map data.

Property Value

Remarks

Data As ImageMapData

An ImageMapData object describing the image map including its image and its area elements.

Property Value

Remarks

Methods

The class does not provide public methods.

Events

AreaSelected(ByRef sender As Object, ByRef e As ImageMapAreaSelectedEventArgs)

Occurs when an area of the image map was clicked and the AutoNavigate property of the ImageMapControl is set to false.

Parameters

Remarks

Interaction with other classes

Classes used by ImageMapControl

The ImageMapData class is the central data container of the ImageMapControl.

Internal Processing

ImageMapControl_Click(...) Handles MyBase.Click

If the image map is clicked, the control determines the mouse position and, if AutoSize is false, calculates the position in the original image map. Thereafter, the control inquires from the Data property the clicked ImageMapArea object (ImageMapData.getSelectedArea()).

If an area was found for this position, the next steps depend on the AutoNavigate property. If it is false, the control will raise an AreaSelected event. Otherwise, it will have windows evaluate the Command property of the area element and start the appropriate program; errors occuring during this windows processing are suppressed.

ImageMapControl_MouseMove(...) Handles MyBase.MouseMove

If the mouse is positioned over the image map, the control determines the mouse position and, if AutoSize is false, calculates the position in the original image map. Thereafter, the control inquires from the Data property the clicked ImageMapArea object (ImageMapData.getSelectedArea()).

If an area was found for this position, the tooltip text of the control is set to the Title property of the area. Otherwise, the tooltip is removed.