Tuesday, June 4, 2013

How To Check Internet Connection In VB 6



Hi I am back again, this time I will share the knowledge how do I check the internet connection using visual basic clasic 5-6
Immediately Alright Prepare:
- Open the Visual Basic
- Select Standard Exe
- Make 1 Form
- Create 1 Button

- Create 1 Module
The Only thing we need to code themselves let's go:
Enter the Code Below to Create a Button That Has You:

If IsConnectedToInternet = True Then
MsgBox "Internet Conntected",vbInformation
Else
MsgBox "Not Connected",vbExclamation
End if

Enter This Code Here Into Module:

Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef _
    lpSFlags As Long, ByVal dwReserved As Long) As Long

Const INTERNET_CONNECTION_MODEM = 1
Const INTERNET_CONNECTION_LAN = 2
Const INTERNET_CONNECTION_PROXY = 4
Const INTERNET_CONNECTION_MODEM_BUSY = 8

Public Function IsConnectedToInternet(Optional connectMode As Integer) As Boolean
    Dim flags As Long
    ' this ASPI function does it all
    IsConnectedToInternet = InternetGetConnectedState(flags, 0)
    ' return the flag through the optional argument
    connectMode = flags
End Function

Look This Is So Easy,Right?


1 comment:

  1. CONTACT: onlineghosthacker247 @gmail. com
    -Find Out If Your Husband/Wife or Boyfriend/Girlfriend Is Cheating On You
    -Let them Help You Hack Any Website Or Database
    -Hack Into Any University Portal; To Change Your Grades Or Upgrade Any Personal Information/Examination Questions
    -Hack Email; Mobile Phones; Whatsapp; Text Messages; Call Logs; Facebook And Other Social Media Accounts
    -And All Related Services
    onlineghosthacker Will Get The Job Done For You
    onlineghosthacker247 @gmail. com
    TESTED AND TRUSTED!!!

    ReplyDelete