locked
Conver To Windows Phone App? RRS feed

  • Question

  • I herd your suppose to be able to convert VB programs to apps for the windows phone with little or no conversion process. So i made a very basic "radio" internet based of course for the windows phone. So here is the app source. How would I convert this to work on a windows phone in its current state?

    Public Class Main
        Dim Station As Integer
        Dim Genre As Integer
        Dim Go As String = "http://"
        Dim Drag As Boolean
        Dim MouseX As Integer
        Dim MouseY As Integer
        Dim tick As Integer = 1
    #Region "Load"
        Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.Icon = My.Resources.Radio_Online
            Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None ' Sets form borderstyle to none which makes it borderless
            Station = 1
            Genre = 1
            StationsChecker()
            Genrechecker()
        End Sub
        Private Sub Main_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
            Drag = True 'Sets the variable drag to true.
            MouseX = Windows.Forms.Cursor.Position.X - Me.Left 'Sets variable mousex to the current x position of the mouse
            MouseY = Windows.Forms.Cursor.Position.Y - Me.Top 'Sets variable mousey to the current y position of the mouse
        End Sub
        Private Sub Main_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
            'If drag is set to true then move the form accordingly.
            If Drag Then ' Initiated when drag is true
                Me.Top = Windows.Forms.Cursor.Position.Y - MouseY ' Relocates or "drags" the form to current mouse y position
                Me.Left = Windows.Forms.Cursor.Position.X - MouseX ' Relocates or "drags" the form to the current mouse x position
            End If
        End Sub
        Private Sub Main_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
            Drag = False 'Sets drag to false, so the form does not move according to the code in MouseMove
        End Sub
    #End Region
    #Region "Station"
        Public Sub StationsChecker()
            'Classic Rock
            '6 Stations
            If Genre = 1 Then
                If Station = 1 Then
                    lblStation.Text = "WFBQ Q95"
                    lblDial.Text = "94.7"
                    lblStationLocation.Text = "Indianapolis,IN"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/901/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "Q 104"
                    lblDial.Text = "104.3"
                    lblStationLocation.Text = "New York, NY"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1465/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "Big DC"
                    lblDial.Text = "100.3"
                    lblStationLocation.Text = "Washington, DC"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/2505/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "Lone Star"
                    lblDial.Text = "92.5"
                    lblStationLocation.Text = "Dallas, TX"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/3379/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "KKRW The Arrow"
                    lblDial.Text = "93.7"
                    lblStationLocation.Text = "Houstan, TX"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/2265/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 6 Then
                    lblStation.Text = "WBGG Big"
                    lblDial.Text = "105.9"
                    lblStationLocation.Text = "Miami, FL"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/557/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Lite Rock
                '5 Stations
            ElseIf Genre = 2 Then
                If Station = 1 Then
                    lblStation.Text = "KKCW"
                    lblDial.Text = "103.3"
                    lblStationLocation.Text = "Portlan, OR"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1957/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "The River"
                    lblDial.Text = "101.5"
                    lblStationLocation.Text = "Toledo, OH"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1853/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "KTSM"
                    lblDial.Text = "99.9"
                    lblStationLocation.Text = "El Paso, TX"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/3188/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "KSOF"
                    lblDial.Text = "98.9"
                    lblStationLocation.Text = "Fresno, CA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/153/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "Soft Rock"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Internet"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/4414/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Modern Rock
                '12 Stations
            ElseIf Genre = 3 Then
                If Station = 1 Then
                    lblStation.Text = "KTCL"
                    lblDial.Text = "93.3"
                    lblStationLocation.Text = "Denver, CO"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/397/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "KCXX"
                    lblDial.Text = "103.9"
                    lblStationLocation.Text = "LA, CA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "socialstreamingplayer.crystalmedianetworks.com/radio/kcxx"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "WFRD"
                    lblDial.Text = "93.3"
                    lblStationLocation.Text = "Hanover, NH"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "den-a.plr.liquidcompass.net/player/flash/audio_player.php?id=WFRDFM&uid=496"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "KYSR"
                    lblDial.Text = "98.7"
                    lblStationLocation.Text = "LA, CA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/201/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "KDGE The Edge"
                    lblDial.Text = "102.1"
                    lblStationLocation.Text = "Dallas, TX"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/2815/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 6 Then
                    lblStation.Text = "KTCZ Cities 97"
                    lblDial.Text = "97.1"
                    lblStationLocation.Text = "Minneapolis, MN"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1221/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 7 Then
                    lblStation.Text = "KEDG The End"
                    lblDial.Text = "106.9"
                    lblStationLocation.Text = "Charlotte, NC"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1597/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 8 Then
                    lblStation.Text = "WWWQ"
                    lblDial.Text = "98.9"
                    lblStationLocation.Text = "Atlanta, GA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "widget.newsinc.com/_cfvp/radio_player.html?freewheel=90059&sitesection=cumulus99x_rad&vid=82915"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 9 Then
                    lblStation.Text = "KROX"
                    lblDial.Text = "101.5"
                    lblStationLocation.Text = "Austin, TX"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.101x.com/Other/Stream/stream.html"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 10 Then
                    lblStation.Text = "WFNX"
                    lblDial.Text = "101.7"
                    lblStationLocation.Text = "Boston, MA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "wfnx.com/player"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 11 Then
                    lblStation.Text = "181.FM"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Waynesboro, VA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=126795&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 12 Then
                    lblStation.Text = "Star FM"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Nuremberg, Germany"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=75756&"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Metal
                '9 Stations
            ElseIf Genre = 4 Then
                If Station = 1 Then
                    lblStation.Text = "Slippery When Wet"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Internet"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/4858/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "WSOU"
                    lblDial.Text = "89.5"
                    lblStationLocation.Text = "South Orange, NJ"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=22916&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "HDRN"
                    lblDial.Text = "91.9"
                    lblStationLocation.Text = "Canal, Winchester, OH"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=116601&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "1.FM"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Zug, Switzerland"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=47727&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "Classic Metal"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Scott Depot, WV"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=109915&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 6 Then
                    lblStation.Text = "Rock Radio 1"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "London, United Kingdom"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=80978&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 7 Then
                    lblStation.Text = "Hard Rock Radio Live"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "New York, NY"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=54653&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 8 Then
                    lblStation.Text = "Hard Radio"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Dallas, TX"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=17292&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 9 Then
                    lblStation.Text = "My Opus Radio"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Bangalore, KA India"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=100562&"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Classic Country
                '5 Stations
            ElseIf Genre = 5 Then
                If Station = 1 Then
                    lblStation.Text = "KXY"
                    lblDial.Text = "96.1"
                    lblStationLocation.Text = "Oklahoma City, OK"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1917/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "KABQ"
                    lblDial.Text = "104.7"
                    lblStationLocation.Text = "Albuquerque, NM"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1381/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "The Wolf"
                    lblDial.Text = "AM 920"
                    lblStationLocation.Text = "Milwaukee, WI"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/2681/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "KMJM"
                    lblDial.Text = "AM 1360"
                    lblStationLocation.Text = "Cedar Rapids, IA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/4744/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "Foggy Mountain"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Internet"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/4435/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Modern Country
                '5 Stations
            ElseIf Genre = 6 Then
                If Station = 1 Then
                    lblStation.Text = "K102"
                    lblDial.Text = "102.1"
                    lblStationLocation.Text = "Minneapolis, MN"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1205/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "The Bull"
                    lblDial.Text = "94.9"
                    lblStationLocation.Text = "Atlanta, GA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/2829/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "WMZQ"
                    lblDial.Text = "98.7"
                    lblStationLocation.Text = "Washington, DC"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/2513/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "KNIX"
                    lblDial.Text = "102.5"
                    lblStationLocation.Text = "Phoenix, AZ"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/49/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "WFUS"
                    lblDial.Text = "103.5"
                    lblStationLocation.Text = "Tampa, FL"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/693/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Pop
                '9 Stations
            ElseIf Genre = 7 Then
                If Station = 1 Then
                    lblStation.Text = "Generation X"
                    lblDial.Text = "106.7"
                    lblStationLocation.Text = "Columbus, OH"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/3632/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "WMMS Rover's Morning Glory"
                    lblDial.Text = "100.7"
                    lblStationLocation.Text = "Cleveland, OH"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/4552/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "Halloween Radio"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Washington, DC"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=118259&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "Pop 1 FM"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Athens, Greece"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=115061&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "Pop FM"
                    lblDial.Text = "102.1"
                    lblStationLocation.Text = "Corfu, Greece"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=78309&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 6 Then
                    lblStation.Text = "Session"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "France"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=139260&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 7 Then
                    lblStation.Text = "Estacao"
                    lblDial.Text = "internet"
                    lblStationLocation.Text = "Curitiba, PR, Brazil"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=119084&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 8 Then
                    lblStation.Text = "GoPop"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Athen's, Greece"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=120274&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 9 Then
                    lblStation.Text = "Cherie"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "France"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=138736&"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Blues & Jazz
                '9 Stations
            ElseIf Genre = 8 Then
                If Station = 1 Then
                    lblStation.Text = "Blues"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Internet"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/5052/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "Charlietown Blues"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Saint Charles, MO"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=127986&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "Azur"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Chicago, IL"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=133875&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "440"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Gulfport, MS"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=50925&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "American Blues"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Boston, MA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=47589&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 6 Then
                    lblStation.Text = "WUMB"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Paris,France"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=133999&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 7 Then
                    lblStation.Text = "KMYT"
                    lblDial.Text = "94.5"
                    lblStationLocation.Text = "Riverside, CA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/333/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 8 Then
                    lblStation.Text = "WLOQ"
                    lblDial.Text = "102.5"
                    lblStationLocation.Text = "Orlando, FL"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/5157/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 9 Then
                    lblStation.Text = "Smooth Jazz"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Internet"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/4242/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'R & B
                '5 Stations
            ElseIf Genre = 9 Then
                If Station = 1 Then
                    lblStation.Text = "Power"
                    lblDial.Text = "105.1"
                    lblStationLocation.Text = "New York, NY"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1481/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "WGCI"
                    lblDial.Text = "107.5"
                    lblStationLocation.Text = "Chicago, IL"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/841/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "Jam'n"
                    lblDial.Text = "94.5"
                    lblStationLocation.Text = "Boston, MA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1089/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "KMEL"
                    lblDial.Text = "106.1"
                    lblStationLocation.Text = "San Francisco, CA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/293/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "WJLB"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Detroit, MI"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/1141/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
                'Classical
                '9 Stations
            ElseIf Genre = 10 Then
                If Station = 1 Then
                    lblStation.Text = "Classica"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Internet"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "www.iheart.com/#/live/4592/?autoplay=true"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 2 Then
                    lblStation.Text = "Symphony"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Tampa, FL"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=45231&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 3 Then
                    lblStation.Text = "Classical"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Fairfield, CT"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=105606&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 4 Then
                    lblStation.Text = "Got Radio"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Sacramento, CA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=49677&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 5 Then
                    lblStation.Text = "Magnatune"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Lafayette, CO"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=51075&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 6 Then
                    lblStation.Text = "Got Radio"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Boston, MA"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=105604&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 7 Then
                    lblStation.Text = "WGBH"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Praha, Czech Republic"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=74242&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 8 Then
                    lblStation.Text = "Radio Celtic"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Knoxville, TN"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=18368&"
                    WebBrowser1.Navigate(tbAddress.Text)
                ElseIf Station = 9 Then
                    lblStation.Text = "Grove"
                    lblDial.Text = "Internet"
                    lblStationLocation.Text = "Krakow, Poland"
                    WebBrowser1.Stop()
                    tbAddress.Text = ""
                    tbAddress.Text = Go & "tunein.com/tuner/?StationId=119881&"
                    WebBrowser1.Navigate(tbAddress.Text)
                End If
            End If
        End Sub
    #End Region
    #Region "Tuner"
        Private Sub btn_Back_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Back.Click
            If Genre = 1 Then
                If Station <= 1 Then
                    Station = 6
                Else
                    Station -= 1
                End If
            ElseIf Genre = 2 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 3 Then
                If Station <= 1 Then
                    Station = 12
                Else
                    Station -= 1
                End If
            ElseIf Genre = 4 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            ElseIf Genre = 5 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 6 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 7 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            ElseIf Genre = 8 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            ElseIf Genre = 9 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 10 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            End If
            StationsChecker()
        End Sub
        Private Sub btn_forward_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_forward.Click
            If Genre = 1 Then
                If Station >= 6 Then
                    Station = 1
                Else
                    Station += 1
                End If
            ElseIf Genre = 2 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 3 Then
                If Station >= 12 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 4 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 5 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 6 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 7 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 8 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 9 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 10 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            End If
            StationsChecker()
        End Sub
        Private Sub btn_Genre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Genre.Click
            Timer1.Start()
            If Genre >= 11 Then
                Genre = 1
            Else
                Genre += 1
            End If
            Genrechecker()
            StationsChecker()
        End Sub
        Public Sub Genrechecker()
            If Genre = 1 Then
                lblGenre.Text = "Classic Rock"
            ElseIf Genre = 2 Then
                lblGenre.Text = "Lite Rock"
            ElseIf Genre = 3 Then
                lblGenre.Text = "Modern Rock"
            ElseIf Genre = 4 Then
                lblGenre.Text = "Metal"
            ElseIf Genre = 5 Then
                lblGenre.Text = "Classic Country"
            ElseIf Genre = 6 Then
                lblGenre.Text = "Modern Country"
            ElseIf Genre = 7 Then
                lblGenre.Text = "Pop"
            ElseIf Genre = 8 Then
                lblGenre.Text = "Blues & Jazz"
            ElseIf Genre = 9 Then
                lblGenre.Text = "R & B"
            ElseIf Genre = 10 Then
                lblGenre.Text = "Classical"
            End If
        End Sub
    #End Region
    #Region "Tool Strip"
        Private Sub Station1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station1ToolStripMenuItem.Click
            Station = 1
            StationsChecker()
        End Sub
        Private Sub Station2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station2ToolStripMenuItem.Click
            Station = 2
            StationsChecker()
        End Sub
        Private Sub Station3ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station3ToolStripMenuItem.Click
            Station = 3
            StationsChecker()
        End Sub
        Private Sub Station4ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station4ToolStripMenuItem.Click
            Station = 4
            StationsChecker()
        End Sub
        Private Sub Station5ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station5ToolStripMenuItem.Click
            Station = 5
            StationsChecker()
        End Sub
        Private Sub Station6ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station6ToolStripMenuItem.Click
            If Genre = 2 Or Genre = 5 Or Genre = 6 Or Genre = 9 Then
                Station = 1
            Else
                Station = 6
            End If
            StationsChecker()
        End Sub
        Private Sub Station7ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station7ToolStripMenuItem.Click
            If Genre = 1 Or Genre = 2 Or Genre = 5 Or Genre = 6 Or Genre = 9 Then
                Station = 1
            Else
                Station = 7
            End If
            StationsChecker()
        End Sub
        Private Sub Station8ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station8ToolStripMenuItem.Click
            If Genre = 1 Or Genre = 2 Or Genre = 5 Or Genre = 6 Or Genre = 9 Then
                Station = 1
            Else
                Station = 8
            End If
            StationsChecker()
        End Sub
        Private Sub Station9ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station9ToolStripMenuItem.Click
            If Genre = 1 Or Genre = 2 Or Genre = 5 Or Genre = 6 Or Genre = 9 Then
                Station = 1
            Else
                Station = 9
            End If
            StationsChecker()
        End Sub
        Private Sub Station10ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station10ToolStripMenuItem.Click
            If Genre = 1 Or Genre = 2 Or Genre = 4 Or Genre = 5 Or Genre = 6 Or Genre = 7 Or Genre = 8 Or Genre = 9 Or Genre = 10 Then
                Station = 1
            Else
                Station = 10
            End If
            StationsChecker()
        End Sub
        Private Sub Station11ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station11ToolStripMenuItem.Click
            If Genre = 1 Or Genre = 2 Or Genre = 4 Or Genre = 5 Or Genre = 6 Or Genre = 7 Or Genre = 8 Or Genre = 9 Or Genre = 10 Then
                Station = 1
            Else
                Station = 11
            End If
            StationsChecker()
        End Sub
        Private Sub Station12ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Station12ToolStripMenuItem.Click
            If Genre = 1 Or Genre = 2 Or Genre = 4 Or Genre = 5 Or Genre = 6 Or Genre = 7 Or Genre = 8 Or Genre = 9 Or Genre = 10 Then
                Station = 1
            Else
                Station = 12
            End If
            StationsChecker()
        End Sub
        Private Sub MinimizeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MinimizeToolStripMenuItem.Click
            WindowState = FormWindowState.Minimized
        End Sub
        Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
            Application.Exit()
        End Sub
        Private Sub NextStationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextStationToolStripMenuItem.Click
            If Genre = 1 Then
                If Station >= 6 Then
                    Station = 1
                Else
                    Station += 1
                End If
            ElseIf Genre = 2 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 3 Then
                If Station >= 12 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 4 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 5 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 6 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 7 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 8 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 9 Then
                If Station >= 5 Then
                    Station += 1
                Else
                    Station = 1
                End If
            ElseIf Genre = 10 Then
                If Station >= 9 Then
                    Station += 1
                Else
                    Station = 1
                End If
            End If
            StationsChecker()
        End Sub
        Private Sub PreviousStationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreviousStationToolStripMenuItem.Click
            If Genre = 1 Then
                If Station <= 1 Then
                    Station = 6
                Else
                    Station -= 1
                End If
            ElseIf Genre = 2 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 3 Then
                If Station <= 1 Then
                    Station = 12
                Else
                    Station -= 1
                End If
            ElseIf Genre = 4 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            ElseIf Genre = 5 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 6 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 7 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            ElseIf Genre = 8 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            ElseIf Genre = 9 Then
                If Station <= 1 Then
                    Station = 5
                Else
                    Station -= 1
                End If
            ElseIf Genre = 10 Then
                If Station <= 1 Then
                    Station = 9
                Else
                    Station -= 1
                End If
            End If
            StationsChecker()
        End Sub
        Private Sub ChangeGenreToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeGenreToolStripMenuItem.Click
            If Genre >= 10 Then
                Genre = 1
            Else
                Genre += 1
            End If
            Genrechecker()
            StationsChecker()
        End Sub
    #End Region
    #Region "Animation"
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            If tick = 0 Then
                btn_Genre.BackgroundImage = My.Resources.Changer
                tick = 1
                Timer1.Stop()
            Else
                btn_Genre.BackgroundImage = My.Resources.Changer_2
                tick -= 1
            End If
        End Sub
    #End Region
    End Class

    • Moved by Jie Bao Monday, February 27, 2012 8:24 AM (From:Visual Basic General)
    Saturday, February 25, 2012 8:23 PM

Answers

All replies