Ask Experts Questions for FREE Help !
Ask

What to do convert VB6 to VB.NET or rewrite?

Asked May 21, 2009, 05:07 AM — 6 Answers
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.

6 Answers
Perito's Avatar
Perito Posts: 3,141, Reputation: 781
Ultra Member
 
#2

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.
Helpful
omairkhan's Avatar
omairkhan Posts: 4, Reputation: 1
New Member
 
#3

May 21, 2009, 05:29 AM
Quote:
Originally Posted by Perito View Post
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..?
Helpful
Perito's Avatar
Perito Posts: 3,141, Reputation: 781
Ultra Member
 
#4

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

Ozzie Rules Blogging : Visual Studio 2005 Upgrading COM+ Components?

CodeProject: Converting a VB6 gdiplus project to .net.

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
Helpful
omairkhan's Avatar
omairkhan Posts: 4, Reputation: 1
New Member
 
#5

May 21, 2009, 11:37 PM
Quote:
Originally Posted by Perito View Post
I'm going to refer you to these pages.

Ozzie Rules Blogging : Visual Studio 2005 Upgrading COM+ Components?

CodeProject: Converting a VB6 gdiplus project to .net.

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
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..
Helpful
rajprl247667's Avatar
rajprl247667 Posts: 2, Reputation: 10
Junior Member
 
#6

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
Rajendrameghwal@gmail.com
Helpful
rajprl247667's Avatar
rajprl247667 Posts: 2, Reputation: 10
Junior Member
 
#7

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
Rajendrameghwal@gmail.com
Helpful

Not your question? Ask your question View similar questions

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Add your answer here.

Remove Text Formatting

Undo
Redo
 
Decrease Size
Increase Size
Bold
Italic
Underline
Align Left
Align Center
Align Right
Ordered List
Unordered List
Decrease Indent
Increase Indent
Insert Email Link
Wrap [QUOTE] tags around selected text
Wrap [CODE] tags around selected text
Wrap [HTML] tags around selected text
Wrap [PHP] tags around selected text
Wrap [YOUTUBE] tags around selected text
Notification Type:



Check out some similar questions!

Rewrite in decimal form [ 5 Answers ]

7.6123 x 10 to the 5th

Rewrite and balance equations [ 2 Answers ]

Kclo3 yield kcl+o2

How can I rewrite this sentence [ 6 Answers ]

I'm not thorough in english literature .. So can any one help me rewrite this "tryn' to revert you back when I'm precious ..not hang on you when I'm null" Like I need you back when I'm strong not to hang on you when I'm weak .. Something like this .. I want it in good english or...


View more Visual Basic questions Search