JackOfPH
asked on
System.net.networkInformation.ping causes my application to hang...
I created a class that will monitor if a certain device(with IP address) is connected to my network. But the method I am using causes my Application to hang...
Any ideas on how to achieve this?
Below is the code I am using... (Visual Basic 2005)
Private Sub TimerTick(ByVal sender As System.Object, ByVal e As System.EventArgs)
'Application.DoEvents()
''System.Threading.Thread. Sleep(20)
'Dim pingDevice As New System.Net.NetworkInformat ion.Ping
'If pingDevice.Send(_IPAddress ).Status = Net.NetworkInformation.IPS tatus.Succ ess Then
' AddHandler FingerPrintDevice.OnAttTra nsaction, AddressOf FingerScanningTransaction
' _isDeviceConnected = True
'Else
' RemoveHandler FingerPrintDevice.OnAttTra nsaction, AddressOf FingerScanningTransaction
' _isDeviceConnected = False
'End If
'RaiseEvent DeviceStatus(_DeviceID, _DeviceName, _IPAddress, _isDeviceConnected)
End Sub
Any ideas on how to achieve this?
Below is the code I am using... (Visual Basic 2005)
Private Sub TimerTick(ByVal sender As System.Object, ByVal e As System.EventArgs)
'Application.DoEvents()
''System.Threading.Thread.
'Dim pingDevice As New System.Net.NetworkInformat
'If pingDevice.Send(_IPAddress
' AddHandler FingerPrintDevice.OnAttTra
' _isDeviceConnected = True
'Else
' RemoveHandler FingerPrintDevice.OnAttTra
' _isDeviceConnected = False
'End If
'RaiseEvent DeviceStatus(_DeviceID, _DeviceName, _IPAddress, _isDeviceConnected)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the tipo...
ASKER
:)