467,926 Members | 1,559 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,926 developers. It's quick & easy.

VB6 to C++11 , Can the conversion be done directly?

I am learning C++.

I know that this has been asked before, but I am looking for a current update as of year 2020 AD.

I have read, over the years, that there might have been and still maybe are dedicated VB6 (sp5) programmers numbering in the many thousands. Vast communities of VB6 (sp5) programmers, programming and producing advanced programs in that language. I am thinking of them.

I am studying C++11. I would like to be able to program advanced programs in C++11. It would seem reasonable to take some of that very stable VB6 (sp5) code that is on the internet and convert it to C++11. If it can be done directly.

I am not asking if VB6 can be converted to any of the many versions and derivatives of Unix. That would be nice, as then serious security business applications might benefit, but that is for another discussion, not this one.

I am not asking if VB6 can be converted to the JIT ("Just In Time") pseudo-language ".NET" and therein lose all semblance to security.

I am not asking if VB6 can be used or converted to any Visual Studio beyond VS6. I work in security and those later versions might be considered to be an extreme security breach aggressively looking to happen. So, please do not respond supporting such.

I have read, over the years, discussions about possible converters being needed that might be able to take VB6 code and make it C++ code that is directly usable in C++. I have read that it seems to have been a struggle to do that. VB6 (specifically with service pack 5), if I recall correctly, takes input from the programmer (usually) in ASCII (or whatever the local Operating System's code page is) and converts all the input into UNICODE and then compiles from there as though the programming was input in Unicode. Nice. Microsoft produced an amazing product in the Visual Basic line up to version 6.

There are thought to be maybe thousands or tens of thousands of programs written in VB6. Has anyone written a converter to go directly from the (un-compiled) VB6 (sp5) code to C++. I am interested in C++11, but any version of C++, not beyond 11 is ok.


Jan 23 '20 #1
  • viewed: 1631
2 Replies
I don't know any such converters.
Since VB6 and C ++ have completely different language specifications, nobody would have made a correspondence such as "write like this in VB6 but write like this in C ++".
Jan 31 '20 #2
Thank you SioSio.

I apologize for thinking that some might not know the following. Please forgive me, but such a reply of VS code and further statements seem to indicate that still some people do not know some things. I do not know C++11, and I understand not knowing. I will try to be gentle and conversational in my explaining some of this.

If I recall correctly, VB6 begins with a single code page for the programmer, and then converts all input code (internally) to Unicode, and then does all of it's internal work in Unicode, and then converts all responses to be given and shown to the user into the user's (previously detailed) single code page. I think that your Boolean of "nobody would have made" might be based upon not understanding the mechanics of the VB6 platform. VB6 is an extremely powerful system built by Microsoft that, for the most part simply automated the GUI process for the user and allowed the user to concentrate on the logic code.

It is possible and I have seen bits of code that list both vb6 and C++. In the past, I used to study the comparisons and try to learn some tiny amount of C++ from the comparisons.

Sometimes (when I used VB6) I injected C++ code into my own VB6 programs and it worked. VB6 is like a front end that pre-wrote lots of stuff, similar to how wxWidgets does with C++ now. Similar, but hidden from the programmer while it is internally in Unicode and the user is limited to one chosen code page. I think that wxWidgets is a current attempt by others to emulate VB6. I have used wxWidgets for C++ and it is similar to VB6 except that VB6 is very intuitive and smoothly usable. I have since dumped wxWidgets and went directly to learning C++.

The readers of this post should already know this stuff, but some are new to so much that they need a historical explanation of why this question is even being asked. The following may help them:

I think that the reason that Microsoft has pushed so aggressively to convince the generally limited intellects to be hateful of VB6, is because VB6 is so powerful that it is out of Microsoft's control. Kind of like Microsoft came up with ".net" to break the (to some) mind-bending complexity and unmitigatedly secure C++ of Bjarne Stroustrup. Stroustrup's genius seems to have bypassed the armies of Microsoft programmers so completely that Microsoft came up with a way to break into the C++ code in transport from computer to computer via a so-called "JIT Just In Time" compilation that sent the code in raw form that they could read and change as they decided via the end chain compiler. Stroustrup's C++ never needed that. It is like the Finale to Beethoven's 5th Symphony. C++ never needed help from any JIT compiler. Never... Ok... Now back to VB6... Previously, it seems that for VB6, Microsoft could not stop the vast new programs being created rapidly in VB6 (sp5), thus they lost control of the volumes of new programs and thus Microsoft drove the witless to hate it. Microsoft programmed VB6 so well that the untrained average person could quickly learn to use it and produce advanced controls for industry. Those controls (programmed by common VB6 users) were so advanced that Microsoft had difficulty in competing with them. Microsoft seems to have successfully locked itself out of many software markets. Microsoft did well with VB6. Microsoft seems to have outdone themselves. They had given away the ability to program to the masses and they might have regretted that severely! But, then they learned that they had so enabled the average person to rapidly produce software that Microsoft had no control over them. I expect that Microsoft did not make a single penny off of most of those new programs. What a loss of potential revenue! Then, grasping their monumental mistake, it looks like Microsoft attempted to flood the internet with illogical noise proclaiming that the masses should and do hate VB6. Outside of themselves of course: Secretly Microsoft themselves still use VB6 in Microsoft Office in a stripped down version called "VBA." Ok. So now you know some of the value of VB6(sp5). Do not use Service Pack 6 (sp6). No matter what you read elsewhere about the "necessity" and "praise" of service pack 6, stay away from it. Do not even allow a CD containing it in your building. Do not make the mistake of using sp6. Stay with VB6 and service pack 5. Now you might understand why there are still possibly millions of people programming in VB6(sp5) and why those people will probably never leave it. And, now you might understand that a converter from VB6(sp5) to any version of C++ has been in demand for many years.

It can be made. I have seen attempts to make it. It will never be made with any ".net" language partially because ".net" is not C++. And, if you see a converter that goes from VB6 to C++.net, then it is *not* to C++, it is to some version of the anti-security ".net" and it is not C++.

Now I am studying C++. I have some vast programs that I programmed in VB6 (sp5) that I would like to have converted to C++ easily.

This topic has been discussed many times, years ago. I want an update on if the conversion has been completed. If it has, then where can I get it? I have not found a suitable process on the search engines yet. Most attempts converted to ".net" which is worthless (to me), and ".net" is now hopefully a dying anti-language. I am looking for conversion between VB6 (sp5) and C++ (any version up to and including 11).

Thank you.
Jan 31 '20 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Lachlan Hunt | last post: by
7 posts views Thread by Michael Lehn | last post: by
19 posts views Thread by Randy Yates | last post: by
6 posts views Thread by yves | last post: by
13 posts views Thread by junky_fellow | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.