Results 1 to 5 of 5

Thread: [RESOLVED]Hovering over a button.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2009
    Posts
    23

    Resolved [RESOLVED]Hovering over a button.

    Hey guys,

    I am trying to make a program where i am using "sapi" and i want to know how i can make sapi read the button text when the button is hovered over. I have been looking around all day and wondering if anyone could help.







    Thanks in advance,

    Th3man
    Last edited by Th3man; Jan 23rd, 2011 at 03:09 PM.

  2. #2
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Hovering over a button.

    I'm not sure what "sapi" is, but just read the text of the button, "Button1.Text" in the button's MouseEnter event.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2009
    Posts
    23

    Re: Hovering over a button.

    Well not to annoy you but can you show me an example

  4. #4
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Hovering over a button.

    You won't learn as well if you don't do it on your own.

    And event is essentially a "listener." They're made to execute what ever task you tell it to when it "hears" a specific action.

    So, if I told you to jump every time "x" occurred, jumping would be our event. In this case, you want the button to listen to the mouse entering its bounds.

    If you click on the button and open the properties panel, located (usually) on the right of the screen, you'll see a lightning bolt near the top of that panel. If you click on it, you'll see every event that this button has. Scroll down to MouseEnter and double click on it. That will open the code window and create the MouseEnter event for you.

    Now, any code you write within this event, will be triggered when the mouse cursor enters the bounds of the button. Try out something simple to see how it works. Just write a messagebox and show "Hello world" or "It works!" or something.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Aug 2009
    Posts
    23

    Re: Hovering over a button.

    Lol okay thanks, Thanks for explain it and not showing me now i learned how to do it

Posting Permissions

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



Click Here to Expand Forum to Full Width