Hi, i made a software that plays live stream and check the internet connectivity ...
in case of internet is down how AxWindowsMediaPlayer will refresh and starts playing again ????
this is the code for checking internet connectivity
the refresh line for AxWindowsMediaPlayer is not working
and this is the code for playing stream
Thank you in advance ...
in case of internet is down how AxWindowsMediaPlayer will refresh and starts playing again ????
this is the code for checking internet connectivity
the refresh line for AxWindowsMediaPlayer is not working
VB.NET:
Imports Microsoft.Win32Public Class Form1
Dim internetStatus As Boolean
Dim station As String
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles InternetCheck.DoWork
System.Threading.Thread.Sleep(1000)
If My.Computer.Network.IsAvailable Then
internetStatus = True
Else
internetStatus = False
End If
End Sub
Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles InternetCheck.RunWorkerCompleted
If internetStatus = True Then
green.Visible = True
red.Visible = False
AxWindowsMediaPlayer1.Refresh()
Else
red.Visible = True
green.Visible = False
End If
InternetCheck.RunWorkerAsync()
End Sub
and this is the code for playing stream
VB.NET:
If ComboBox1.SelectedItem = "Live Radio" Then
station = "http://liveradio.com"
AxWindowsMediaPlayer1.URL = station
Thank you in advance ...