Alpha DevCon 2018
Results 1 to 8 of 8

Thread: rollover effects, cursor changes to hand

  1. #1
    Member
    Real Name
    doug lazenby
    Join Date
    Jun 2008
    Posts
    63

    Default rollover effects, cursor changes to hand

    Seemingly simple question:
    Need: mouse cursor to change to standard "hand" icon when end user does a "mouse-over/fly-over/roll-over" (whatever a5 is calling it?) over a button hot-spot in a form to give user additional visual cue that it is "clickable".
    Please advise. Could not find it in the help file, message posts, or A5 Made Easy v9 by Susan Bush.

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: rollover effects, cursor changes to hand

    Isn't that the default behavior for every hotspot object?

  3. #3
    Member
    Real Name
    doug lazenby
    Join Date
    Jun 2008
    Posts
    63

    Default Re: rollover effects, cursor changes to hand

    Tom,
    Thanks for your reply. If it is the default, my defaults must be different.
    I have a button on the form. In form view mode when I "mouse over" the button the cursor stays as an arrow (my windows default cursor is an arrow) but the button background changes to a darker shade indicating (seemingly) that it is a hot spot.
    When I go to edit view of the form and right mouse click the button and go to properties, my choices are setup, alignment, border, font, dimensions and help entry.
    With the setup choice, my button choices include fly-over effects (checked) and I can "set fly-over appearance". Those choices are align, border, fill, font, object (tab stop, whatever that is), and shadow.
    Unfortunately, nothing to choose for cursor action that I can find.
    I'm thinking maybe I need to insert a script?
    Please help this confused newbie. Thanks

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: rollover effects, cursor changes to hand

    In Alpha Five a button object and a hotspot object are two different things. Drop the hotspot object into your layout instead of a button.

  5. #5
    Member
    Real Name
    doug lazenby
    Join Date
    Jun 2008
    Posts
    63

    Default Re: rollover effects, cursor changes to hand

    Tom,
    So I guess the short answer is if you want the hand cursor change effect, use the hot spot because that is its default value.
    Long answer I am guessing is "it's doable but complicated, yada, yada, yada".
    Next question then:
    with a hotspot (which is "invisible/transparent"), how can I anchor it to a visible object.
    For example, a phrase on the form may be "click here for this function". If I put the hot spot "behind" the phrase obviously if the user clicks that area it will work. But if in my editing process I move that text accidentally or intentionally the hot spot must also be moved.
    What can I do to lock those 2 together?
    Thanks again.
    Last edited by dlazenby; 09-12-2009 at 09:18 AM. Reason: make long answer long

  6. #6
    Member
    Real Name
    doug lazenby
    Join Date
    Jun 2008
    Posts
    63

    Default Re: rollover effects, cursor changes to hand

    answer to part 2, anchoring text to hot spot = "group them".
    Not thinking too well, needed that extra cup of coffee.

  7. #7
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,907

    Default Re: rollover effects, cursor changes to hand

    Doug,
    Long answer I am guessing is "it's doable but complicated, yada, yada, yada".
    Complicated only if you had to figure it out! If you want to change the cursor you can use API calls. I believe I had placed this or similar into the Code Archive forum, most likely in conjunction with one of Marcel Kollenaar's contributions---regardless, Marcel is the mind behind any API calls I use or create! :)

    Here is a simple one that should do as you want. Modify to fit your circumstances.

    Code:
    declare user32 GetCursor L
    declare user32 LoadCursorA LLL
    declare user32 SetCursor LL' Display the hourglass for three seconds, then restore
    ' the mouse cursor to whatever it was originally.
    
    IDC_NO=32649
    Dim global holdcursor As n  ' receives handle to the original cursor
    Dim global hcursor As n  ' receives handle to the hourglass (wait) cursor
    Dim global retval As n  ' throw-away return value
    
    holdcursor = GetCursor()  ' get the handle of the current mouse cursor
    hcursor = LoadCursorA(0, IDC_NO)'LoadCursorA(0, IDC_NO)  
    If hcursor = 0
        End  ' abort program if cursor couldn't be loaded
    end if
    retval = SetCursor(hcursor)  ' set the cursor to the hourglass
    Sleep(3)' wait for three seconds
    retval = SetCursor(holdcursor)  ' restore the original cursor
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  8. #8
    Member
    Real Name
    doug lazenby
    Join Date
    Jun 2008
    Posts
    63

    Default Re: rollover effects, cursor changes to hand

    Mike,
    Thanks for your detailed reply. I will give it a try.

Similar Threads

  1. Text object flyover effects
    By danh in forum Alpha Five Version 9 - Desktop Applications
    Replies: 3
    Last Post: 05-23-2009, 07:15 PM
  2. button rollover effects
    By Bill Parker in forum Alpha Five Version 7
    Replies: 1
    Last Post: 10-04-2005, 07:18 PM
  3. Left Hand, Right Hand
    By dik_coleman in forum Alpha Five Version 5
    Replies: 5
    Last Post: 12-12-2003, 05:01 AM
  4. Rollover Scrolling
    By bruce in forum Alpha Five Version 4
    Replies: 1
    Last Post: 11-21-2003, 02:13 PM
  5. Rollover Scrolling
    By bruce in forum Alpha Five Version 4
    Replies: 0
    Last Post: 11-21-2003, 02:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •