Hi all,
I have this code:
But the event never fires ...
I searched google and found exactly the same thing that I am doing, but apparently I must do something wrong.
Any suggestions would be appreciated.
Thanks in advance.
I have this code:
VB.NET:
AddHandler System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged, AddressOf NetAvailabiltyChanged
Public Sub NetAvailabiltyChanged(ByVal sender As Object, ByVal e As Net.NetworkInformation.NetworkAvailabilityEventArgs)
If Not e.IsAvailable Then
MessageBox.Show("Network not available", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("Network available", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
I searched google and found exactly the same thing that I am doing, but apparently I must do something wrong.
Any suggestions would be appreciated.
Thanks in advance.
Last edited: