Adblock breaks this site

Help W/ Buttons

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

  1. geek_keeper

    geek_keeper Forum Addict
    Banned

    Joined:
    Apr 29, 2006
    Posts:
    441
    Referrals:
    0
    Sythe Gold:
    0
    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...
     
  2. demonavenger

    demonavenger Forum Addict
    $5 USD Donor

    Joined:
    Feb 25, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    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 :)
     
  3. Darthatron

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0
    Help W/ Buttons

    A user control would be best. CLICK ME FOR TUTORIAL!
    NOICE COEDZ!
    [​IMG]
     
  4. mistyfyed

    mistyfyed Member

    Joined:
    Sep 26, 2008
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0
    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 >


 
 
Adblock breaks this site