I am trying to use the TMap.OnBeforeClick event to determine when the user holds the control key and clicks on the map. MapPoint documentation makes this look trivial; however, the Button, Shift, X, and Y values all return incorrect information. The value of Shift should be 2 when the control key is held during the click. On inspection Shift returns a different value every time I click on the map while holding the control key. The same thing happens with the value of Button.
Does anyone have any suggestions as to what the problem might be? I am using Delphi rather than VB. Does the event return the correct values when used with VB?