DX 2 Question.

I was wondering if it is possible to make Hot Spots on a DX 2 object? So if I wanted you to be able to click on different parts of the object to do different tasks.
1,873 views 2 replies
Reply #1 Top
It's not a feature of DesktopX but can be done using DXScript. You would need to have something like:

Sub Object_OnStateChange(state)

End Sub
Reply #2 Top
It's not a feature of DesktopX but can be done using DXScript. You would need to have something like:

Sub Object_OnStateChange(state)
If State = "Mouse down" then
if system.cursorx > FirstHotSpotLeft and _
system.cursorx < FirstHotSpotRight and _
system.cursory > FirstHotSpotTop and _
system.cursory < FirstHotSpotBottom then
' It's in the 1st hot spot so do something
end if
end if
End Sub

In the example above you would swap the FirstHotSpotLeft/Right etc with the actual values. If you were calling it so many times you would probably want to set up a function called CheckHotspot which you could call very simply and returned a True/False depening on if it was in the hotspot.
[Message Edited]