|
-
Aug 7th, 2006, 01:06 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] IP Address
hi
wts the code for the IP Address to be viewed as string?
and is there also a code to create folder?
-
Aug 7th, 2006, 01:20 AM
#2
Fanatic Member
Re: IP Address
Create a folder:
VB Code:
My.Computer.FileSystem.CreateDirectory("C:\NewFolder")
Not sure how to find out the IP address from VB but the "ipconfig" utility can be used to display it.
-
Aug 7th, 2006, 01:23 AM
#3
Re: IP Address
Would this be for a web app?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 7th, 2006, 01:23 AM
#4
Thread Starter
Hyperactive Member
Re: IP Address
no.. its for the IP of the users comp
-
Aug 7th, 2006, 01:24 AM
#5
Re: IP Address
You could get the computer name and use that instead?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 7th, 2006, 01:27 AM
#6
Thread Starter
Hyperactive Member
Re: IP Address
no. The IP Address is needed.. i think its in the command Net. -
-
Aug 7th, 2006, 01:30 AM
#7
Fanatic Member
Re: IP Address
There are probably some third-party components you could use. I'll do a bit of research and let you know if I find anything... What kind of program are you making?
-
Aug 7th, 2006, 01:31 AM
#8
Re: IP Address
Ok here are a couple of ways to do it then.
VB Code:
Imports System.Net
Imports System.Net.Sockets
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ipHostInfo As IPHostEntry = Dns.Resolve(Dns.GetHostName())
MsgBox(ipHostInfo.AddressList(0).ToString)
End Sub
VB Code:
MessageBox.Show(Net.Dns.GetHostByName(System.Environment.MachineName).AddressList(0).ToString)
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 7th, 2006, 01:37 AM
#9
Thread Starter
Hyperactive Member
-
Aug 7th, 2006, 01:37 AM
#10
Thread Starter
Hyperactive Member
Re: IP Address
 Originally Posted by dom_stapleton
There are probably some third-party components you could use. I'll do a bit of research and let you know if I find anything... What kind of program are you making?
web stuff
-
Aug 7th, 2006, 01:38 AM
#11
Fanatic Member
Re: [RESOLVED] IP Address
Both of them work for me! Cheers, RobDog, they might come in handy in the future. Although VS 2005 advised that I replace both Resolve and GetHostByName with GetHostEntry instead, as they are obselete. Probably not vitally important but worth nothing I suppose...
-
Aug 7th, 2006, 01:40 AM
#12
Re: [RESOLVED] IP Address
Thanks. 
Yes, its 2003 code so I cant say what changed in 2005.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|