salut, en vb net tu dois avoir un truc dans le genre:
//booléen si ton ordi est connecté au réseau
If My.Computer.Network.IsAvailable = True Then
MsgBox("ordi connecté")
Else
MsgBox("ordi non connecté")
End If
//après tu un ping sur un site pour voir si tu as une réponse
Dim pingOk AsBoolean = False
pingOk = My.Computer.Network.Ping("
http://www.vulgarisation-informatique.com/")//et puis après tu utilises ton booléen pingOk comme argument dans ta condition
if pingOk=true then ....else....end if