Help W/ Buttons

Discussion in 'Programming General' started by geek_keeper, Feb 14, 2009.

Help W/ Buttons
  1. Unread #1 - Feb 14, 2009 at 7:41 AM
  2. geek_keeper
    Joined:
    Apr 29, 2006
    Posts:
    441
    Referrals:
    0
    Sythe Gold:
    0

    geek_keeper Forum Addict
    Banned

    Help W/ Buttons

    I Want To Make An Interactive Button
    When Its Clicked The Hover Button
    will stay still and not go back to its hover state
    until The Other Button Clicked
    It Will Go Back To Its Original Color (like The One On Ccleaner)
    .. Its Hard To Explain Lol (im Using The Image Tool Btw)

    HERE IS THE CODE I MADE SO FAR ITS KINDA NOOBISH U KNOW
    MY PROBLEM IS WHEN I CLICKED IT , IT DOESNT STAY WITH THE HOVER IMAGE
    COZ I PUT THE MOUSEMOVE CODE ON THE FORM LOL


    "Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Image1.Picture = LoadPicture("1.jpg")
    End Sub



    Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Image1.Picture = LoadPicture("3.jpg")
    End Sub

    Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Image1.Picture = LoadPicture("2.jpg")
    End Sub"




    SHOULD I USE ACTIVEX <--WHAT THE HELL IS It??
    OR THAT DIM THINGY...
     
  3. Unread #2 - Feb 16, 2009 at 7:53 PM
  4. demonavenger
    Joined:
    Feb 25, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    demonavenger Forum Addict
    $5 USD Donor

    Help W/ Buttons

    Okay, i don't 100% follow what you mean...
    But you are wanting the button to stay the same colour, until another button is clicked to reverse it?

    Perhaps you can use a timer and variables...

    Lol DIM THINGY?
    Dim is used to create variables (strings, integers, etc)...
    Which you can use the variable to store a number or text, etc...

    Eg:
    Code:
    ' Create the variables
    dim A as integer
    dim B as string
    dim C as string
    
    ' Set a value to the variables.
    A = 13
    B = "The boy was "
    C = " years old."
    
    Msgbox (a & b & c)
    
    That is just an example, but you can use variables in anything.
    I cannot quite help you at the moment, as i am on a computer that does not have VB installed on...

    Perhaps that helped you a little bit, maybe someone else could provide you with more help.

    Good luck :)
     
  5. Unread #3 - Feb 17, 2009 at 2:46 AM
  6. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Help W/ Buttons

    A user control would be best. CLICK ME FOR TUTORIAL!
    NOICE COEDZ!
    [​IMG]
     
  7. Unread #4 - Feb 26, 2009 at 4:05 PM
  8. mistyfyed
    Joined:
    Sep 26, 2008
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0

    mistyfyed Member

    Help W/ Buttons

    maybe i'm wrong, but don't you have to put a handler with each of those subs?
     
< Making a shutdown timer. need help with the timer part | Internal Beep Program >

Users viewing this thread
1 guest


 
 
Adblock breaks this site