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
[Only registered and activated users can see links. ] <<<<<< 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;-
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.
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
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
ADMIN for Sydney WoW ~ 3.0.3 Server coming soon.
Last edited by Anthonyrox8; 10-08-2008 at 08:22 PM..
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.
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.
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