Choose a combo, a picture shows

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

Choose a combo, a picture shows
  1. Unread #1 - Jul 28, 2008 at 5:37 PM
  2. Belgin_Mage
    Referrals:
    0

    Belgin_Mage Guest

    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
     
  3. Unread #2 - Jul 28, 2008 at 5:58 PM
  4. 8arry 5tinkt
    Referrals:
    0

    8arry 5tinkt Guest

    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
     
  5. Unread #3 - Jul 28, 2008 at 6:09 PM
  6. Belgin_Mage
    Referrals:
    0

    Belgin_Mage Guest

    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..
     
  7. Unread #4 - Jul 28, 2008 at 8:20 PM
  8. jdsfighter
    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0

    jdsfighter Forum Addict
    Visual Basic Programmers

    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
     
  9. Unread #5 - Aug 24, 2008 at 9:18 AM
  10. tomanderson12
    Joined:
    Jan 21, 2008
    Posts:
    53
    Referrals:
    0
    Sythe Gold:
    0

    tomanderson12 Member

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site