Adblock breaks this site

Choose a combo, a picture shows

Discussion in 'Programming General' started by Belgin_Mage, Jul 28, 2008.

  1. Belgin_Mage

    Belgin_Mage Guest

    Referrals:
    0
    Choose a combo, a picture shows

    I have a lil project going on now and Im stuck. The problem is that people must choose a value, lets call them 1 and 2. So the user chooses 1 and then a picture is shown, they choose 2 and the picture that 1 shows will be ''Image1.Visible = False'' and Image2 will be true.. I hope you understand:laugh: if you want me to explain more plz tell me
     
  2. 8arry 5tinkt

    8arry 5tinkt Guest

    Referrals:
    0
    Choose a combo, a picture shows

    If value = 1 Then
    Image1.Visible = True
    image2.visible = False
    ElseIf
    If value = 2 Then
    image1.visible = False
    image2.visible = True
    End If

    something like that?

    i dont really understand what you want :p
     
  3. Belgin_Mage

    Belgin_Mage Guest

    Referrals:
    0
    Choose a combo, a picture shows

    Ye! this should work, Ill try, thx man :)

    Edit: Nope, Ive tried with if ItemData, if List

    but none work..
     
  4. jdsfighter

    jdsfighter Forum Addict
    Visual Basic Programmers

    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0
    Choose a combo, a picture shows

    This will work

    Code:
    Private sub Combo1_Click()
    select case combo1.list(combo1.listindex)
    case 1: image1.visible=true
    image2.visible=false
    case 2: image1.visible=false
    image2.visible=true
    end select
    end sub
     
  5. tomanderson12

    tomanderson12 Member

    Joined:
    Jan 21, 2008
    Posts:
    53
    Referrals:
    0
    Sythe Gold:
    0
    Choose a combo, a picture shows

    Not to sure on what it was either buttons. but this is how i would do it with buttons, so first have the two pictures lets call them picture1 and picture2
    then place two command buttons cmd1 and cmd2 set your pictures properties both to Visible - False
    so now if you ran it there would be two buttons and no pictures appearing. then follow the next step

    the first command button (cmd1) this code also works as an on/off for the picture
    Code:
    Private Sub cmd1_Click()
    If Picture1.Visible = True Then
        Picture1.Visible = False
    Else
        Picture1.Visible = True
    End If
    End Sub
    
    the second command button (cmd2)

    Code:
    Private Sub cmd2_Click()
    If Picture1.Visible = True Then
        Picture1.Visible = False
    Else
        Picture2.Visible = True
    End If
    End Sub
    
    If this isnt what your looking for then please explain in more detail
     
< Help With Java, GE. - Robotz MTA Related. | My first Program >


 
 
Adblock breaks this site