Das is mein Problem wo ich die ganze zeit dran hänge
der fehler tritt auf wenn ich als erstes die RadioButtonRock anklicke und einen sender aus der dazugehörigen combobox abspielen will. Der fehler tritt aber nich auf wenn ich den erste radiobutton (radioButtonTechno) und die dazugehörige combobox zuerst abspiele und danach den radiobuttonRock klicke ....
Für hilfe währ ich echt dankbar. Bin erst neu in VB :/
OK hat sich erledigt, habe woanders schnelle hilfe bekommen
Hier die zwei lösungswege
1. das And als AndAlso schreiben
2.
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButtonElectro.Checked = True Then
If ComboBoxElectro.SelectedItem.ToString = "Technobase.fm" Then
AxWindowsMediaPlayer1.URL = ("http://listen.technobase.fm/dsl.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "Housetime.fm" Then
AxWindowsMediaPlayer1.URL = ("http://listen.housetime.fm/dsl.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "Hardbase.fm" Then
AxWindowsMediaPlayer1.URL = ("http://listen.hardbase.fm/dsl.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "Trancebase.fm" Then
AxWindowsMediaPlayer1.URL = ("http://listen.trancebase.fm/dsl.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "Coretime.fm" Then
AxWindowsMediaPlayer1.URL = ("http://listen.coretime.fm/dsl.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "RauteMusik Club" Then
AxWindowsMediaPlayer1.URL = ("http://club-high.rautemusik.fm/listen.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "RauteMusik FunkY" Then
AxWindowsMediaPlayer1.URL = ("http://funky-high.rautemusik.fm/listen.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "RauteMusik HardeR" Then
AxWindowsMediaPlayer1.URL = ("http://harder-high.rautemusik.fm/listen.asx")
ElseIf ComboBoxElectro.SelectedItem.ToString = "RauteMusik BigCityBeats" Then
AxWindowsMediaPlayer1.URL = ("http://bcb-high.rautemusik.fm/listen.asx")
ElseIf ComboBoxRock.SelectedItem.ToString = "Sky.fm Alternativ Rock" Then
AxWindowsMediaPlayer1.URL = ("http://www.sky.fm/wma/altrock.asx")
ElseIf ComboBoxRock.SelectedItem.ToString = "ChronixRadio" Then
AxWindowsMediaPlayer1.URL = ("http://www.chronixradio.com/chronixaggression/listen/listen.asx")
End If
End If
If RadioButtonRock.Checked = True Then
If ComboBoxRock.SelectedItem.ToString = "Sky.fm Alternativ Rock" Then
AxWindowsMediaPlayer1.URL = ("http://www.sky.fm/wma/altrock.asx")
ElseIf ComboBoxRock.SelectedItem.ToString = "ChronixRadio" Then
AxWindowsMediaPlayer1.URL = ("http://www.chronixradio.com/chronixaggression/listen/listen.asx")
End If
End If
End Sub






