VB6

Hi

It's been a while since I've done any VB programming, and I need to get back in to it for work purposes. I've quite a bit of experience at VB 6 programming and have lots of code and examples that I need to use again. Is the latest VB development package backwards compatible with VB6

I'm sure all of these questions have already been answered so appologies for that.

Thanks
John


Answer this question

VB6

  • Shailaja

    I totally agree Rob. For the type of applications I have I will see no great benefit from upgrading other than making it easier to maintain the code. It does look like it may be a labour intensive opperation though, when it surely didn't need to be that way.

     Robert Conley wrote:
    The problem is that is geared toward people trying to convert web apps and database front end is nearly useless for those of us with "traditional" application.

    The migration is crippled by the lack of compatibility objects for printing, graphics, and other basic features of the original VB6 langauge. In some cases (like clipboard, data types) it is a purely mechanical process to convert. In other cases (like printing, and graphics) the design of the .NET equivalent is radically different requiring a code re-write. (Printing is event driven in .net, GDI+ scaling is vastly different, GDI+ is stateless, etc).

    Microsoft puts out great products in the past and VB.NET is insanely great in many. But for developers of traditional application in VB, MS has throughly trashed our upgrade path. We have little or no behavior perserving method of moving our code base forward.

    Sorry to be critical but it is obvious that the MS VB team hasn't tried to upgrade any application of complexity other than database front end type applications that are continually referenced in migration guides released since the first VS.NET.

    With the debut of LINQ it is become clear that MS has the ability to make the compilier produce IL that does some pretty amazing things. How about having a VB6 option and compatibility objects that allow to bring VB6 code forward. You did the same thing for the C++ guys and VB6 was far more popular among programmer than C++. You didn't trash QuickBASIC or the PDS when you came about with VB 1.0 so it was no brainer for many basic developer to move on to windows. Do the same for VB6 and .NET

    Rob Conley
    Plasma Automation

  • serras

    John007 –

    Check out this link (http://msdn.microsoft.com/vbrun/staythepath/) – it contains links to information on upgrading VB6 projects, how to go about, when/whether to do it, etc.



    Hope this helps,

    --Matt--*

  • Gazelle

    The problem is that is geared toward people trying to convert web apps and database front end is nearly useless for those of us with "traditional" application.

    The migration is crippled by the lack of compatibility objects for printing, graphics, and other basic features of the original VB6 langauge. In some cases (like clipboard, data types) it is a purely mechanical process to convert. In other cases (like printing, and graphics) the design of the .NET equivalent is radically different requiring a code re-write. (Printing is event driven in .net, GDI+ scaling is vastly different, GDI+ is stateless, etc).

    Microsoft puts out great products in the past and VB.NET is insanely great in many. But for developers of traditional application in VB, MS has throughly trashed our upgrade path. We have little or no behavior perserving method of moving our code base forward.

    Sorry to be critical but it is obvious that the MS VB team hasn't tried to upgrade any application of complexity other than database front end type applications that are continually referenced in migration guides released since the first VS.NET.

    With the debut of LINQ it is become clear that MS has the ability to make the compilier produce IL that does some pretty amazing things. How about having a VB6 option and compatibility objects that allow to bring VB6 code forward. You did the same thing for the C++ guys and VB6 was far more popular among programmer than C++. You didn't trash QuickBASIC or the PDS when you came about with VB 1.0 so it was no brainer for many basic developer to move on to windows. Do the same for VB6 and .NET

    Rob Conley
    Plasma Automation

  • Jagjot

    Well the situation I have is that I need to make modifications to a control system that is written in VB6, and this control system will need to be modified and supported for many years. Do you think it's worth putting the effort in to converting the code now to .NET ..and if so, is it the case of going through thousands of lines of code and reformatting it Or can I buy licenses for later versions of VB and install VB6 on that license

    All your help is VERY much appreciated.

  • Emrys Mydhrin

    I maintain a CAD/CAM system for a metal cutting system. What I would do is create a conversion project and see what the issues are. Then go back to the original and modify the design to make converting to .NET easier. For example in the software I write I used to have a lot of action code in the forms themselves. For example clicking this button would execute a class containing the 'Show Status' Command.

    Because of the conversion project I found that it is far easier if I create a bunch of UI classes that contained the various command executions and other UI manipulation. All the forms I modified to implement interface that the UI classes use to manipulate forms. The UI classes conversion to .NET was far more straight forward than the converting VB Forms. Then I made .NET Forms that implemented the interfaces.

    In a nutshell in the older version the software was designed

    view-commands-model

    with view being the VB6 Forms.

    in the new version (still VB6) the software was refactored to

    presentation-view-
    command-model.

    With only the presentation being VB forms implementing interfaces defined in the view.




  • gudel

    Although VB6 is still supported by MS...I'm not sure if they still sell it!...You would probably have better luck going to a CompUSA/BestBuy or other software vendor to see if they have it available.

    Good Luck:)

  • Indian Scorpion

    Hi,

    Please, help me about use of multi page controls in vb.

    I was tried to insert multi page control into forms with two page, draw a textbox1 into page1 and second one into listbox now i want to set to property for textbox and listbox. i could not set to this.

    please tell me how is it.

    Rashesh



  • Duke of URL

    Thanks Matt, I'll have a good read of that tomorrow but at first glance it looks like the application I want to convert shouldn't be too much of a problem. The problem I will have is trying to get the other guys still using VB6 to convert as they may have much more code which may be more problematic!

     Matthew Gertz MS wrote:
    John007 –

    Check out this link (http://msdn.microsoft.com/vbrun/staythepath/) – it contains links to information on upgrading VB6 projects, how to go about, when/whether to do it, etc.



    Hope this helps,

    --Matt--*

  • Marco Villagrana

    Can you still purchase VB6 What do people do when they need to modify existing VB6 code Surely it's not all obsolete!


  • Hsien-Chun

    VB.Net is NOT backwards compatible with VB6...there will be a small learning curve tranfering over to .NET....the curve is primarily learning the namespaces and classes...with the exception of a few new keywords and a few that were obsoleted...syntax is pretty much the same!

     

  • n3sachde

    The MSDN subscription programs offer VB6...Both .Net 03 & 05 have a conversion tool from Vb6



  • chuchi

     John007 wrote:

    Can you still purchase VB6 What do people do when they need to modify existing VB6 code Surely it's not all obsolete!



    For all effects and purpose all VB6 code is obsolete. However in most cases there is a one for one correspondence between old VB6 and new VB.NET so it isn't an impossible task. Just one that more time consuming than it needs to be. The conversion is similar to a converting a graphics heavy QuickBasic program to VB3.

    However as bad as VB.NET sucks for backward compatibility is it a great basic. The only downside I have seen is are issues related to .NET as a whole. The most serious is the performance of GDI+ the new graphics engine. The langauge itself is great, you can do more in less lines of code than any previous Basic langauge. The framework is extensives and really helps.

    The areas you run into difficulties for conversion are

    graphics engine is completely different. You can do more easier but there are performance issues with the underlying engine GDI+.

    The printing engine is completely different than anything you dealt with in a basic langauge (except maybe Crystal Reports). Basically you assign a handler to the engine and it calls thandler every time a new page needs to be printed. You exit the handler when you done with a single page. On one hand it like "what the hell all I want to do is print hello" but on the other hand it seems work better for printing multi page document then the traditional way.

    On a gross behavior level the new WinForms works pretty much the same. Subtle behavior is completely different if your code is form intensive then you will need to extensively retest. One thing that sucks is the lack of control arrays in the langauge itself. However in the compability library there are some classes that mimic control arrays.

    Also a neat trick is that you can inherit a control add some code that makes work more like the vb6 version and use that in your forms. I did that for combo boxes and list boxes to make them work more like the vb6 versions.



  • VB6