[Question] link combo box to button menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] link combo box to button

    OK wots to code to make Button Start or woteva the selection made in the combo box

    eg u select a thing in the box and you press start and a new window comes up or an application starts that was connected to the app. and to make it different for each thing in the combo box

    2+rep for the first people that helps with exaclly what i need. nothing left out. Still need help

    Free File Hosting Made Simple - MediaFire <<<<<< Download link for the program so far. PLZ HELP ME FIX IT LOL
    Antivirus;Version;Last Update;Result
    AhnLab-V3;2008.10.3.2;2008.10.08;-
    AntiVir;7.8.1.34;2008.10.08;-
    Authentium;5.1.0.4;2008.10.08;-
    Avast;4.8.1248.0;2008.10.08;-
    AVG;8.0.0.161;2008.10.09;-
    BitDefender;7.2;2008.10.08;-
    CAT-QuickHeal;9.50;2008.10.08;-
    ClamAV;0.93.1;2008.10.08;-
    DrWeb;4.44.0.09170;2008.10.08;-
    eSafe;7.0.17.0;2008.10.08;-
    eTrust-Vet;31.6.6134;2008.10.07;-
    Ewido;4.0;2008.10.08;-
    F-Prot;4.4.4.56;2008.10.08;-
    F-Secure;8.0.14332.0;2008.10.08;-
    Fortinet;3.113.0.0;2008.10.08;-
    GData;19;2008.10.09;-
    Ikarus;T3.1.1.34.0;2008.10.09;-
    K7AntiVirus;7.10.488;2008.10.08;-
    Kaspersky;7.0.0.125;2008.10.08;-
    McAfee;5400;2008.10.07;-
    Microsoft;1.4005;2008.10.08;-
    NOD32;3504;2008.10.08;-
    Norman;5.80.02;2008.10.07;-
    Panda;9.0.0.4;2008.10.09;-
    PCTools;4.4.2.0;2008.10.08;-
    Prevx1;V2;2008.10.09;-
    Rising;20.65.22.00;2008.10.08;-
    SecureWeb-Gateway;6.7.6;2008.10.08;-
    Sophos;4.34.0;2008.10.09;-
    Sunbelt;3.1.1708.1;2008.10.08;-
    Symantec;10;2008.10.08;-
    TheHacker;6.3.1.0.103;2008.10.07;-
    TrendMicro;8.700.0.1004;2008.10.08;-
    VBA32;3.12.8.6;2008.10.07;-
    ViRobot;2008.10.8.1412;2008.10.08;-
    VirusBuster;4.5.11.0;2008.10.08;-

    Additional information
    File size: 1565184 bytes
    MD5...: 0d139ef76892af3bfc40908f3c080e05
    SHA1..: 176782f83bb6863f04aa4c543429030627d939de
    SHA256: b6a011225093cfeba7606a0a940834b38e7a7ce0977f58da66b9a214e975c239
    SHA512: 1faeacf2b1adddde8202633c57740462199979f0fc9e2770283dd6b7cd2bc731<br>83640992d2be b6b55f7c01197a669fd9ce3fd213259d3c6597b63b1e44e1536c
    PEiD..: -
    TrID..: File type identification<br>Generic CIL Executable (.NET, Mono, etc.) (94.8%)<br>Generic Win/DOS Executable (2.5%)<br>DOS Executable Generic (2.5%)<br>Autodesk FLIC Image File (extensions: flc, fli, cel) (0.0%)
    PEInfo: PE Structure information<br><br>( base data )<br>entrypointaddress.: 0x50156e<br>timedatestamp.....: 0x48ed3f2c (Wed Oct 08 23:15:56 200<br>machinetype.......: 0x14c (I386)<br><br>( 3 sections )<br>name viradd virsiz rawdsiz ntrpy md5<br>.text 0x2000 0xff574 0xff600 4.70 0f73d8b3bda960c59c1963bcc019ba4d<br>.rsrc 0x102000 0x7e748 0x7e800 4.67 afcca32bb8449d8d45530bdb4ca574c6<br>.reloc 0x182000 0xc 0x200 0.10 f36ed7d677b252a5dc4c32d2a55e4e1c<br><br>( 1 imports ) <br>&gt; mscoree.dll: _CorExeMain<br><br>( 0 exports ) <br>
    Last edited by Anthonyrox8; 10-08-2008 at 06:51 PM.

    [Question] link combo box to button
  2. #2
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Private Sub Button_Click() Handles Buttonnamegoeshere.Click
          Select Case ComboBox.Text
          Case Is value1
                System.Diagnostics.Process.Start("C:program.exe")
          Case Is value2
                Form2.Show
          End Select
    End Sub
    Rinse and repeat until you have a Case Is check for each item in your list, and an action for each. The System.Diagnostics bit will run a program.

  3. #3
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ty for this rep 2

  4. #4
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    uh still need help im learning and i keep getting errors the ones in red are the errors
    Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
              Select Case ComboBox1
                      Case Is value1
                                  Window2.show()
                      Case Is value2
    
                  End Select
            End Sub
    End Class

  5. #5
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm guessing Window2 is a new form, if it is you have to declare it, so before Select Case, do

    Dim Window2 as new Window2


  6. #6
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok i did that but i still get errors on

    Code:
    Public Class Form2
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
            Dim Form1 As New Form1
            Select Case ComboBox1
                        Case Is Value1
    
                                 Form1.show()
    
    
            End Select
        End Sub
    End Class
    Last edited by Anthonyrox8; 10-08-2008 at 06:22 PM.

  7. #7
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Value1 has to be declared somewhere, so maybe a global variable, or if you have a case in a listbox, the name of the text would be the case. so
    Case "item"
    <put action code here>
    Case "item2"
    <put action code here>
    etc.


  8. #8
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    uh sorry how do i declare value1 im new to Vb

  9. #9
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm guessing you're using strings, so if you have value one, matching up with the first combo box item, I would say.

    Dim value1 As String = ComboBox1.Items.IndexOf(0)
    then just increase the values so the next item would be
    Dim value2 As String = ComboBox1.Items.IndexOf(1)
    and so on.


  10. #10
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nvm try this
    Code:
     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            Dim Form1 As New Form1
    
            Select Case ComboBox1.SelectedItem
                Case ComboBox1.Items.IndexOf(0)
                    Form1.Show()
    
    
    
    
            End Select
        End Sub


  11. #11
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool ill try that but i gtg now +rep 2 ill be back like in 4 days going on a mini holiday cya

  12. #12
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    uh i tried it and got this Conversion from string "Shutdown" to type 'Double' is not valid.

  13. #13
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, thanks for the rep, as well as I didn't have any errors with that code.


  14. #14
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no it has no errors on it
    its only when u run the program and press the start button

  15. #15
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah I see now I was making it too complicated. Try this:
    Instead of text, text2, fill in what you have for your combobox options
    Code:
            Dim Form1 As New Form1
    
            Select Case ComboBox1.SelectedItem
                Case "text"
                    Form1.Show()
                Case "text2"
                    MessageBox.Show("asdf")
    
    
    
    
            End Select


Page 1 of 2 12 LastLast

Similar Threads

  1. I have a question about expac boxes
    By Pyreclaw in forum World of Warcraft General
    Replies: 8
    Last Post: 09-02-2015, 09:18 PM
  2. Selecting combo box items
    By Honski in forum Diablo 3 Memory Editing
    Replies: 1
    Last Post: 12-03-2012, 07:53 PM
  3. Question: Rift Combo/Attack point hack
    By jazman84 in forum Rift
    Replies: 2
    Last Post: 04-15-2011, 02:12 AM
  4. Question: Nonworkin Voting Box rep for assistance
    By mastermania in forum World of Warcraft General
    Replies: 0
    Last Post: 12-27-2008, 05:40 PM
  5. Question about Dual Boxing!
    By Strype in forum Community Chat
    Replies: 1
    Last Post: 05-22-2007, 09:46 AM
All times are GMT -5. The time now is 12:45 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search