2

Background

For the record, I used to love coding in VB6 (except when sub-classing) WAY back in the day. Now I feel dirty even having to post this question (not to mention having to actually work on the old code someone else developed).

I love c# and would develop everything from ground up in c# if I had the time. Ironically trying to get VB6 to work at times in Windows 10 is a nightmare. Recently I have been just trying to recompile some source with much frustration.

Two methods have been used...

1. In the VB6 IDE:

I simply open the project in the IDE and do File>>Make MyProject.exe then click OK to compile the project.

This works sometimes. Most times it seems to compile just fine and when it starts to write the EXE the whole IDE just crashes for a few different reasons depending on what is happening.

2. Using a batch file:

I create the following batch file make.bat int he same directory of my project with the following in the bat file...

del *.obj
"c:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE" /m MyProject.vbp

This also works sometimes (even when #1 will not work). When using this method I see the obj files getting created (just like when building from the IDE) and then it just exits leaving the obj files. This is how I know it crashes too.

The Question

I want to see if someone can tell me EVERY exe used to compile an application. I plan on trying my best to turn off DEP (Data Execution Prevention) for those applications. From what I can see completely disabling DEP seems to allow me to compile it with more success but I hate turning it off. I just want the Windows 10 OS to completely ignore the files being used when I compile the VB6 applications.

If there are any other solutions to help resolve this issue I have with VB6 constantly crashing please do let me know. I have done a lot of research on this and have not found a really reliable answer as to how to get VB6 to play nice with Windows 10.

Arvo Bowen
  • 4,524
  • 6
  • 51
  • 109
  • Sorry to hear of your troubles. For what's it's worth, I use VB6 on Windows 10 every day and never have any issues including compiling. So it is possible. I'm afraid I don't have the answer to your specific question. – Brian M Stafford Aug 30 '18 at 17:16
  • I'm sure it has to do with old code and lack of error control. I just wish the compiler would throw it up to me rather than crash. – Arvo Bowen Aug 30 '18 at 18:35
  • 1
    Same here, using it in Windows 10 64-bit. It was a bear getting installed properly, but once setup, I've never had it fail during a compile. Search the VB6 tag for votes and most popular, there are some gem posts here, including one that dramatically sped-up the loading and running of my VB6 in general, as well as made it run much more stable. I think I made a post about strange video bleed-through that was solved by a shortcut properties setting which inadvertently also made everything else work better. – Bill Hileman Aug 30 '18 at 18:36
  • What service pack is your VB6 IDE running with? –  Aug 30 '18 at 20:14
  • @PeterCooperJr. VB 6.0 (SP6) – Arvo Bowen Aug 30 '18 at 20:16
  • @BillHileman If you happen to think of any of these posts or find them again please do enlighten me. I honestly could careless about speed at this point. I would just love for the IDE to tell me what it has an issue with in the first place. I have searched all over SO for ideas on how I could resolve my issues but the only thing I have ever come up with is doing away with DEP (which has not worked for me completely). The IDE does compile but not always. – Arvo Bowen Aug 30 '18 at 20:20
  • I could be mistaken, but I think the big breakthrough for me in making the IDE run in a much more stable way was changing the properties of the shortcut, and I believe it was telling it to run in compatibility mode, and I believe it was for Win XP. If I can remember, I will check my system at home tonight and confirm. – Bill Hileman Aug 30 '18 at 20:26
  • Thanks @BillHileman for any help you can give in that regards. Anything that can make my VB6 environment more stable is a win! – Arvo Bowen Aug 30 '18 at 23:01
  • Take a look at this: https://stackoverflow.com/questions/38644132/vb6-ide-slowness-and-vbkeysave5-in-the-registry I favorited the question since I knew I'd want to refer back to it probably more than once. – Bill Hileman Aug 31 '18 at 01:28
  • Interesting post. Unfortunately it seems like `HKEY_CLASSES_ROOT\VBKeySave5` does not exist in my registry. Bummer, I was hoping to find something new that might change how VB6 acts. – Arvo Bowen Aug 31 '18 at 02:41
  • Are you compiling a bunch of things at once using a .VBG group? Or individually / one at a time? – StayOnTarget Aug 31 '18 at 11:24
  • That post also mentions in the answer (or one of the answers) about changing the startup properties, I believe. Read through the whole question and the answers/comments if you haven't already. – Bill Hileman Aug 31 '18 at 14:34
  • @DaveInCaz I'm not using any groups. Just a single project. But I have used groups in the past. I was hoping with the many crashes something might have just got left behind as explained in that post. – Arvo Bowen Aug 31 '18 at 18:31
  • @BillHileman Looking at that post I only see the one answer and nothing on the page talks about startup properties. At least non that I have found. – Arvo Bowen Aug 31 '18 at 18:33
  • I mis-read that page, you are correct. In fact, it states to NOT change the property to Vista compatibility. I must be thinking of some other post. – Bill Hileman Aug 31 '18 at 18:38
  • Posts on installing VB6 on Windows 10. AFAICR this is excellent. https://stackoverflow.com/q/10495680/15639 And these may be useful https://stackoverflow.com/questions/52001443/cannot-install-vb6-ide-on-windows-10 https://stackoverflow.com/questions/2339536/has-anyone-had-success-with-visual-studio-6-on-windows-7 – MarkJ Sep 04 '18 at 11:47

1 Answers1

0

I'm not sure if this is EVERY exe used to compile a VB6 project but the two I know of are...

  1. LINK.EXE
  2. C2.EXE
Arvo Bowen
  • 4,524
  • 6
  • 51
  • 109
  • If you have access to any working VB6 instance you could run Process Monitor while it is compiling and that might reveal what it is doing. For that matter, this might also help you detect why it is crashing. – StayOnTarget Sep 04 '18 at 11:32