Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. VB6 - far from dead!

VB6 - far from dead!

Scheduled Pinned Locked Moved The Lounge
c++csharpphpvisual-studio
79 Posts 31 Posters 67 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M MSBassSinger

    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.

    L Offline
    L Offline
    luke_g
    wrote on last edited by
    #67

    This[^] article?

    1 Reply Last reply
    0
    • N Nish Nishant

      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

      R Offline
      R Offline
      Rosenne
      wrote on last edited by
      #68

      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.

      S 1 Reply Last reply
      0
      • L luke_g

        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. :/

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #69

        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

        1 Reply Last reply
        0
        • V VLAZ55

          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.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #70

          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

          1 Reply Last reply
          0
          • M Member 4612192

            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.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #71

            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

            1 Reply Last reply
            0
            • L luke_g

              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. :/

              C Offline
              C Offline
              Chris Rickard
              wrote on last edited by
              #72

              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.

              L 1 Reply Last reply
              0
              • R Rosenne

                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.

                S Offline
                S Offline
                Shady George
                wrote on last edited by
                #73

                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?

                1 Reply Last reply
                0
                • B BobJanova

                  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.

                  D Offline
                  D Offline
                  Dan Neely
                  wrote on last edited by
                  #74

                  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

                  R 1 Reply Last reply
                  0
                  • N Nish Nishant

                    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

                    V Offline
                    V Offline
                    Vladimir Vorobiev
                    wrote on last edited by
                    #75

                    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.

                    1 Reply Last reply
                    0
                    • C Chris Rickard

                      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.

                      L Offline
                      L Offline
                      luke_g
                      wrote on last edited by
                      #76

                      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. :)

                      1 Reply Last reply
                      0
                      • N Nagy Vilmos

                        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

                        I Offline
                        I Offline
                        IAbstract
                        wrote on last edited by
                        #77

                        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 ...

                        1 Reply Last reply
                        0
                        • S S Houghtelin

                          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.

                          I Offline
                          I Offline
                          IAbstract
                          wrote on last edited by
                          #78

                          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.

                          1 Reply Last reply
                          0
                          • D Dan Neely

                            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

                            R Offline
                            R Offline
                            ravanbak
                            wrote on last edited by
                            #79

                            VB.WTF, I like that. I'm working with tens of thousands of lines of VB.WTF code it's almost impossible to just upgrade. I'm slowly refactoring the VB6 code and eventually upgrading will become feasible.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups