Question my.computer.network question...

ianr900

Member
Joined
Jul 13, 2006
Messages
18
Location
UK
Programming Experience
3-5
I'm using VB .NET (2003) and I can't seem to get VB to recognise the My.Computer... method. It tells me the name 'My' is not declared:

Code:
Imports System.Net.Sockets
Imports System.Runtime.InteropServices
Imports System
Imports System.Net
Imports System.Net.NetworkCredential
Imports System.Text
Imports System.Windows.Forms.Form

Namespace System.Name
	Public Class Form1
		Sub MyPing()
			If My.Computer.Network.Ping("198.01.01.01") Then
				MsgBox("Server pinged successfully.")
			Else
				MsgBox("Ping request timed out.")
			End If
		End Sub
	End Class
End Namespace
Is this because my version of VB .NET doesn't support this method? Or am I doing something wrong?
\Thx
 

ianr900

Member
Joined
Jul 13, 2006
Messages
18
Location
UK
Programming Experience
3-5
Thanks John. I had a feeling it might be that!
Ian
 
Top Bottom