VB6 - far from dead!
-
1 - I want to see that in practice, it doesn't make too much sense. For what I've seen, it hardly requires minimal changes. The API's are completely different, UI controls are completely different, many don't even have an equivalent on the .net platform. Native unsafe calls to the OS are not required on many cases on .net because there's a wrapper built for most of them already. This alone can inherit lots of unsafe code. And in the end if it's easy to convert VB6 to VB.Net, then it's seamless to convert VB.Net code to C# code. Same methods, same framework. 2 - Not really, I'd like to think the opposite. Trying to convert VB6 code to VB.Net will inherit the whole model that lacks the OO principles down to the basic level like inheritance. Converting to C# will force to really rewrite it and give it a chance to design a domain model that take advantages of OO design patterns and principles. Fixing the VB6 code is just like patchin a hole in the old boat. 3 -
MSBassSinger wrote:
C# does have a bigger community, but every C# developer I've worked with not only switches to VB.NET easily (since most of the knowledge requirement is the .NET framework). Any good .NET developer should know both C# and VB.NET
Agreee
MSBassSinger wrote:
but when they discover VB.NET's advantages to the developer,
Don't agree. C# and VB.Net have their own advantages and disadvantages. Personally I prefer C# for it's more declarative and do less stuff behind the scenes and is less forgiving to bad practices. This is where it becomes more religious. 4 - I was trying to say in a general way, not your case specifically. In that sense I don't think it's a valid argument that converting to VB.Net instead of C# will save money. There are too many factors involved to make such statement.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
1. If I had the time, I'd say send me a VB6 prgram you think is as OO as VB6 can do, but won't convert well. 2. Who says VB6 doesn't do both interface and binary inheritance? It doesn't do it like .NET and Java, but it does do it. 3. C# has advantages for people with a C, C++, or Java background. VB.NET has advantages for those with a VB6 background. VB.NET is just as unforgiving as C# if properly configured, but like VB6, it does allow a slight looseness that allows a programmer to do stupid things. 4. C#, like Java, takes a little longer to code. In large projects, that adds up. All the arcane legacy stuff that C# brings in to make it comfortable to C, C++, and Java programmers takes time. I've gone head-to-head with very capable Java and C# programmers on the same set of requirements, and the VB.NET is finished sooner without sacrificing quality, stability, scalability, comemnts, documentation, etc.)
-
Windows 7 Pro 64 bit, SP1. I and my coworkers have the VB6 IDE, VS2005, and VS2010 installed. All 3 IDE executables (and their shorcuts) are set to "run as Administrator". The VB6 and VS2005 IDEs have their OS compatibility set to run in XP SP3 compatibility mode as well.
Mine is also set for compatibility with XP SP3. I ran it just now as administrator and it bombed on
Debug.Print DateDiff("d", #10/26/2011#, #11/30/2011#)
with "invalid procedure call or argument". Same code works fine in VB6 under XP Mode. I get the same when I right-click the shortcut and select Run As Administrator as well as turning on the option in the shortcut's properties. I guess I've hit an edge case somewhere along the lines. :/
-
VB6 can be used, and MS recommended so when .NET was in beta, as a purely OO language, though some of the OO implementation is clunky (which means manual correction when converting from VB6 to VB.NET). You are correct on the conversion of usage with some 3rd party controls, but I have not run into the problems it sounds like you have with VB6 programs for those programs I designed. With the legacy code I inherited, all I can say is that even AI is not sufficiently advanced to unravel spaghetti code and spaghetti objects. :) I agree that where the MS user control APIs are significantly different, it will take a little coding. I wish I could find the online article MS published back in 1999/2000 on how to prep VB6 apps for .NET. It was a huge help.
MSBassSinger wrote:
VB6 can be used, and MS recommended so when .NET was in beta, as a purely OO language
There's no way VB6 can be used as a purely OO language. Again, the most basic feature of OO like inheritance is missing in VB6. You can, however, "mimic" inheritance on VB6, but that's hardly something to say about an OO language. Or like MS says on it's article on MSDN: "Arranging" Inheritance in VB6[^] ;P
MSBassSinger wrote:
but I have not run into the problems it sounds like you have with VB6 programs for those programs I designed.
It maybe so, but trying to make a FlexGrid a DataGridView is hardly a painless experience X| Basic controls like comboBoxes, textBoxes or listViews are ok, but things get ugly on more complex controls.
MSBassSinger wrote:
I wish I could find the online article MS published back in 1999/2000 on how to prep VB6 apps for .NET. It was a huge help.
I bet it was, but the cases I got, it'd need a miracle to be enough :^)
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
-
1. If I had the time, I'd say send me a VB6 prgram you think is as OO as VB6 can do, but won't convert well. 2. Who says VB6 doesn't do both interface and binary inheritance? It doesn't do it like .NET and Java, but it does do it. 3. C# has advantages for people with a C, C++, or Java background. VB.NET has advantages for those with a VB6 background. VB.NET is just as unforgiving as C# if properly configured, but like VB6, it does allow a slight looseness that allows a programmer to do stupid things. 4. C#, like Java, takes a little longer to code. In large projects, that adds up. All the arcane legacy stuff that C# brings in to make it comfortable to C, C++, and Java programmers takes time. I've gone head-to-head with very capable Java and C# programmers on the same set of requirements, and the VB.NET is finished sooner without sacrificing quality, stability, scalability, comemnts, documentation, etc.)
MSBassSinger wrote:
1. If I had the time, I'd say send me a VB6 prgram you think is as OO as VB6 can do, but won't convert well.
Ok, maybe it's not as OO as VB6 can do, but then, that's only part of the story. If I could control how VB6 projects were first designed, well I'd be living a dream.
MSBassSinger wrote:
2. Who says VB6 doesn't do both interface and binary inheritance? It doesn't do it like .NET and Java, but it does do it.
These are just two aspects of an OO language, there's much more to it. And interface, yes a little different (COM) but yes, you can do it. But inheritance, you need to mimic it. And I can keep going, on abstract classes, no trully polimorphism, no concept of abstraction and so on... 3. I wasn't really getting to the background, but yeah, got ya.
MSBassSinger wrote:
All the arcane legacy stuff that C# brings in to make it comfortable to C, C++, and Java programmers takes time
That's questionable, I don't think there is anything arcane about C#. And productiveness I'd say is more about the developer skill on the language than the language itself. This is just my opionion though.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
-
At least on CP: http://www.codeproject.com/script/Answers/List.aspx?tab=active&tags=75[^] Why are people still using this? I mean why not VB.NET? [I don't believe that people using VB6 would use the native code vs managed code argument]
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
I use it because I know it, and for the kinds of programming I do (small projects) it is a fast way to get the work done. It lacks nothing I need. There is no benefit to using anything else.
-
VB6 can be used, and MS recommended so when .NET was in beta, as a purely OO language, though some of the OO implementation is clunky (which means manual correction when converting from VB6 to VB.NET). You are correct on the conversion of usage with some 3rd party controls, but I have not run into the problems it sounds like you have with VB6 programs for those programs I designed. With the legacy code I inherited, all I can say is that even AI is not sufficiently advanced to unravel spaghetti code and spaghetti objects. :) I agree that where the MS user control APIs are significantly different, it will take a little coding. I wish I could find the online article MS published back in 1999/2000 on how to prep VB6 apps for .NET. It was a huge help.
-
At least on CP: http://www.codeproject.com/script/Answers/List.aspx?tab=active&tags=75[^] Why are people still using this? I mean why not VB.NET? [I don't believe that people using VB6 would use the native code vs managed code argument]
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
My company has a solid code base in VB6. When VB.NET appeared we tried the automatic conversion and it would not work. Also it is rather pointless - the code is not object oriented. We did convert, or rather rewrote, our infrastructure code for C# and Java, and we use them for new projects, but the existing projects work well and there is no reason to fiddle with them. We did need to change the data component from mdb, and we chose xml.
-
Mine is also set for compatibility with XP SP3. I ran it just now as administrator and it bombed on
Debug.Print DateDiff("d", #10/26/2011#, #11/30/2011#)
with "invalid procedure call or argument". Same code works fine in VB6 under XP Mode. I get the same when I right-click the shortcut and select Run As Administrator as well as turning on the option in the shortcut's properties. I guess I've hit an edge case somewhere along the lines. :/
FWIW I just installed VB6 onto my 64-bit Windows 7 Ultimate system along with its ancillary tools, etc. No problems whatsoever. The forms designer is a bit slow when I have Aero running but switching to Win7 Basic mode returns the IDE to its usual speed. I have a couple of old projects still in VB6 and wanted to be able to maintain them and this thread got me thinking I'd give it a shot. Everything (including VSS) works in the 64-bit environment fine. -Max
-
I can't speak for everyone else, but my company has millions of lines of VB6 code and it takes time to convert over to .NET. Had MS made a decent conversion utility from VB6 to VB.NET we would have moved years ago. As it is, we are maintaining the old VB6 code, and writing new apps in .NET.
Member 2630113 wrote:
I can't speak for everyone else, but my company has millions of lines of VB6 code and it takes time to convert over to .NET. Had MS made a decent conversion utility from VB6 to VB.NET we would have moved years ago. As it is, we are maintaining the old VB6 code, and writing new apps in .NET.
In our operation we have entire subsystems based on VB6. Some of them are COM DLL's that have a customized interface to the calling executable so converting them to .Net would be a complete rewrite. There's simply too much specialized VB6 coding (along with some 3rd-party custom controls) that prevent any kind of "conversion". As these are subsystems to our main product - and our product is in maintenance mode it is completely unlikely the company will ever invest a cent in converting them, so VB6 is going to be part of the mix until the product is shut down. It will be many years, I believe, before that happens. We have about 1,000 enterprise level clients using it, and they ain't going to move to the new company's products quickly. VB6 IS the new COBOL. ;-) -Max
-
I use it because I know it, and for the kinds of programming I do (small projects) it is a fast way to get the work done. It lacks nothing I need. There is no benefit to using anything else.
Member 4612192 wrote:
I use it because I know it, and for the kinds of programming I do (small projects) it is a fast way to get the work done. It lacks nothing I need. There is no benefit to using anything else.
... and that is enough reason to use it. :-) -Max
-
Mine is also set for compatibility with XP SP3. I ran it just now as administrator and it bombed on
Debug.Print DateDiff("d", #10/26/2011#, #11/30/2011#)
with "invalid procedure call or argument". Same code works fine in VB6 under XP Mode. I get the same when I right-click the shortcut and select Run As Administrator as well as turning on the option in the shortcut's properties. I guess I've hit an edge case somewhere along the lines. :/
Weird... I have Win7 SP1 x64 ADO Interface Hack VB6 SP6 I just tried that statement in a new project, no errors. I normally run Compatibility for Vista and disable Desktop Composition. I switched it to Compatability to XP SP3 and re-enabled Desktop Composition. Same thing.
-
My company has a solid code base in VB6. When VB.NET appeared we tried the automatic conversion and it would not work. Also it is rather pointless - the code is not object oriented. We did convert, or rather rewrote, our infrastructure code for C# and Java, and we use them for new projects, but the existing projects work well and there is no reason to fiddle with them. We did need to change the data component from mdb, and we chose xml.
I programmed in VB from it's onset when it was first published in Windows, and I can't remember if that was vb2 or 3. While it had it's drawbacks, (inheritance, polymorphism etc...) it worked, and for RAD there was no equal. There must be billions of lines of code out there still using VB6, and I was very puzzled when Microsoft withdrew support for it. I tend to live by the old engineers saying that 'If it ain't broke, don't fix it'. However, if anybody starts a project now, using VB, then they need their bumps read. Just as a bye the bye, has anyone tried using a dll written in VB as a reference in vb.net?
-
But upgrading VB6 (that isn't a horrible mess of spaghetti and implicit declarations that needs rebuilding anyway) to VB.net is nowhere near such a big hit, as most of the code will work with no or minor alterations.
VB.net is only an easy upgrade for good code. If you wrote VB.WTF it's still a total rewrite.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
At least on CP: http://www.codeproject.com/script/Answers/List.aspx?tab=active&tags=75[^] Why are people still using this? I mean why not VB.NET? [I don't believe that people using VB6 would use the native code vs managed code argument]
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
Nishant Sivakumar wrote:
Why are people still using this?
I wrote VB6 for 6 years. And the first impression of C# was "how many lines of code!" (as, indeed, in deplhi, which was very popular in Russia). For 4 years of using C# I gradually began to use many tricks to get the code concise. Plus new features of C#3, 4... I am satisfied now. But still I'm not sure that if VB6 had real inheritance, and had no problem of cyclic references, it would concede C# in applied programming.
-
Weird... I have Win7 SP1 x64 ADO Interface Hack VB6 SP6 I just tried that statement in a new project, no errors. I normally run Compatibility for Vista and disable Desktop Composition. I switched it to Compatability to XP SP3 and re-enabled Desktop Composition. Same thing.
Hmm...I guess it's high time for a reinstall of VB under Windows 7, since I seem to be the only one having issues. :sigh: My VB6 installation did work in the beginning, but something (before SP1) broke it, and I have no idea what it was. So, even though it's not *as* convenient, keeping my dev environment in a vm still appeals to me for the benefit of insulation from changes to the host o/s. Thanks, everyone, for letting me know that it's at least worth my time to try a reinstall. :)
-
In defence of some software houses the cost of upgrading from VB6 has been too high. Where I worked previously, their was a multiyear project to move everything from VB6 to C#, but it couldn't be done in one hit. The plan when I left was that it would take another 2-3 years.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
Same here. Previous employer has an enterprise app originally written from Access/VB6. Slowly being converted to VB.Net. Painful in all respects ...especially since I am a C# dev. I'll admit knowledge of VB only if it would save someone's life. Upgrading from VB6 to VB.Net is only as costly as shops allow it to be. Honestly, I think it costs more to convert module-by-module than it would to simply rewrite. Since VB was never intended to be an OOP language, trying to make it so just seems silly. Keeping VB around would make more sense if COM and ActiveX support were needed for more than legacy support. Additionally, MS should have kept VB as it's own language - it would have felt natural to the VB programmer to use COM/ActiveX components to access .Net assemblies. My .015 cents ...
-
harold aptroot wrote:
VB6 not broke?
Not VB in so much as those who abuse the um... "forgiving" nature of VB6 when it comes to stuff like loose variable declaration, hell you don't even need to declare a variable to use one. :) The beauty of VB6 was that they made it simple enough that a child could use it to program. Unfortunately most of the users program like children. :~
It was broke, so I fixed it.
S Houghtelin wrote:
The beauty of VB6 was that they made it simple enough that a child could use it to program. Unfortunately most of the users program like children.
...and I would add that, as long as there is a flavor of VB on the market, we will continue to see this trend; although I would describe VB devs in a slightly different way - as non-OOP.
-
VB.net is only an easy upgrade for good code. If you wrote VB.WTF it's still a total rewrite.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt