Results 1 to 9 of 9
  1. #1
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused

    Option in Combobox and previewing picture

    So continuing with my comx help.
    I am trying to make a preview of the gun when the gun is selected in the combo box.

    For example I select AK47 in the combo box. The picture of the gun will be shown right next to it.

    I need help on doing this.

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Code:
    Picturebox1.image = My.Resources.NameOfPic
    Does this work? idk..

    Other possibilites:

    as flash player..

    Code:
    AxShockWavePlayer.movie = "https://urltopicture.mpgh"
    or as webbrowser element

    Code:
    Webbrowser1.navigate("https://urltopicture.mpgh")



  3. #3
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    at Blubb1337.

    Yah i will try your codes out.
    Btw is there a find and replace option for vb.

  4. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    as in the IDE or programatically? the answer to both is yes.

    but in the IDE goto Edit --> Quick Replace

    @ Change picture , Use

    Code:
     Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
            If ComboBox1.Text = "" Then PictureBox1.image = "yadayaydayaydyay"
        End Sub

    You want to check the event "Combo Box Changes" If it changes what do you want to happen when it does

    In this case, If the combo box changes, "Flip the switch" and trigger the event

    If the Combo box = "your weapon" then it will display its matching image
    Last edited by NextGen1; 02-14-2010 at 01:03 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #5
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    i replace `yadayaydayaydyay`with the file name.

    like ak47.jpeg.

    i added cod4M16A4.jpg into the resources

    i replaced the yadayaydayaydyay with cod4M16A4.jpg
    but it gives me an error.
    Error 1 Value of type 'String' cannot be converted to 'System.Drawing.Image'.

  6. #6
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Code:
    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
         
       If ComboBox1.Text = "" Then 
    PictureBox1.Image = System.Drawing.Image.FromFile("yadayadayada")
    end if
        End Sub
    let me know if that works


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. #7
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    else try my methods



  8. #8
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    NextGen1 i found an alteration of ur code.
    Picture1.Image = Image.FromFile("image path")
    im am using this one currently.

  9. #9
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    As long as it works, that makes me happy.

    Glad to see it is working


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. [Preview] Update New hacks!!!! info and preview
    By Lonely Tedy Bear in forum Operation 7 Hacks
    Replies: 175
    Last Post: 09-04-2010, 11:11 AM
  2. Selecting An Option In Combobox and Writing Code In Text
    By ppl2pass in forum Visual Basic Programming
    Replies: 11
    Last Post: 02-14-2010, 12:18 PM
  3. Weird And Funny Pictures!
    By Emmanuel in forum General
    Replies: 6
    Last Post: 03-13-2009, 12:36 PM
  4. Replies: 55
    Last Post: 03-15-2008, 10:34 AM
  5. Replies: 34
    Last Post: 04-26-2006, 01:52 PM