[RESOLVED] Moving from VB6 to VB.NET 2010 - Need advice
Hi,
A few years ago I created an application using VB6. It works fine on all OS but considering vb6 is no longer supported and it lacks lots of features, I’ve decided to upgrade to VB.NET. Plus I also want my software to run on all future OS correctly. :bigyello:
I was using the ADODC control on many of my forms. In VB.NET, if I go to Tools > Choose Toolbox Items, I see ADODC under the “.NET framework components” tab. Can I still use this or is it outdated/no longer supported? If I use it, will my software work on 32bits and 64bits systems?
Another thing, in vb6 I had this code:
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory"(ByRef Destination As Any, ByRef Source As Any, ByVal Length As Integer)
But in VB.NET when I write this I get the error “As Any” is not supported in “Declare” statements. How should I write this in VB.NET? :confused:
Thank You, :wave:
Krishley
Re: Moving from VB6 to VB.NET 2010 - Need advice
You shouldn't have used and the ADODC control even in VB6. In .NET forget about connection controls and go with ADO.NET
VB6 was very liberal with how you would allowed to declare variables. As you found out, VB.NET is a bit more strict, which is a good thing.
This article might help specifically with Copy Memory: http://www.codeproject.com/KB/vb/CopyMemory_in_Net.aspx
Re: Moving from VB6 to VB.NET 2010 - Need advice
Hi Hack,
Thanks for that quick reply! I checked the link ("upgrading vb6 code to VB.NET) in your signature and that will help a lot :)
I've checked the CopyMemory link. Thanks. I have other declarations like this which include the "Any". Hope i'll be able to find all their VB.net equivalent.
Thanks,
Krishley
Re: Moving from VB6 to VB.NET 2010 - Need advice
I had (still have) lots of VB6 tools for work.
When I upgraded to 2010 I rewrote them; gave me the opportunity to rethink lots of bits, to drop lots of obsolete code, change the way some things were done. I did get a fair amount of change resistance from my users