Log in

View Full Version : What to do convert VB6 to VB.NET or rewrite?


omairkhan
May 21, 2009, 05:07 AM
I don't know what to do,
Actually I don't know VB but I know VB.NET
I have project which needs to implement in VB.NET
That project is written in VB6.
I tried to convert it but there are many errors.
And things that are not understandable for me.
I don't know what to do. There are COM+ components which are used in vb6 as well.
Please tell me.

Perito
May 21, 2009, 05:25 AM
VB.NET has a converter built into it. You do have to fix the errors, but the converter labels them.

If you don't understand them, this may be difficult. One of the first rules of programming is to understand the language and procedures.

If you have problems, post the errors here and we can try to help you fix them. If you can figure out the error, but don't know the solution, We can helpyou with that also.

omairkhan
May 21, 2009, 05:29 AM
VB.NET has a converter built into it. You do have to fix the errors, but the converter labels them.

If you don't understand them, this may be difficult. One of the first rules of programming is to understand the language and procedures.

If you have problems, post the errors here and we can try to help you fix them. If you can figure out the error, but don't know the solution, We can helpyou with that also.

Thanks, Prito,
the first error/Warning which I have seen is:
'UPGRADE_ISSUE: COMSVCSLib.AppServer .GetObjectContext was not upgraded. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"'

while there is this line of Code: objcontext = GetObjectContext

I tried to get the DLL from System32 folder, but it was not accepting reference, then I tried to add services. I really don't know... how to solve or what is the alternative of this... how could I proceed further.. :(

Perito
May 21, 2009, 06:22 AM
I'm going to refer you to these pages.

Ozzie Rules Blogging : Visual Studio 2005 Upgrading COM+ Components? (http://blogs.msdn.com/charles_sterling/archive/2005/01/05/346867.aspx)

CodeProject: Converting a VB6 gdiplus project to .net. (http://www.codeproject.com/KB/vb/Converting_VB6_to_net.aspx)

It looks like they've already done what you're trying to do. I got this by googling the GUID that you posted (CC4C7EC0-C903-48FC-ACCC-81861D12DA4A).

I'd work more on this for you, but I've got a dentist's appointment in a few minutes :mad:

omairkhan
May 21, 2009, 11:37 PM
I'm going to refer you to these pages.

Ozzie Rules Blogging : Visual Studio 2005 Upgrading COM+ Components? (http://blogs.msdn.com/charles_sterling/archive/2005/01/05/346867.aspx)

CodeProject: Converting a VB6 gdiplus project to .net. (http://www.codeproject.com/KB/vb/Converting_VB6_to_net.aspx)

It looks like they've already done what you're trying to do. I got this by googling the GUID that you posted (CC4C7EC0-C903-48FC-ACCC-81861D12DA4A).

I'd work more on this for you, but I've got a dentist's appointment in a few minutes :mad:

dear in second link,
that person has written this:
CONCLUSION

CONVERSION WIZARD = BAD NEWS
TOTAL REWRITE = GOOD NEWS


I hope to get better about your teeth..

rajprl247667
Apr 19, 2010, 11:33 PM
Go to the bottom of this link
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_21607145.html
This article ask to give reference to COMSVCSLib.AppServer in VS 2005, This can be done by add reference - COM tab - select COM + Service type library and add its reference. Then change this

Dim ctx As ObjectContext
Set ctx = GetObjectContext

to

Dim ctx As COMSVCSLib.ObjectContext

Dim objAppServer As New COMSVCSLib.AppServer

ctx = objAppServer.GetObjectContext()

It should resolve the issue.
I don't know anything about com or com+ but I am working to convert a vb 6.0 project to vb.net 2005.
It helped me.
Rajendra
[email protected]

rajprl247667
Apr 19, 2010, 11:33 PM
Go to the bottom of this link
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_21607145.html
This article ask to give reference to COMSVCSLib.AppServer in VS 2005, This can be done by add reference - COM tab - select COM + Service type library and add its reference. Then change this

Dim ctx As ObjectContext
Set ctx = GetObjectContext

to

Dim ctx As COMSVCSLib.ObjectContext

Dim objAppServer As New COMSVCSLib.AppServer

ctx = objAppServer.GetObjectContext()

It should resolve the issue.
I don't know anything about com or com+ but I am working to convert a vb 6.0 project to vb.net 2005.
It helped me.
Rajendra
[email protected]