Solved

VB 6.0 vs VB.Net

Posted on 2004-09-17
37
494 Views
Last Modified: 2013-11-25
Hi,

I am relatively inexperienced with VB things, but will be taking over the development of a fairly simple VB application. I am a bit confused with the different VB/Visual Studio packages on offer and need to make sure I get the right one, especially given the considerable price difference.

First of all, the application was written in VB6.0. Will it be possible to continue developing this in VB.Net, without transforming the code into VB.Net. I ask this because it is tricky to find VB 6.0 development packages nowadays.

Secondly, I have to choose between the full Visual Studio .Net Professional Edition (which costs around £800) and the basic Visual Basic .Net Standard Edition (which costs £80).  The application to be developed only uses VB, so I don't need things like c#. It references the following objects:

MS ActiveX Data Objects 2.7 lib
MS Word 11.0 Object Library
MS Excell 11.0 Object Library
VB for Applications
VB runtime objects and procedures
VB objects and procedures
OLE automation
MS Scripting Runtime

The application also uses MS Sql Server (for which we have a licence already, through the Action Pack).

I have a feeling VB.Net SE should be enough, but am wondering if anybody can give me a more definite answer? Sorry if it's a strange question, but any advice is much appreciated...

Thanks,
Robin
0
Comment
Question by:rmassart
  • 12
  • 11
  • 8
  • +2
37 Comments
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12082900
>>Will it be possible to continue developing this in VB.Net, without transforming the code into VB.Net.

NO. VB.Net and VB6 are two completely different animals.
0
 

Author Comment

by:rmassart
ID: 12082969
Thanks.

And there is no way of developing VB6 in a VB.Net environment? So I guess I have to get VB6 or Visual Studio 6 then?
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12083014
Further.
If it is a simple app and you have resource with the skillset and/or your development has already started or is needed in a hurry then my advice would be to use VB6. I obviously don't know the app, or your department. But if you have more development planned in the future and are planning to migrate to dotNET soon and you don't have to deliver immediately and you have the retraining budget then go for it.

I don't know much about vb.NET SE, but the difference between 80 quid and 800 will easily be dwarfed by the costs of migrating from VB6 to VB.NET.
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12083074
>> And there is no way of developing VB6 in a VB.Net environment
Correct.
But VB.NET is a much nicer language than VB6. Personally I prefer C# despite spending the last 13 years or so coding mainly in VB and PowerBuilder.
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12083082
As fatboy aid....VB6 cannot be continued in VB.NET.

If you want to get VB.NET you will have to convert your VB6 source to VB.NET (Wich is not allways very feasable).

VB.NET standard will service your needs...I recently bought it..and it's quite sufficient.

Standard VS VS.NET Pro:

    Standard   -  PRO
1. Just VB      -  Whole Studio (C#, C++,VB,J#)
2. Standard cannot create DLL's, although there is a quite simple work-around.
3. Standard's IDE cannot connect to SQL Server...although you can easily connect and use SQL server as DB through code.

There are a fewother more subtle things...but this should get you covered.
0
 
LVL 7

Expert Comment

by:J_Mak
ID: 12083098
I think you have 2 options:

1. Continue the program using VB6, in which case you will have to purchase the development tools.

or

2. Manually convert the program from VB6 to VB.NET, which is possible but very tedious and messy. In this case you would still have to purchase the .NET Development tools.

I would suggest to opt with the first option. I was in the same situation and read the following sites which lead me to choose the first. Anyway I'll let you read them and it will be up to you as to what you want to do :-) Hope that helps!

Here they are:

http://www.vb-helper.com/discussion_vb6_or_dotnet.html
http://www.codeguru.com/Csharp/.NET/net_asp/miscellaneous/article.php/c6975/
0
 

Author Comment

by:rmassart
ID: 12083104
Well, we're a tiny company (5 employees) and this is not core business for us, which is why I don't know too much about VB!  There are no plans for migrating from VB to VB.Net per se. At the moment it is simply a matter of maintining the system and making some new developments.

The application is really small (one form, and maybe 1000 lines of code), and is primarily used to generate documents and graphs using Word and Excel objects. This is why I don't really want to spend a lot of money on software which provides too much stuff we don't need.

In the future there may be a case to move to .Net, but then it could eqaully be another programming language. There's certainly no business need to get involved in .Net right now. Looks like the best option is Visual Studio 6.0, in order to be on the safe side.
0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 12083951
Q:Will it be possible to continue developing this in VB.Net, without transforming the code into VB.Net.

A: Yes you can write VB6 in VB.NET, all you need to do is to import VB6 library in VB.NET.(It is very easy)



Q:Secondly, I have to choose between the full Visual Studio .Net Professional Edition (which costs around £800) and the basic Visual Basic .Net Standard Edition (which costs £80).


A: ****STAY AWAY**** from  the standard edition, I bought it myslef, it is a very crippled version. you will curse yoursellf later why you spend 1 penny on it.

You don't need to buy it for 800  Buy it from ebay for much less.

http://www.amazon.com/exec/obidos/tg/detail/-/B00008I9K2/qid=1095426078/sr=1-2/ref=sr_1_2_etk-software/103-3339474-0413405?v=glance&s=software&n=229534
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12091167
Unknown Routine.....

I beg to fiffer with your statement:

A: ****STAY AWAY**** from  the standard edition, I bought it myslef, it is a very crippled version. you will curse yoursellf later why you spend 1 penny on it.

Like I said... I recently bought it and there's absolutely nothing wrong with it...except for the few things that I mentioned.

I agree that the full package is much better...but if you are working on a limited budget, and would like to develope good software in a legal manner.....Standard is the way to go.

0
 

Author Comment

by:rmassart
ID: 12092340
Thanks for all the comments. Is there anyway someone could give me a more detailed description of the differences between standard edition and professional edition. Essential what I need to dois maintain and modify VB6.0 which references the objects mentioned at the top. Is there a reason why this should not be possible in the cheap version of VB?
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12092585
Unknown Routine.....
>> A: Yes you can write VB6 in VB.NET, all you need to do is to import VB6 library in VB.NET.(It is very easy)
I have never seen this before. And can find nothing about it in any other documentation. Please explain exactly what you mean and how you do it.

VB6 and VB.NET are different languages. They have a completely different underlying infrastructure. The library referred to by Unknown Routine (I believe) is Microsoft.VisualBasic.Compatibility.VB6. This does allow some VB6 functionality but it certainly doesn't allow straight VB6 coding.

If you open a VB6 project in VS.NET it will bring up the upgrade wizard. The upgraded code is VB.NET - MIcrosoft claim it is good for  90% VB6 code but you have to prepare your code for upgrade which can be a lot of work:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvb600/html/vb6tovbdotnet.asp
And even then it doesn't upgrade to the all the latest controls. You tend to get left with a hybrid.

0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 12096086
x50Fade :

Here are some limitations about standard edition:

 1)You don't get the Mobile device programming functionality that you get with full Visual Studio.

2) Windows XP Home Edition users: You won't be able to effectively design ASP.Net applications since Microsoft made XP Home incompatible with IIS. There's a couple ways around this, though: (1) there is an unsupported way to install IIS from a Windows 2000 CD- do a web search to find instructions, or (2) download the free WebMatrix from ASP.Net; a very cool and handy program that has it's own little server.

3) Compiling DLLs is not supported in VB.Net Standard. Although I suspect it's possible to program your own compiler, how to do it is still beyond my abilities.

This one was the most piss up for me. YOU CAN NOT CREATE A SIMPLE DLL !!!! Really DISAPPOINTING.

4) There are SQL limitations as well.


fds_fatboy : MSvb6Compatibalitiy is part of system namespace, you can use  it using import keword. after doing that you can use vb6 functions.

0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 12096237
<< Essential what I need to dois maintain and modify VB6.0 which references the objects mentioned at the top. Is there a reason why this should not be possible in the cheap version of VB?>>

As long as you don't want to Create a DLL VB.NET standard is ok for you. but if the maintining you mentioned above

includes maintaining code inside Dlls( class modules) then it is impposibile to do it using VB.NET Standard.


0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12097978
unknown routine:

>> : MSvb6Compatibalitiy is part of system namespace, you can use  it using import keword. after doing that you can use vb6 functions

I can find no documentation on MSvb6Compatibalitiy or even  MSvb6Compatibility. What you mean is Microsoft.VisualBasic.Compatibility.VB6. I mentioned it in my previous post.

I have used Microsoft.VisualBasic.Compatibility.VB6 (when investigating the upgrade path). Microsoft.VisualBasic.Compatibility.VB6 does not allow VB6 coding. It is a namespace with a number of VB6 functions ported into CLR. You cannot maintain VB6 code in a dotNet environment. Suggesting otherwise, is misleading.

If you don't believe me, try making this work in dotNet:

Create a simple project. In your startup form place this code:

Private Sub Form_Load()
    Dim A() As Variant

    ReDim A(1 To 2)
    A(1) = "Hello "
    A(2) = "World"
    MsgBox A(1) & A(2)
End Sub

For further information try the following sources
The link I gave earlier,
http://www.developer.com/net/vb/article.php/10926_1540261_5 ,
http://www.thescarms.com/vbasic/VB6vsVBNet.asp ,
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic.NET (Ed Robinson et al, Microsoft Press ISBN 0-7356-1587-X)
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12099616
Unknown Routine....

May I quote from my previous post...

"

Standard VS VS.NET Pro:

    Standard   -  PRO
1. Just VB      -  Whole Studio (C#, C++,VB,J#)
2. Standard cannot create DLL's, although there is a quite simple work-around.
3. Standard's IDE cannot connect to SQL Server...although you can easily connect and use SQL server as DB through code.


"

I mentioned all the stuff that you now mentioned...and I stated that their is an easy work-around.....
With Number 2.....youmerely change one line in your project file....whow....now you can compile as a DLL...who would have thought....
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12100464
>> Thanks for all the comments. Is there anyway someone could give me a more detailed description of the differences between standard edition and professional edition. Essential what I need to dois maintain and modify VB6.0 which references the objects mentioned at the top. Is there a reason why this should not be possible in the cheap version of VB?

Sorry, but you cannot maintain VB6 code in any .NET IDE.

Even if you could, but you only want to maintain VB6 and not upgrade - there is no point in spending £80 or £800 that offers you no advantage.
0
 

Author Comment

by:rmassart
ID: 12101115
Ok, thanks again for all the comments and tips.

I think the thread has gone very slightly in the wrong direction (which is my fault probably). But I am not trying to choose between different versions of only VB.Net,  but trying to determine whether to buy a "VB 6.0" product or a "VB.Net" product. My impression is that I should go for the "old" Visual Studio 6.0, since I have no intention of upgrading this piece of software to .NET in the future.

I intend to award the points to fds_fatboy since I feel his comments have helped me the most. If anyone feels this is unfair, please let me know.
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12101142
No Problem.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 15

Expert Comment

by:unknown_routine
ID: 12101381
x50Fade :
<<Standard cannot create DLL's, although there is a quite simple work-around>>

Im curious to know what is this <<quite simpe way>>.


rmassart : go for Visual studio if it suit your needs but please keep in mind that Microsoft

has announced that software life of VB6 will end ends at 2007. so it will be good for 2.5 years.


Good luck.
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12101513
Obviously no problem with me. But I would be happy see the points shared.
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12101514
UR.

The only difference to standard is that the IDE does not allow you to specify the project type as a class library.

So you create a normal exe...do your classes stuff in it.

In the .vbproj file, look for ... OutputType = "WinEXE". Just change it to ... OutputType = "Library" And make sure that ... StartupObject=""

Recompile.  Viola!

P.S. Not my discovery...

http://visualbasic.about.com/library/weekly/aa083003a.htm
0
 
LVL 10

Accepted Solution

by:
fds_fatboy earned 125 total points
ID: 12101741
>> has announced that software life of VB6 will end ends at 2007. so it will be good for 2.5 years.

Don't worry, the software won't stop working. The CDs won't shrivel up and die - well they might - so back them up ;-) It's just MS will stop supporting it. So you've only got another two-and-a-half years of software support calls to make - better get on the phone now.

There is legacy code in my workplace that runs in 16 bit VB3. It's not nice but it works, and there isn't the budget to replace it.

unknown routine: Did you get the code working from my previous comment?
0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 12102188
fds_fatboy :

your previous comment is this:Obviously no problem with me. But I would be happy see the points shared.

 x50Fade :
I had not the time to try it out , but even if that works how do you want to maintain different dll functinality.
Compatibality, Threading model ,......  

the link is interesting anyway.
 
0
 

Author Comment

by:rmassart
ID: 12102200
Well, here you are fds_fatboy.  Thanks everybody.

I hope I never have to make support calls to Microsoft.... :-)
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12102211
...
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12102394
Thanks Robin

unknown routine
When I said previous comment I meant "previous" - not "immediately previous" which is what you took it to mean. I had several previous comments on this subject but only one had code in it, I thought I had made it obvious which one I was refering to.

Here's the excerpt again:
--------------------------------------------------------------
If you don't believe me, try making this work in dotNet:

Create a simple project. In your startup form place this code:

Private Sub Form_Load()
    Dim A() As Variant

    ReDim A(1 To 2)
    A(1) = "Hello "
    A(2) = "World"
    MsgBox A(1) & A(2)
End Sub
--------------------------------------------------------------

Please let me know how you get on.
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12102458
Ding ding ding.....
0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 12102479
fds_fatboy :

It is quite simple:

Imports Microsoft.VisualBasic  '<=========== use This


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim A() As Object

        ReDim A(2)
        A(1) = "Hello "
        A(2) = "World"
        MsgBox(A(1) & A(2))
   End sub


You can use all VB6 Functions in Vb.Net.








0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12102533
Well it works....
0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 12102572
lol, Works, but it is not recommened,


Microsoft  deline to support this namespace after 2007. so be carefull. don't use it.

:)
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12102584
Although.....

I see that this example works even without the imports statement...which means only one thing....

It's VB.Net code...not VB 6.

Unknown Routine...

Although this results the same as in VB 6, you can't surely say that it's VB6 code....cause it's not, a few pieces of the code certainly changed.....therefore you would not be able to use vb6 code in .NET. It would have to be upgraded to .NET, which is what you just did...not so?
0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 12102636
x50Fade :

It is not VB.NET

if your case

go to references in your poject,

you see a reference to miscrosoft visual basic.


I'm sorry folks. I won't tbe able to further cooment in this thread. quite busy these days.....

Good luck.

0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12102666
Not there in references...

but anyhows...it was good to rumble a bit..wasn't it?

Cheers
Fade
:-)
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12102873
>>Take this code
   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim A() As Object

        ReDim A(2)
        A(1) = "Hello "
        A(2) = "World"
        MsgBox(A(1) & A(2))
   End sub

You can use all VB6 Functions in Vb.Net.
<<

You can use a lot of VB6 functionality in dotNet (I agree- I have discussed this in previous comments) BUT you cannot write VB6 in dotNET

The code you supplied is vb.net not VB6. It is not the same code (VB6) that I gave you. It is UPGRADED code. It looks a bit like VB6 but it is not.

>>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Is not VB6 code. It does not look like VB6 code. The original line is legal in dotnet but it does not automatically handle the event.

>>        Dim A() As Object
Does something entirely different in VB6 (Object is not a Variant - variant does not exist)

>>       ReDim A(2)

is not the same as Redim A(1 to 2). Your line gives 3 array elements mine only gave 2. My line is not legal in dotNet as the base element in an array must be zero.

There are plenty of other relatively normal things in VB6 that you don't have in dotNET such as control arrays and code modules

The  

x50Fade:
>> Well it works....
But is it VB6? Nope.
If you don't believe me - take this code and place it in a simple VB6 project and compile it :-)

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim A() As Object

        ReDim A(2)
        A(1) = "Hello "
        A(2) = "World"
        MsgBox(A(1) & A(2))
   End sub

0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12102895
>>I'm sorry folks. I won't tbe able to further cooment in this thread. quite busy these days

:-)
0
 
LVL 2

Expert Comment

by:x50Fade
ID: 12102930
fatboy...you did read me ..."Although" post ?

Right after the one where I said it worked???
0
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 12102969
>> fatboy...you did read me ..."Although" post ?

>> Right after the one where I said it worked???

When, I had started on my diatribe, that one hadn't arrived.
I only argue when I know I'm right ;-)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now