rem    _____________________________________________________ 
  rem   |\___________________________________________________/| 
  rem   | |                                                 | | 
  rem   | | SOURCE TITLE:    Garrett's HotSpot Example      | | 
  rem   | | ------------                                    | | 
  rem   | | SOURCE AUTHOR:   Original source by Tommy Sools | | 
  rem   | | -------------    Modified by Garrett R. Hylltun | | 
  rem   | |                                                 | | 
  rem   | | DATE:            5 April, 2000                  | | 
  rem   | | ----                                            | | 
  rem   | | REQUIREMENTS:    VDS 3.x; VDSDLL 2.x            | | 
  rem   | | ------------                                    | | 
  rem   | | SOURCE STATUS:   Public Domain                  | | 
  rem   | | -------------                                   | | 
  rem   | | SOURCE DESCRIPTION:                             | | 
  rem   | | ------------------                              | | 
  rem   | |   This example shows you how to use the VDSDLL  | | 
  rem   | | to make a clickable hotspot.                    | | 
  rem   | |_________________________________________________| | 
  rem   |/___________________________________________________\| 

  external vdsdll.dll,Public Freeware Key|90257236 
  dialog CREATE,GT HotSpot Example,-1,0,200,100 
  dialog ADD,STYLE,STYLE6,Courier New,8,,, 
  dialog ADD,STYLE,STYLE5,Wingdings,24,,BACKGROUND,FOREGROUND 
  dialog ADD,TEXT,TEXT6,26,86,27,36,O,STYLE5 
  dialog ADD,STATUS,STATUS1 
  dialog SHOW 
  dialog Set,TEXT6,@chr(56) 
  rem   --- |-------------------------------------------------| --- 
  rem   --- | You need set a sleeptime for this to work.      | --- 
  rem   --- |-------------------------------------------------| --- 
  option Sleeptime,100 
:EVLOOP 
  wait event,0 
  %e = @event() 
  if %E 
    goto %E 
  end 
  goto Evloop 
:TIMER 
  rem   --- |-------------------------------------------------| --- 
  rem   --- | %D = Left X coordinate of Area or Element.      | --- 
  rem   --- | %E = Left X + Width of Area or Element.         | --- 
  rem   --- | %F = Top Y coordinate of Area or Element.       | --- 
  rem   --- | %G = Top Y + Height of Area or Element.         | --- 
  rem   --- |-------------------------------------------------| --- 
  gosub COORDINATESWINDOW 
  rem   --- |-------------------------------------------------| --- 
  rem   --- | Element or Area Coordinates = 26,86,27,36       | --- 
  rem   --- | Here, hard code the area you want to track.     | --- 
  rem   --- |-------------------------------------------------| --- 
  %d = @sum(%B,86) 
  %e = @sum(%B,113) 
  rem   --- |-------------------------------------------------| --- 
  rem   --- | If using a normal Title bar, add 20 to the Top  | --- 
  rem   --- | Coordinate.                                     | --- 
  rem   --- |-------------------------------------------------| --- 
  %f = @sum(%C,46) 
  %g = @sum(%C,82) 
  rem   --- |-------------------------------------------------| --- 
  rem   --- | If the mouse is in our area, then check for     | --- 
  rem   --- | mouse click.                                    | --- 
  rem   --- |-------------------------------------------------| --- 
  if @not(@greater(%D,%I)@greater(%I,%E)@greater(%F,%J)@greater(%J,%G)) 
    dialog set,STATUS1,Mouse is over hotspot now. 
    if @dll(keyboard,Lbutton) 
      rem   --- |-------------------------------------------------| --- 
      rem   --- | Mouse is pressed down                           | --- 
      rem   --- |-------------------------------------------------| --- 
      repeat 
      until @not(@dll(keyboard,Lbutton)) 
      rem   --- |-------------------------------------------------| --- 
      rem   --- | When the mouse is released, then do what you    | --- 
      rem   --- | want.  Unless you are using this as part of     | --- 
      rem   --- | Window or Element move.. then you'd want to put | --- 
      rem   --- | your code inside the repeat loop.               | --- 
      rem   --- |-------------------------------------------------| --- 
      goto YourEvent 
    end 
  else 
    dialog set,STATUS1, 
  end 
  goto evloop 
:COORDINATESWINDOW 
  %a = @winpos(GT HotSpot Example,LT) 
  parse "%B;%C",%A 
  %h = @mousepos() 
  parse "%I;%J",%H 
  exit 
:YourEvent 
  info You clicked the Hot Spot. 
  goto evloop 
:CLOSE 
  exit