5 Replies - 2267 Views - Last Post: 22 January 2009 - 11:17 AM Rate Topic: -----

#1 bolson50   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 09-January 08

[Resolved]VB9 send\receive ping information

Posted 21 January 2009 - 12:34 PM

i am trying to ping some terminals and all i could find for code is this

			If My.Computer.Network.Ping(IPaddress, 1000) Then
				MsgBox(IPaddress & " pinged successfully.")
			Else
				MsgBox(IPaddress & " request timed out.")
			End If


it keeps comming up request timed out message. and i got this from microsoft. instead of a message box i am going to return the response
to a listview control but i have to get a successful message first.

anyone have any ideas

bruce

This post has been edited by bolson50: 22 January 2009 - 11:18 AM


Is This A Good Question/Topic? 0
  • +

Replies To: [Resolved]VB9 send\receive ping information

#2 Jayman   User is offline

  • Student of Life
  • member icon

Reputation: 423
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: [Resolved]VB9 send\receive ping information

Posted 21 January 2009 - 01:57 PM

Are you able to ping those IP addresses from the command window?

You should probably increase the timeout to perhaps 3 seconds, Currently you have it set for only 1 second. If you have a lot of network traffic, then this could potentially cause it to timeout before it gets a response.
Was This Post Helpful? 0
  • +
  • -

#3 bolson50   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 09-January 08

Re: [Resolved]VB9 send\receive ping information

Posted 21 January 2009 - 02:29 PM

i am able to ping them with my vb6 program
and i have set the ping timeout up to 10 seconds
do you know if i have to import sockets
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: [Resolved]VB9 send\receive ping information

Posted 21 January 2009 - 02:38 PM

Where are you setting the value for IPAddress?
Was This Post Helpful? 0
  • +
  • -

#5 bolson50   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 09-January 08

Re: [Resolved]VB9 send\receive ping information

Posted 21 January 2009 - 07:05 PM

i create a pramater form check.text
and insert it into the string where IPaddress
is. here is the code i have
		Dim ipinger1 As String
		Dim IPing As String
		Dim itmx As ListViewItem

		If cbxIPing1.Checked Then
			ipinger1 = cbxIPing1.Text
			IPing = ipinger1
			cbxIPing1.Checked = False
			If My.Computer.Network.Ping(IPing, 1000) Then
			 MsgBox(IPing & " pinged successfully.")
			Else
				MsgBox(IPing & " request timed out.")
			End If
		End If


Was This Post Helpful? 0
  • +
  • -

#6 bolson50   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 09-January 08

Re: [Resolved]VB9 send\receive ping information

Posted 22 January 2009 - 11:17 AM

never mined i found the problem i miss typed the ip address
thanks again for all your help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1