[futurebasic] Re: [FB] Cursor (Mouse Pointer) Events For Standard BASIC

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2002 : Group Archive : Group : All Groups

From: Bernie Wylde <bernie.w@...>
Date: Tue, 21 May 2002 18:38:50 +0100
Hi Bernie,
How're ya doin' mate? Nice to hear from you.

You know, I was having exactly the same problem myself today and, after a
few hours of head scratching, I came up with a solution just after your
message was posted

Create a boolean global, gCursEvent, and amend your code to:

wNum = DIALOG(_cursEvent)
btnID = DIALOG(_cursOver)

SELECT wndNum
  CASE _nonDetectWnd               '<< Add
    gCursEvent = _false            '<< Add

  CASE _ToolsWnd

    LONG IF gCursEvent = _zTrue    '<< Add

    SELECT btnID
      CASE _toolsInBtn
        EDIT$(_btnFld) = "Insert"
      CASE _toolsAppBtn
        EDIT$(_btnFld) = "Append"
      '...
        '...
      CASE ELSE
        EDIT$(_btnFld) = ""
    END SELECT

    XELSE                          '<< Add
    gCursEvent = _zTrue            '<< Add
    END IF                         '<< Add

END SELECT


HTH
BernieŠ                          (the same one)


P.S. But seriously, although this appears to work, I'd be interested in
hearing of a better solution.



--- original message ---

> Hi Everyone,
> I have two windows and am detecting when the cursor is over a button in one
> of the windows with: wNum = DIALOG(_cursEvent), btnID = DIALOG(_cursOver).
> 
> If the cursor is over a button in my non-detect window and I move the cursor
> quickly to a no-button area of the button-detect window, DIALOG(_cursEvent)
> returns the correct wndNum but DIALOG(_cursOver) returns the btnID of the
> previous window.
> 
> Any ideas how I can get round this?
> 
> TIA
> Bernie
> 
> 
> Sample code:
> 
> wNum = DIALOG(_cursEvent)
> btnID   = DIALOG(_cursOver)
> 
> SELECT wndNum
> CASE _ToolsWnd
> SELECT btnID
> CASE _toolsInBtn
> EDIT$(_btnFld) = "Insert"
> CASE _toolsAppBtn
> EDIT$(_btnFld) = "Append"
> '...
> '...
> CASE ELSE
> EDIT$(_btnFld) = ""
> END SELECT
> END SELECT
> 
> 
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>
>