Paul Yuknewicz, Lead Program Manager on the Visual Studio team, discusses Visual Basic 6 runtime and IDE support options as well as proven techniques, tools and best practices for interoperability and gradual, phased migration to .NET. Read the Official Support Statement on Windows 7, Windows Vista, and Windows XP
Visit the Visual Basic 6 Migration page on the Visual Basic 6 Resource Center for tools and information on how to plan and execute a gradual, phased migration to .NET.
It's great to see a statement come out for Win7. Great (<groan>) to see VB6 last another decade.
Paul, You made a gallant plea for migrants, but did you sell? I doubt it. You have the same battle as MS has with XP and Vista. Doubts.
How can you possibly encourage me to drop VB5.0 and migrate to VB.NET when VB.NET cannot do - I repeat CANNOT DO - what I can easily do on VB5. Why should I be so foolish as spend $1000 or more for VS2010 if it DOES NOT DO THE JOBS I need to do, and can do now.
For example, my most-used VB5.0 program processes astronomical images up to 80Mb in size, reducing image noise and reducing tonal range in stacked images, as well as doing metric and statistical work on the images. To achieve that, I use pointers to read bitmap data as both one and two dimensional arrays. I will NOT use lockbits for this purpose - at 72 yoa I cannot afford to wait for several GB of pixels to be moved back and forth between managed and unmanaged memory. And having left get and put long ago I have no desire to type those again. Dot NET may have advantages but it takes TIME coding,TIME compiling and ?TIME running. In addition, I call assembler routines which obviously use memory locations. VB.NET and C# cannot cope.
If you ARE really desperate to get VB6 (and us real sceptics of VB5 and earlier) over to VB.NET you MUST maintain the coding tools of VB6. All your pleas MUST fall on deaf ears otherwise. You must see that. How cam interop rework code, that uses memory moves, to a platform that does not recognise them.
I don't want the dog's dinner of pointer rubbish that litters C and C++. I am in the desperate situation of going ther. I hate it so far. I know plenty of C and C++ programmers who don't want it either! Just give me back:
1) VARPTR on any damn thing I want. Don't worry about the GC - you can restrict to proc to GLOBAL or STATIC which are outside its range. But give them back to me.
2) Clean methods to put them wherever I want to - pointers to array structures and data, bitmaps and bitmap data, and any user defined data structure.
And please don't tell me its too hard. DotNET is doing it ALL THE TIME. Then you may be in time to sell me VS2013!
But thanks for at least keeping the tenor of VB alive. As I said somewhere else, VB is a natural language worth far more than its image in some communities. I now spend a lot of time talking to my computer (Dragon Naturally Speaking). I don't let it talk back. It might win!! But even computer programming could move that way. Then I hope the conversation would be like that between Dillon and Andromeda than between the ?Arkona guru and his computer.
On a related matter, what in hell is MS doing pushing yet another new general purpose language. We have enough. Its getting bad enough with image formats. Absorb the F# team and make VB more powerful that it was before .NET (and, OK, even C# can benefit too, though heaven knows why).
Email me direct if you need to
Regards
Ron
You can write a few shim methods for that especific duties with C# (it can handle pointer arithmetics) or even C++ .NET if you need more hardcore stuff (which I doubt you do with VB5/6), while reusing the rest of the code in VB.NET seamlessly. Also taking a look to the System.Runtime.Marshalling, class is very usesful when dealing with allocations you metion or memory allocated somewhere else.
Perhaps a if you can give I little example of the things you intend to do, I can help you more (although experienced, not that I am a guru by any strech of the imagination)
Also I think that you are more affected by the fact that .net framework is type safe, and that VB inherited some of that on its pass to the framework. And thats a good thing. The fact that you have stabilized your product doesn't means that type unsafety is a good thing.
I think you can do that sort of thing in C# unsafe code; you might be able to code just the portions that need it in C# or native C++ and the rest in VB.NET. You could be right though that in your particular situation you might be best off just sticking to classic VB; my impression though is that your situation is rare (i.e. most VB programs do not make extensive use of pointer trickery etc.)
and guys, please do not absorb the F# team.
Yes with C# unsafe you can achieve all the pointery goodness you can do in VB and C/C++. Hell you can even execute Assembly code in C# when compiled in unsafe. PTR's, Marshalling and other structures existin .NET/C# to support this type of situation. It's one of the things I love about C# the most, it's versatility. It can be a modern garbage collected language with LINQ, Delegates and Parallel extensions thrown in or you can write it like cleaner C++ and do some crazy native type stuff.
+1000
Absolutely, love C# for the same reason.
Sounds like a failure to understand* the idea behind .Net, which is reuse of libraries written in different languages and through a common intermediate language. There no longer is any reason to have one glorified language (although the idea still lurks). (* Not on your part, contextfree)
I have always wondered this too. I hope people start to think before they do things!
From the Pregnancy Miracle guy
G'day Paul.
Well, you did ask what I want to do!
I have a REAL LARGE BITMAP defined GLOBAL in VB -- the image -- BM1 (20 Mp; ie 80Mb as ARGB).
C/C++ returns nothing -- the job is done in situ. On return to VB the following should be true:
Assembler accesses the BM1.pvBits
I would be happy to stay with VB 5.0 were it not that the camera control SDK needs VB.NET Is the SAFEARRAY structure still describing arrays in VB.NET What pointer type problems do I have in C/C++? Which C/C++ dialect should I use -- what headers. How does .NET deal with pointers to foreign objects in GLOBAL (unmanaged) memory How does native C deal with .NET C++ .NET will not build 2D arrays in GLOBAL scope -- in this case does it know it has?
A fair number of issues for someone who hasn't needed to use C for nearly 20 years! I have a lot to learn.
But seriously, there is ONLY ONE WAY to get VB6ers onto VB.NET. You must be able to say TRUTHFULLY -- "VB.NET WILL DO EVERYTHING THAT VB6 DOES - AND MORE." But even then you have a clumsy technology which I suspect many C/C++ guys don't use.
Until you can say that,, you are largely wasting your time. Trust requires a proven track record of backward compatibility. A workaround is a pain at best and it means YOU FAILED. You ARE behind schedule with this and the VS bottom line suffers accordingly! But what did Luca PROMISE me?
Regards, Ron
C++ .NET it seems, does not redefine global arrays and only defines them outside of routines?
This will have to be done for each image as the BM1.pvBits will occupy different memory -- I KNOW, CLEAN UP NEEDED!!!
WORRIES and DOUBTS: