|
-
May 27th, 2007, 09:32 AM
#1
Thread Starter
Junior Member
Change IP in VB 2005
I'm still new to VB 2005. I found the source code I want to use, but it's in VB6. I'm having trouble changing it to VB 2005. Is there a converter that I can use or some to help? Here is a link to the code http://www.msfn.org/board/lofiversio...hp/t70524.html .
Thanks,
Tony
-
May 28th, 2007, 03:39 AM
#2
Re: Change IP in VB 2005
Could you show us the code so we could possibly convert it... That link does not go exactly to the code.
-
May 28th, 2007, 05:46 PM
#3
Thread Starter
Junior Member
Re: Change IP in VB 2005
Sorry, here it is as an attachment....
vb6code.txt
Thanks,
Tony
-
Jun 4th, 2007, 04:39 PM
#4
Re: Change IP in VB 2005
1) If you're connected directly to your provider (no router or routing modem), this will break your connection, since the provider won't know your new address.
2) If you're behind a router there's no need to do it, since your IP isn't visible outside your router.
3) Loading the file into a new solution should trigger VB.Net's conversion process.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jun 4th, 2007, 09:03 PM
#5
Thread Starter
Junior Member
Re: Change IP in VB 2005
The code does not convert well into VS 2005. That is why I'm asking for help. I'm slowly learning things, but I'm still new to VB.
-
Jun 4th, 2007, 10:16 PM
#6
Re: Change IP in VB 2005
Internet IP addresses are assigned by your ISP. Not by your NIC.
Changing the IP on a dial up connection usually just means disconnecting and re-connecting to the internet. To change one on a broadband connection requires you to change a byte in one of the last 3 octets of your MAC address on your NIC/router. Then unplug the modem, chord, whatever and plug it back in to reconnect (wouldn't recommend doing this).
Not sure how that code plans on changing the "IP on the adapter".
-
Jun 4th, 2007, 11:15 PM
#7
Member
Re: Change IP in VB 2005
I use some console app written in C which you just provide a MAC address of your choice as usage and click enter it would set a new GUID in registry editing your MAC Address than it would reconnect your networking (killing off your internet) for like 30 seconds than when it reconnects you have a new IP.. It was risky for me to do because first time it didn't reconnect becasue my ISP only allowed my MAC's last XX-XX-XX-(XX) HEX digits to be changed +1/-1 If I over did it I had to call my company or I was stuck without internet.
-
Jun 5th, 2007, 12:40 PM
#8
Thread Starter
Junior Member
Re: Change IP in VB 2005
I'm wanting to write a progarm that will let me change between static ip and dhcp without going thru the windows way. This is for my work and it's to slow.
-
Jun 7th, 2007, 10:21 AM
#9
Thread Starter
Junior Member
Re: Change IP in VB 2005
Can anyone help me with this code?
-
Jun 7th, 2007, 04:13 PM
#10
Re: Change IP in VB 2005
 Originally Posted by akernan
I'm wanting to write a progarm that will let me change between static ip and dhcp without going thru the windows way.
You have to use Windows somehow - you can't access hardware directly after Windows 95.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jun 7th, 2007, 04:25 PM
#11
Thread Starter
Junior Member
Re: Change IP in VB 2005
Can you convert the code for me? It's in VB 6, VS2005 doesn't convert it cleanly.
-
Jun 8th, 2007, 08:49 AM
#12
Thread Starter
Junior Member
Re: Change IP in VB 2005
I guess I need to rephrase. I'm looking for away to change the ip address with a program and not use netsh. I found the code I want to work with but it is in VB6 and does not convert to VS2005 nicely.
/Rant on /
Guys I've been in the IT field for 20 yrs, mostly in networking. I don't need a lesson in IP or MAC addresses. I just need help converting this code. If you can convert it, great. It is very much appreciated. If not, let me know. It's no big deal, I'll just go somewhere else and try.
/Rant Off/
Sorry if I hurt anybodies feelings or upset anyone with my little rant. You all have been very understanding and helpful with my other questions.
Thanks,
Tony
-
Jun 9th, 2007, 04:43 PM
#13
Re: Change IP in VB 2005
 Originally Posted by akernan
I guess I need to rephrase. I'm looking for away to change the ip address with a program and not use netsh. I found the code I want to work with but it is in VB6 and does not convert to VS2005 nicely.
/Rant on /
Guys I've been in the IT field for 20 yrs, mostly in networking. I don't need a lesson in IP or MAC addresses. I just need help converting this code. If you can convert it, great. It is very much appreciated. If not, let me know. It's no big deal, I'll just go somewhere else and try.
/Rant Off/
Sorry if I hurt anybodies feelings or upset anyone with my little rant. You all have been very understanding and helpful with my other questions.
Thanks,
Tony
It's cool, I understand your frustration. Sometimes it can be hard to get a direct answer to your question without getting replies like mine.
I don't know .NET but maybe I can work out something. I'll look over it later when I'm not so drunk.
-
Jun 10th, 2007, 05:19 AM
#14
Thread Starter
Junior Member
Re: Change IP in VB 2005
Thanks for trying, that is all that can be asked.
Tony
-
Jun 18th, 2007, 05:59 AM
#15
Thread Starter
Junior Member
Re: Change IP in VB 2005
Can anyone help to convert this code?
-
Jun 22nd, 2007, 09:12 AM
#16
Re: Change IP in VB 2005
The conversion is pretty simple - correct the few errors (like changing the Object types to VariantType and 'L = LSet(B) to L = B.B4 + CLng(16) * B.B3 + 256 * B.B2 + 65536 * B.B1.
The only problem I have is that neither one - VB6 or VB 2005 - changes my IP. I haven't debugged it to find out why.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
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
|