Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEgethotspot Method

Scope All ProEssentials Interfaces

 

PEgethotspot(nX As Integer, nY As Integer) As Boolean

 

Parameter

Description

nX

X location in pixel coordinates.

nY

Y location in pixel coordinates.

 

This function is called to determine if and what type of hot-spot resides under a specific set of x/y coordinates (or more commonly, underneath the mouse's location). This will let you know if the mouse if over a hot-spot without the user having to click or double-click. You will normally use the MouseMove event to retrieve the desired coordinates via the GetLastMouseMove method and provide these coordinates to the PEgethotspot method. After this use the GetHotSpotData method to determine which hot spot if any was found.

  

Comments

See Also: GetLastMouseMove, GetHotSpotData, OCX Methods, PEgethotspot.

 

Visual Basic 6 Example

Private Sub Pego1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

 

Dim PixelX As Integer

Dim PixelY As Integer

Pego1.GetLastMouseMove PixelX, PixelY

'** Call PEgethotspot **'

Pego1.PEgethotspot PixelX, PixelY

'** Now look at HotSpotData structure **'

Dim HotSpotType As Integer

Dim Extra1 As Long

Dim Extra2 As Long

Pego1.GetHotSpotData HotSpotType, Extra1, Extra2

If (HotSpotType = PEHS_DATAPOINT) Then

s = "DataPoint value " + Str$(Pego1.YData(Extra1, Extra2))

Form2.Caption = s

ElseIf (HotSpotType = PEHS_SUBSET) Then

s = "Subset Legend is " + Pego1.SubsetLabels(Extra1)

Form2.Caption = s

ElseIf (HotSpotType = PEHS_POINT) Then

s = "Point Label is " + Pego1.PointLabels(Extra1)

Form2.Caption = s

Else

Form2.Caption = "No Hot Spot"

End If

 

End Sub