VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Check Connection

by DXB700 (3 Submissions)
Category: Complete Applications
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (9 Votes)

This code will check if a connection is opened to the internet , if not , it will show a messagebox ! easy ... i like this way because am a new programmer!!!

Assumes
1- Add mswinsck.ocx to the form 2- Add a command button to the form (Caption = Detect) 3- Add a text box to the form (Visible = false) 4- Copy Code !!

Rate Check Connection

Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "No Connnection!"
Else
MsgBox "Connection Detected"
End If
End Sub
Private Sub Form_Load()
Text1.Text = Winsock1.LocalIP

End Sub
'Easy ha ? .. This is the way i like it !!

Download this snippet    Add to My Saved Code

Check Connection Comments

No comments have been posted about Check Connection. Why not be the first to post a comment about Check Connection.

Post your comment

Subject:
Message:
0/1000 characters