Advertisement
ASP_Volume3 Internet/ HTML #47846

Check if user is Online

The code checks if the User is online or not. If he's online it will prompt a MsgBox "You are connected to the net.") or it will Show: "You are NOT connected to the net.". You can also insert your code. This code is useful when your application uses the internet. So if the user is not connected the net, the program will simply unload.

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
Private Type RASCONN
  dwSize As Long
  hRasConn As Long
  szEntryName(256) As Byte
  szDeviceType(16) As Byte
  szDeviceName(128) As Byte
End Type
Private Declare Function RasEnumConnectionsA& Lib "RasApi32.DLL" (lprasconn As Any, lpcb&, lpcConnections&)
Private Sub Command1_Click()
Dim Verbindung As RASCONN
Dim size, Anz As Long
 Verbindung.dwSize = 412
 size = Verbindung.dwSize
 If RasEnumConnectionsA(Verbindung, size, Anz) = 0 Then
  If Anz = 0 Then
  MsgBox ("You are NOT connected to the net.")
  Else
  MsgBox ("You are connected to the net.")
  End If
 End If
End Sub
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı