VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Easy and professional way to check user's IP Address and HostName (easy code to learn and use, lots

by Capp00 (8 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 26th June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Easy and professional way to check user's IP Address and HostName (easy code to learn and use, lots of comments)

Rate Easy and professional way to check user's IP Address and HostName (easy code to learn and use, lots



'********************************
'Written and Tested in VB 6.0 by Andy P.
'********************************
'Start a new standard project
'Add a Winsock Component (Project | Components | Microsoft Winsock Control)
'Add a Command button (command1)
'Add this code under the command button

Private Sub Command1_Click()
   Dim strIP as string
   Dim strName as string
     strIP = Winsock1.LocalIP         'Captures IP Address and stores it
     strName = Winsock1.LocalHostName 'Captures Host Name and stores
   msgbox "Your IP Address is: " & strIP & vbCrLf & vbCrLf &  _
          "Your HostName is: " & Ucase(strName)   'Seperates the 2 in a msgbox
End Sub

'And this will create a message box pop up that will tell you both items
'in a nice message box that can be cleared by just clicking ok
'very simple yet professional for administration
'Questions/comments? email me 

Download this snippet    Add to My Saved Code

Easy and professional way to check user's IP Address and HostName (easy code to learn and use, lots Comments

No comments have been posted about Easy and professional way to check user's IP Address and HostName (easy code to learn and use, lots. Why not be the first to post a comment about Easy and professional way to check user's IP Address and HostName (easy code to learn and use, lots.

Post your comment

Subject:
Message:
0/1000 characters