G
Guest
If the network cable is unplugged I need to change an image on my main form
status bar, however this does not work
' The computer has been connected or disconnected from the network
If e.IsNetworkAvailable = False Then
My.Forms.MainForm.usbtest.Panels(2).Appearance.Image =
My.Resources.server_error
Else
My.Forms.MainForm.usbtest.Panels(2).Appearance.Image =
My.Resources.server_ok
End If
If I put the following in the main form load it works fine
usbtest.Panels(2).Appearance.Image = My.Resources.server_ok
status bar, however this does not work
' The computer has been connected or disconnected from the network
If e.IsNetworkAvailable = False Then
My.Forms.MainForm.usbtest.Panels(2).Appearance.Image =
My.Resources.server_error
Else
My.Forms.MainForm.usbtest.Panels(2).Appearance.Image =
My.Resources.server_ok
End If
If I put the following in the main form load it works fine
usbtest.Panels(2).Appearance.Image = My.Resources.server_ok