If CheckInternetConnection() = True Then MessageBox.Show("Your Computer is Connected to internet", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information) Else MessageBox.Show("Your Computer is not Connected to internet", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Application.Exit() End If
PHP كود :
Public Shared Function CheckInternetConnection() As Boolean Try Return My.Computer.Network.Ping("www.google.com") Return True Catch Return False End Try End Function
Public Shared Function CheckInternetConnection() As Boolean Try Return My.Computer.Network.Ping("www.google.com") Return True Catch Return False End Try End Function
ثانيا في الحدث Form Load ضع الكود التالي
PHP كود :
If CheckInternetConnection() = True Then MessageBox.Show("Your Computer is Connected to internet", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information) Else MessageBox.Show("Your Computer is not Connected to internet", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Application.Exit() End If
If CheckInternetConnection() = True Then MessageBox.Show("Your Computer is Connected to internet", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information) Else MessageBox.Show("Your Computer is not Connected to internet", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Application.Exit() End If
PHP كود :
Public Shared Function CheckInternetConnection() As Boolean Try Return My.Computer.Network.Ping("www.google.com") Return True Catch Return False End Try End Function
If CheckInternetConnection() = True Then MessageBox.Show("Your Computer is Connected to internet", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information) Else MessageBox.Show("Your Computer is not Connected to internet", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Application.Exit() End If
PHP كود :
Public Shared Function CheckInternetConnection() As Boolean Try Return My.Computer.Network.Ping("www.google.com") Return True Catch Return False End Try End Function
شغال تمام اشكرك على المجهود الرائع
امرك غريب
يعني ايش الفرق بين الكود اللي اعطيتك والكود هذا؟؟
اتمنى تكون صريح ولو مرة
If CheckInternetConnection() = True Then MessageBox.Show("Your Computer is Connected to internet", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information) Else MessageBox.Show("Your Computer is not Connected to internet", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Application.Exit() End If
PHP كود :
Public Shared Function CheckInternetConnection() As Boolean Try Return My.Computer.Network.Ping("www.google.com") Return True Catch Return False End Try End Function
شغال تمام اشكرك على المجهود الرائع
امرك غريب
يعني ايش الفرق بين الكود اللي اعطيتك والكود هذا؟؟
اتمنى تكون صريح ولو مرة
انا مقولتش حاجة والله انا بشكر الراجل والله لا تزعل
لا احد يزعل منى وشكرااااااااا لكل الاعضاء الى شارك فى الموضوع