Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert C++ to Visual Basic

Status
Not open for further replies.

cherygan

Programmer
Apr 18, 2003
2
MY
Hi all, I'm trying to convert the C++ programmes into Microsoft Visual Basic 6.0. Is there any tools available out there to help me do this? Thanks.
 
no

Ion Filipski
1c.bmp


filipski@excite.com
 
is there any better way of doing it? (converting C++ source code into VB source code)
 
>> is there any better way of doing it?

You mean better than:
IonFilipski (Programmer) Apr 18, 2003
no

Open your Visual Basic IDE and use the Text Wizard. ;-)

-pete

 
Well, for the heck of it you could copy and paste the code and watch 1000's of errors appear LOL

Actually no, well I'm not quite sure of your circumstances, but the above is why porting and adapting is such a pain. In a perfect world, we could set our requirements, then design, then write code, then debug...

Seems like in the real workplace that process sometimes gets reversed, suddenly you find out that you need to write in a different language or for a different platform.

If at all possible, figure out what your requirements are first and then code your program in the language you intend to finish in.
 
Also of note is that managed C++ .NET code compiles into the same CLR as VB .NET, so maybe there is hope if you ported to C++ .NET. Honestly, I'm not familiar with how the communication between languages would work however.
 
It would probably be easier to create a new VB project and just reverse engineer the C++ code to make them preform the same...

You can grab small parts of the C/C++ code that is specific to your program, such as the main loop, and functions, and port those individualy...

But you do realize, that in a VC++ program, there are a lot of things that are not needed in a VB program, like all of the modules that build the form and tell it how to act...
VB controls that part for you, so all you have to do in VB is tell it what to do when an event occurs... VC++ also (more or less) does this, but the code for it is stored in the code with the event handlers...

If you really want to spend sometime...
I guess you could try to create a program to automate most of the changes, then debug the errors that are left from there...

Good Luck


Have Fun, Be Young... Code BASIC
-Josh Stribling
cubee101.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top