Search Tools Links Login

Install VB6 on Windows 7


After surfing around the net, I've found very little information regarding installation of VB6 on Windows 7. Most of the information out there is for Vista, and most of it is queries for assistance.

You may be wondering why someone would want to utilize VB6 on a shiny new operating system like Windows 7. Or even Vista for that matter.

There are about a bazillion legacy applications out there that have to be supported, and people like me who speak VB6 need to have the tools installed on our workstations in order to implement and test updates and such for these legacy applications. It also helps out when I need to squirt out a quick tool for use in my daily work. 

This process has been tested on Windows 7, both 32 bit and 64 bit, with no problems.

Note: I've updated this process with information from the comments (below the post). If I've left something out, don't hesitate to point it out. Also - Thanks to all of you! Your comments and suggestions are much appreciated.

Note 2: If you have a specific programming questions, might I please direct your attention to the VB6 forum? It's much easier to interact over there!

  1. Prerequisites:
    You need to do this stuff first:
    • Turn off UAC.
    • Create a zero-byte file in C:\Windows called MSJAVA.DLL. The setup process will look for this file, and if it doesn't find it, will force an installation of old, old Java, and require a reboot. By creating the zero-byte file, the installation of moldy Java is bypassed, and no reboot will be required.
    • Install DirectX 7. The process and files are available here.
    • Install VB6 Common Controls, available here.
  2. Main Installation:
    1. Insert Visual Studio 6 CD.
    2. Exit from the Autorun setup.
    3. Browse to the root folder of the VS6 CD.
    4. Right-click SETUP.EXE, select Run As Administrator.
    5. On this and other Program Compatibility Assistant warnings, click Run Program.
    6. Click Next.
    7. Click "I accept agreement", then Next.
    8. Enter name and company information, click Next.
    9. Select Custom Setup, click Next.
    10. Click Continue, then Ok.
    11. Setup will "think to itself" for about 2 minutes. Processing can be verified by starting Task Manager, and checking the CPU usage of ACMSETUP.EXE.
    12. On the options list, select the following:
      • Microsoft Visual Basic 6.0
      • ActiveX
      • Data Access
      • Graphics
      All other options should be unchecked. Click Continue, setup will continue.
    13. Finally, a successful completion dialog will appear, at which click Ok. At this point, Visual Basic 6 is installed.
    14. If you do not have the MSDN CD, clear the checkbox on the next dialog, and click next. You'll be warned of the lack of MSDN, but just click Yes to accept.
    15. Click Next to skip the installation of Installshield. This is a really old version you don't want anyway.
    16. Click Next again to skip the installation of BackOffice, VSS, and SNA Server. Not needed!
    17. On the next dialog, clear the checkbox for "Register Now", and click Finish.
  3. IDE Compatibility Setup
    In order to prevent weird behavior of the IDE, such as sluggishness and/or lack of control placement/resizing outlines, you'll want to change these items.
    1. Using Windows Explorer, browse the location where you installed VB6. By default, the path is C:\Program Files\Microsoft Visual Studio\VB98\
    2. Right click the VB6.exe program file, and select properties from the context menu.
    3. Click on the Compatibility tab.
    4. Place a check in each of these checkboxes:
      • Run this program in compatibility mode for Windows XP (Service Pack 3)
      • Disable Visual Themes
      • Disable Desktop Composition
      • Disable display scaling on high DPI settings
  4. Service Pack 6 Installation:

About this post

Posted: 2009-06-23
By: dwirch
Viewed: 696,569 times

Categories

Software Hack/Tweak

Tutorials

Windows

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

earlymeadow posted this comment on 2009-11-15:

Super information - got VB6 up and running, your explanation saved me a lot of searching.

I'm still having a few problems with the INet transfer control - using it to transfer files via FTP, it seems to hang for a minut or so every now and then.

FWIW - using manifest files (as in XP) works in Windows 7 - giving the app the windows 7 look.

Thanks again.

Peter

FortyPoundHead posted this comment on 2009-11-16:

Thanks, Peter! Great tip about the manifest files.

badbrad posted this comment on 2009-11-20:

Missed one thing.... Create a zero byte file in C:Windows called "MSJAVA.DLL" to get around the Java install.

Also if you install the "VB6IDEMouseWheelAddin.dll" for scrolling, make sure that you run "cmd.exe" with elevated admin privleges when registering the DLL manually. Also ran it with the DLL in "c:".

Sorry... no links for this right now.

mccindy posted this comment on 2010-01-09:

Thank you so much - I will be attemping this isnatll very soon.

nfordatfph posted this comment on 2010-02-09:

Thanks for the tip on fixing slugishness. It was driving me crazy.

I have a problem with large forms in the IDE in Win7. It gets to something like 1000x800 and won't let me drag it any bigger. At runtime, I can set the form to a larger size, but not being able to see the full form in the IDE makes it pretty hard to work on.

FortyPoundHead posted this comment on 2010-02-09:

A little odd, but I'll see if I can reproduce it here, and maybe find a fix for you.

FortyPoundHead posted this comment on 2010-02-10:

I haven't been able to reproduce the issue here. I'm able to drag the form size to a much larger size than the screen, which is currently 1280x1024.

I've not seen this before - anyone got any ideas?

pamith posted this comment on 2010-02-17:

What about third party OCX applications? I have a program that uses several of these. I want to move my VB6 work to Windows 7 but would need to know if the third party OCXs will work as well. Suggestions?

FortyPoundHead posted this comment on 2010-02-17:

As long as the OCX's get registered properly, there should be no issue. That is, unless the OCX is doing something *really* strange, you shouldn't have a problem.

Let me know what OCX's you are concerned about, and I'll try testing them out on my installation, and see if they work.

caesarv posted this comment on 2010-02-17:

pardon my ignorance...but...
I just got Win7 Pro 64 installed on my new computer last night. Most of my work is in VB6. Will the instructions shown work with 64 bit Windows? I have heard that VB6 IDE is not supported with 64bit. I have the original VB6 CD but, of course, it does not have SP6. Is this a concern or can I simply add SP6 after installation. FYI, I do have access to an msdn subscription if I need to download something different.

FortyPoundHead posted this comment on 2010-02-17:

Yes, it will work fine on 64 bit Windows 7. I am currently using 64 bit on my main workstation, and have had no issues.

Applying SP6 after installation of VB6 has posed no challenges, either.

PhilTilson posted this comment on 2010-03-04:

Excellent - thank you! It all worked just as you said - and .exe files run quite happily as well - though with a considerable 'starting delay'!

mgpprasan posted this comment on 2010-03-28:

what a useful information. thanks a lot. i was suffering from how to install vb 6.0 in windows 7. now it is working well.

FortyPoundHead posted this comment on 2010-03-29:

Glad to be assistance!

George posted this comment on 2010-04-28:

I have an issue getting the XP manifest file to work in WIndows 7 when I run VB in IDE mode. It does not look like XP. I think it might have to do with permissions with either VB6, the manifest file. Any ideas?

vic posted this comment on 2010-06-04:

I have a fairly large VB6 App that I've been maintaining in Windows 7 using Virtual PC. I decided to try to get it to work in Windows 7 with Virtual PC and there are a number of problems. I've gotten around each one but this one now has me stumped.

The app uses an Access Database and has lots of forms using ADO data controls. What happens on some of the forms (not all of them) is when I tryh to do a requery on an a recordset object i.e. Me.Adodc1.Recordset.Requery, it just hangs (no message, nothing). Then when I try to close the app I get the message "Visual Basic has stopped working" and it's gone.

Any ideas?

Vic

jnc39 posted this comment on 2010-06-21:

As a brand new Windows 7 user, I have a simple question: What is the "UAC" you refer to in step1? Could the fact that I didn't shut it off before starting your process have caused the computer to lock up and require a hard shut down at step 10?
Thanks for your help

FortyPoundHead posted this comment on 2010-06-21:

UAC is user account control, which helps protect your computer from unauthorized changes. You can turn it off in the control panel.

FortyPoundHead posted this comment on 2010-06-22:

Guess it would help I posted the information about disabling UAC:

http://www.fortypoundhead.com/showcontent.asp?artid=19521

FortyPoundHead posted this comment on 2010-06-23:

I am currently attending HP techforum in Las Vegas, and as such am currently experiencing limited connectivity. But I'll look into this for you when I get back to my room.

FortyPoundHead posted this comment on 2010-06-25:

AnotherHacker: have you seen:

http://support.microsoft.com/kb/216156

It directly addresses the issue you are experiencing.

Jovick posted this comment on 2010-06-28:

Great article! I have installed VB6 on Win 7 64-bit successfully. Some things I ran into that I didn't see mentioned is that when registering OCX and DLL files the file MUST be placed in the C:WindowsSysWOW64 directory. I know, I know... it seems the reverse of what you should do. You MUST also use the regsvr32.exe file in the SysWOW64 folder (not the one in the System32 folder) to register the files. One other tip is to ALWAYS install everythig as "administrator". I found that I also had to modify the properties of the VB6.EXE file (in the compatibility tab) to "run as administrator".

FortyPoundHead posted this comment on 2010-06-29:

Thanks for the great tip, Jovick!

raycomp posted this comment on 2010-07-10:

Thanks for ht useful information. One problem I sometimes need to register 3rd party ocx files but in most cases Windows 7 32bit does not allow copying them to Windowssystem32 for registering but place the in the incompatible folder. Any ideas please

FortyPoundHead posted this comment on 2010-07-10:

Need some more info from you, Raycomp. Are you simply copying the files with Windows explorer? Or is the file copy part of a setup process?

If it is part of your application set up, you might try running the setup program as administrator - right click the setup file, and select Run As Administrator.

raycomp posted this comment on 2010-07-10:

Thanks for the quick reply. I have a few minutes ago found the answer and was about to post the fact here when I saw your post.

I am developing an app to keep track of all my movie files ant to also play them with either WMP or Gom from inside the App. All ok.

mwrob posted this comment on 2010-07-20:

I followed the instructions and was able to get VB6 installed just fine on a Windows 7 64 bit system. However, I am unable to get service pack 6 installed.

I have set the properties of acmesetup and setupsp6 to run as administrator and Windows SP 3 mode. Right after agreeing to the license terms, I get a dialog box that says "Visual Studio 6.0 Service Pack 6 Setup was not completed properly."

FortyPoundHead posted this comment on 2010-07-20:

Have you turned off UAC during the installation?

I just tried in a test environment, utilizing Windows 7 64 bit, installed VB6 using the above procedure, then downloaded the VB6 SP6 from the Microsoft site (direct download from MS).

Double clicking the executable allowed me to select an temp folder to extract the SP6 files to. After extraction, I browsed to the directory where the files extracted to, and ran the SetupSP6.exe application.

The installation went normally, with no errors, and the final dialog stating setup was successful.

However, after resetting the environment, I was able to reproduce the error you mention by leaving UAC turned on.

mwrob posted this comment on 2010-07-21:

Yes, I did exactly as you described. I tried again this morning, double checking all the settings and still got the same result. I'm open to suggestions. Thanks.

FortyPoundHead posted this comment on 2010-07-21:

I'm currently out of town, but I'll check into it more this evening.

mwrob posted this comment on 2010-07-23:

Ok, suppose I can't get SP 6 installed. What do I need to beware of if I try working on a project last worked on in SP6 and I work on it in VB6 with no service packs installed?

latino posted this comment on 2010-08-30:

Hi,

I have VB6 working perfectly. Sourcesafe works too, but I can't work with sourcesafe from within the IDE. The SS add-in is loaded, there are no errors shown, but I don't have any extra contextmenu-items. Anyone here had the same problem?

philyuko posted this comment on 2010-09-01:

Great info for Windows 7 … works like a dream.
Thank you!!!
For Vista – there is no service pack 3 so I clicked 2.
For the most part it works OK … but two hiccups

1/ From time to time you’ll click SAVE AS and no box will come up
2/ When a save box does come up it doesn’t have the name of the file in it … in other words … I don’t think this works for vista … any ideas?

FortyPoundHead posted this comment on 2010-09-01:

Are you using the common dialog control?

philyuko posted this comment on 2010-09-01:

No ... but I'd like to. I had to take out all the CD controls because it meant my users without XP had to do too much installing of too many things in sys32. I'm sure you know what I mean.

FortyPoundHead posted this comment on 2010-09-02:

I'll hammer on this today, and see if I can duplicate the behavior. Are you getting any weird event log entries that might be related? Along the lines of Path not found or access denied, or some such?

philyuko posted this comment on 2010-09-03:

Nope ;-)
Just won't won't give me the current name of the form or project when using save-as.

Could it be related to not have "Service pack 3"?

FortyPoundHead posted this comment on 2010-09-04:

MMM... prolly not. Have you installed SP6 for VB6 yet?

philyuko posted this comment on 2010-09-04:

I have not ... I should?
Any idea why that would a thang for Vista and not for Windows 7?

FortyPoundHead posted this comment on 2010-09-05:

To put it simply, Vista is a bit more picky than Windows 7. That's why you didn't see businesses rolling Vista out to their employees, and IT folks every made the sign of the cross whenever they had to support it.

Give the SP6 a try and you might see your problems clear up.

psyman posted this comment on 2010-10-05:

I get to the stage during install where you select custom, then I get an error saying I dont have enought memory to install. Clearly I do as I have 2GB ram & 200+GB free hard drive space. Any ideas?

FortyPoundHead posted this comment on 2010-10-05:

First, make sure your system date and time are correct. If that doesn't fix the problem, or if your date and time are good to go, you can try pre-installing the MS VB6 Common Controls *before* installing VB6.

You can grab the installation package from here.

psyman posted this comment on 2010-10-05:

Thank you - that did it ! I now have VB6 again & it works a treat!

FortyPoundHead posted this comment on 2010-10-05:

Glad I could help - don't hesitate to ask back here if you have any other questions!

mike posted this comment on 2010-11-16:

Many thanks for this info - I've now got VB6 running on my Windows 7 laptop. I had to add the msjava.dll as mentioned by badbrad.

I'm trying to move away from VB6 due to the lack of ongoing support from MS, but with a large project like I have it takes ages to port the program to a new development environment. So meanwhile I need to continue using VB6, and since my XP box is showing signs of a terminal illness, I needed to get VB6 installed on a Win7 machine.

TT posted this comment on 2010-11-23:

Thanks for the useful tips!

I have same problem as Latino explained it above (related to SourceSfae). If anyone has the solution for the problem, please post it here!

FortyPoundHead posted this comment on 2010-11-23:

Unfortunately, I haven't used Sourcesafe for *years*. I'll ask around though, and see if I can find a solution for you.

CharlieHall posted this comment on 2010-11-24:

Your site has been very helpful so far - thanks!!

I am having problems with one feature that I use a lot.

I am using Win 7 64 bit. I am able to create new versions of my dlls and reference them in my excel applications so I think VB6 SP6 is installed correctly.

However, I like to run the dll inside the vb6 application so I can debug on the fly. When I reference this dll I get the error "Error in loading DLL". Or if I have referenced the library already, but unregister the dll, and start up it up inside VB6 (which automatically registers it) then the first time my code tries to use the dll, I get the "Error in loading DLL" error.

Any insight into what I can do to fix this?

Thanks in advance, Charlie

FortyPoundHead posted this comment on 2010-11-24:

Hi Charlie -

I, too, am using Win7 x64, but I've not seen this behavior myself, but I'll try to reproduce it. If I can reproduce it, I should be able to figure out why it is happening.

I'll let you know either here or via email if I make any discoveries.

rgrosz posted this comment on 2010-11-26:

I have just installed Visual Basic 6.0 / Visual Studio 6 under 64 bit Windows 7 using your great instructions. I had a problem installing Service Pack 5, which I must use instead of Service Pack 6. A really smart programmer (GuideX) came up with a great hack to get around the MDAC 2.5 error:
http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/cd740951-dd2c-46eb-856f-6e653a2e3d07

FortyPoundHead posted this comment on 2010-11-26:

Thanks for the share, rgrosz.

GILDY posted this comment on 2010-12-01:

hi everybody!
I read all treads, expecially Jovick, but i can't install vb6 on win 7 64bit.
I turned UAC off, put the cd and run setup as administrator. after the serial code, name and company information, click Next, choose "install visual basic 6 professional edition", next, choose folder for common files, when appears Program Compatibility Assistant warnings click on run program, push me off with message "not compatibility with windows 64 bit version...." can you suggest how to solve this big problem? thanks

CharlieHall posted this comment on 2010-12-06:

Hi,
Just following up on my question on Nov 24th - do you experience the same issue on Win7-64 - that being "Error on loading DLL" when trying to reference a running dll in vb6 debug mode - the compile works fine and referencing the registered dll works fine - but referencing an DLL that is running inside VB6 does not. Any suggestions?

FortyPoundHead posted this comment on 2010-12-07:

I haven't been able to reproduce the problem as of yet. I've got a couple of feelers out to some other folks, and should hear something back soon.

GILDY posted this comment on 2010-12-07:

hi FortyPoundHead,
may I have an answer from you?
Am I wrong doing something installing visual basic 6 pro on win 7 64 bit?
Is it a dream install it on 64 bit or not?
thanks for answers.

FortyPoundHead posted this comment on 2010-12-08:

Hi Gildy -

I currently use Windows 7, 64-bit at home, and 32-bit at work. Both machines have Visual Basic installed, and working flawlessly. I installed both copies utilizing the directions above.

While the process is a bit, umm, verbose, it worked for me, as well as a score of other folks out there.

If you are having a specific problem, let me know, and I will see if I can help.

abhilashr3 posted this comment on 2010-12-13:

Hi
thanks for the great trick
finally i installed vb6 on my windows 7 32 bit os and all things are working fine

but i have another issue
i am using multiple users in my windows 7
user1 and user2

i have installed vb6 on user1 its working ok.
but when i login user2 remotely and run vb6 its stuck in the middile of the opening and shows
windows installer box and showing "preparing to install"

can u please solve this for me

thanks in advance
Regards
Abhi

FortyPoundHead posted this comment on 2010-12-13:

When you log in on the user2 account, insert the VB6 or Visual Studio CD, then cancel the Autorun.

After the autorun is cancelled, try running the IDE. The program may be looking for some files off the CD. Not sure why this would be, but it might be.

Also, try running the IDE as administrator the first time that you run the IDE as user2. Or temporarily make user2 a local administrator on the workstation.

Warlimont posted this comment on 2010-12-18:

I have VB6+Sp6 and recently Windows7 Professional 32bit. It works great, thank you for the useful infos! Except for this:

www.medi-comp.hu/dbgrid.jpg

The Dbgrid component loses the width information of the columns, and the columns became very narrow in the desing phase. If I resize them, next it will narrow again. In the program code I added DBGrid1.Columns(0).Width lines to correct the issue. Run the the program, the rows and columns look good, BUT they are empty, I can't see the data in the dbgrid...

Any idea? Thank you for your help in advance, and sorry for the poor english. :)

mdickerson posted this comment on 2010-12-30:

Have any luck implementing SourceSafe or Subverison?

And do you know if the updated screen look work backwards to client who are still using XP..

from an earlier post---->FWIW - using manifest files (as in XP) works in Windows 7 - giving the app the windows 7 look.

commentluv posted this comment on 2011-01-06:

omg. that just saved me 200 dollars on freelancer.com !! haha

thanks so much for this, I was able to install vb6 on my windows 7 machine and now I can run all my vb applications! woot.

GC posted this comment on 2011-01-07:

VB6 code on Win7

VB6 run in XP-SP3 admin mode on 2 Win7-64Home Premium computers and trying to access mapped network drives on the same win7 computers and Win XP computers on a network
with the same VB6 code

- one win7 can access a network drive on itself but not on the others
- one win7 cannot access any drive
- the xp's can access all the drives
- window explorer can access all of the network drives between all the computers

I use a VB6 code as simple as

MyFile = Dir("T:*.txt")

No error message, the code seems to be ignored

If I replace it with

MyFile = Dir("C:MyFolder*.txt")

it works, I also tried to open and read files on the same drives with the same results

Any idea of what could be wrong? Thanks




AreTeeBee posted this comment on 2011-01-11:

Hello there,

I have followed the instructions given above and the install went perfectly. However, I find that when I open up VB6 I am unable to drag components onto a form. Additional components may be added but again, they are prevented from being dragged across. The only thing I can think of is that installing VB6 on my D drive (I only have a C and D drive) is somehow causing an issue. Can anyone help? I am so close to having VB6 work once more!

Kind regards,

Rob

FortyPoundHead posted this comment on 2011-01-11:

Did you follow the procedure in the update at the end of the article? Turning of compositing, etc?

AreTeeBee posted this comment on 2011-01-11:

Hello again,

Thanks for responding promptly. Sorry, no, I hadn't followed the "update" that follows on from the main install instructions. However, I have now done so, again without any issues, and unfortunately my problem still persists.

I have gone through the motions of adding additional (shipped with VB6) components and noted the .OCX location in the C drive. I can verify that the .OCX file is where it is meant to be. Don't know if this information helps you to help me at all.

Rob

FortyPoundHead posted this comment on 2011-01-11:

@Rob - I've just rebuilt my machine, and will be going through the install for VB6 either tonight or in the morning, so I'll pay extra special attention to look for the problem you are describing.

AreTeeBee posted this comment on 2011-01-11:

Okay, thanks very much. For your information I have tried uninstalling VB6 from my D drive and reinstalling it on my C drive but the problem persists. Additionally, it is the Home Premium version of Windows 7 that I am running, and VB6 Professional (legitimate discs I recently purchased through ebay), if this helps you at all,

Rob

FortyPoundHead posted this comment on 2011-01-12:

ack... snowed in here. can't get to my work machine.

kamaldeep posted this comment on 2011-02-08:

Thanks,
I have successfully installed VB on windows7 according to the instruction. as i new in VB, i hv to upgrade my vb application into windows 7 and want to create exe and setup files. how can i proceed further?
Thanks in advance

FortyPoundHead posted this comment on 2011-02-08:

Well, the first step would be to compile it on Windows 7, then attempt to run the compiled program on Windows 7. Fully exercise all functions of your program, and observe/document any errors that occur.

If you not referencing any Windows XP specific DLLs or controls, you should be fine. That is a bad practice anyway since you tie your program to a specific OS version.

Kingsley posted this comment on 2011-02-12:

I successfully intalled visual basic 6.0 on my window 7 home premium computer, however, Once i open it, and hit run or view code, it just keeps shutting down, I've been trying to unintall it and reinstall it, but that just wont resolve the problem. Can anyone help me out please?

chuboy posted this comment on 2011-02-20:

hi everyone, the vb6.0 setup i used to have got corrupt, been searching for vb6.0 installation online, all the one's i'v got never seem to pass the 'please wait' form .... please am wondering if anyone has the setup ..... ? ... thanks

FortyPoundHead posted this comment on 2011-02-20:

I'd highly caution against getting the setup files from random places online. You never know what's going to be in the package.

Instead, sign up for an MSDN subscription. I've been subscribing for years, and have had no issues finding exactly what I need, when I need it, from a reliable source, in a reliable format.

bigmox68 posted this comment on 2011-03-16:

Hi FortyPoundHead,

Nothing to ask just yet - just come across your article and will be attempting to install VB6 SP6 on Win 7 32bit on Friday and now feel rather confident ( I hope I'm not tempting fate ! ) that it will work !! Thanks in advance !!

FortyPoundHead posted this comment on 2011-03-16:

I am sure it will go smoothly for you. Thanks for stopping by!

TexasJetter posted this comment on 2011-03-23:

Just though I would comment on the network drive access issue posted earlier. It seems that if you are logged on as an administrator Win 7 assigns two security tokens and within VB6 (and Access 97) it gets confused and will not show network drives. It can be overcome by a registry key:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
with a DWord of EnableLinkedConnections = 1
Refer to http://technet.microsoft.com/en-us/library/ee844140(WS.10).aspx for details.

FortyPoundHead posted this comment on 2011-03-23:

Thanks for the tip, TexasJetter!

Bruce52 posted this comment on 2011-04-25:

Thanks for the great information!! I'm running Win-7 64-bit and installed vb6 without any problem.

pnn posted this comment on 2011-04-26:

Thanks so much!
My previous two attempts to install VB6 on Win7 were a disaster.

Now it installed on Win7 SP1 64-bit without a glitch, incl. MSDN.
Then I installed SP6, no problems, just remember to run setupsp6.exe as administrator. Even installed Codesmart2005 which also works fine.

When all done, delete dummy MSJAVA.DLL - I read somewhere leaving it may cause problems with something.

After all this I enabled UAC and VB6 keeps working fine with a UAC prompt at startup. Edited and compiled several projects, no problems!

pnn posted this comment on 2011-05-04:

I have one problem with VB6 on Win7 x64.
VB6.exe is set to run in compatibility mode for XP SP3. Visual themes / desktop composition / display scaling on high DPI are all disabled. The box to 'Run as administrator' is NOT checked, but still UAC prompt pops up each time I run VB6.exe

UAC prompt itself is not a problem, but when I confirm it VB6.exe runs elevated - so I can't debug my apps in a normal(non-elevated) environment in which they will run compiled.
Is there a way to use VB6 non-elevated?

Thanks

dwirch posted this comment on 2011-05-04:

If you have UAC turned on, then there is no way around it that I can immediately think of. Turn off UAC, and don't surf the internet while you are working.

Disable UAC:

http://www.fortypoundhead.com/showcontent.asp?artid=19521

pnn posted this comment on 2011-05-04:

But if I turn off UAC, AFAIK Win7 would behave like XP - if I'm admin, VB6 will run elevated, just this will happen automatically without prompts. This will not make the IDE run in the same environment in which the compiled .exe will run. I guess in 90+ % of the cases the compiled exe will run with UAC on, non-elevated, and want to debug in that mode.

dwirch posted this comment on 2011-05-04:

I don't think so. If the UAC is not turned on, you are not running everything as administrator. You'll be running in the context of the currently logged on user.

Try this:

1. Turn on UAC

2. Fire up a program that requires "run as administrator" via UAC.

3. After the program fires, bring up task manager, making sure "Show Tasks from All Users" is selected. You should see the program running in the administrator context.

4. close the program, and turn off UAC

5. Fire the same program again

6. switch back to task manager, and find the program. You should see it now running under the context of the currently logged in user.

Make sense?

FWIW, I haven't had a problem with developing or compiling on a Win 7 box with UAC turned off, and then deploying the application to other Win 7 boxes which have UAC turned on. The only exception is when the program performs some function that requires elevation anyway, such as user account management, domain management, etc.

azoic posted this comment on 2011-05-17:

Thanks for the information. One thing to add...

I was getting error when compiling and running projects with data reports. Error relates to license information and was corrected by downloading and running (as admimnstrator) Microsoft VBC6 utility (vb6cli). Took me a long time to find this out.

dwirch posted this comment on 2011-05-17:

Thanks for the info, azoic. I'm sure it will help someone else out!

catfish891 posted this comment on 2011-05-21:

Is it possible to re-enable UAC? Was disabling just for installation, or is it required for runtime as well?

dwirch posted this comment on 2011-05-21:

You are correct - you can re-enable UAC after installation. Disabling the UAC is only required during installation due the installation and registration of DLL files.

Bert posted this comment on 2011-05-23:

Thanks for this technique. I just got Win7-64 and need to install VS6. Do you know if this approach will work for the other components of VS6, specifically VC++ and VFP? Or is a different approach needed for those?

dwirch posted this comment on 2011-05-23:

It *should* work. I haven't tried it myself, though.

Wrong Planet posted this comment on 2011-05-28:

As part of my VB6 install on Win7 I also need to install MSDE 2000. The word is to install MSDE in an XP virtual PC. This shows my lack of knowing how virtual pc works, but will there be any problem accessing my MSDE databases with VB6 being outside of the virtual pc? Anybody else do something like this?

Jim Webb posted this comment on 2011-06-05:

Thanks very much!!! You saved me countless hours. VB6, MSDN and SP6 all installed without a hitch. I forgot to turn off UAC but all seemed to work fine. I hope my negligence will not mess up anything in the future. However, if I have to do the entire thing again, it's not a problem. Thanks again! Jim

dwirch posted this comment on 2011-06-05:

Happy to help, Jim! Glad it worked out for you.

delooz posted this comment on 2011-06-09:

Thanks for this great explanation.

I need to update an old VB6 application, but when running it under windows 7 the listview does not seem to work.
Any ideas??

dwirch posted this comment on 2011-06-09:

How does it not work? Not visible? Not filling? Custom list box not displaying properly? How are you filling it?

delooz posted this comment on 2011-06-09:

It is not visible.

dwirch posted this comment on 2011-06-09:

Can you create a new form, drop a list box on it, and see if it works?

delooz posted this comment on 2011-06-09:

No, that is the problem.

The development is still on a XP machine.
But a test was done in windows 7, I don't have acces to that PC.

dwirch posted this comment on 2011-06-09:

I can't seem to reproduce the problem here. I've tried on several machines, and everything seems to be working fine.

I've tried installing just an application, and installing VB6 and building a new app on the Win7 box directly, and both work with no issues.

Are you sure that listview is not a custom control that might be missing from the Windows 7 machine? Are you maybe referencing some API that is not present on the Windows 7 machine?

delooz posted this comment on 2011-06-09:

Thanks for your help.
I'll have a word with our sytem engineer.

dtsolutions posted this comment on 2011-06-11:

Fortypoundhead, you are my new hero for this great service to society ... everything is working fine for me after following the instructions, now I just have one problem which I hope is not too far off topic, regarding data access components (actually I think the true subject is "how to reference older versions of components in VB6/Win7"): My project references msado21.tlb (Microsoft ActiveX Data Objects 2.1 Library) and msjro.dll (Microsoft Jet and Replication Objects) ... I need to keep the (very) old versions (actually I think only msjro.dll is involved here) so my app keeps running on all the older boxes it's now running on ... but I can't figure out the right procedure for registering the old version of msjro.dll (and msado21.tlb if necessary) on the Win7 box and referencing it in place of the new version ... any help is greatly appreciated.

dwirch posted this comment on 2011-06-12:

MS ADO 2.1 should be already registered in there. MSJRO.DLL is part of MDAC 2.1, so it should be there, too. Try a search of your C:Windows directory, recursing subdirectories for msjro.dll.

You should find it under something like:

C:\Windows\winsxs\x86_microsoft-windows-m..replication-objects_31bf3856ad364e35_6.1.7600.16385_none_801590ce06e5579dAfter that, just register it with regsvr32, and it should be ok from there.

dtsolutions posted this comment on 2011-06-12:

Thanks for the response ... I do have 2 copies of msjro.dll, one in winsxs as you suggest, and one where it's supposed to be in Common FilesSystemado ... but they are the same version, 6.1.7601.17514. This version is apparently not even compatible with my Vista version 6.0.6001.18 ... and for full backwards compatibility I need to register version 2.81.3012.0, which is the version I've been compiling with for years on my old XP box. I have 2.81.3012.0 in my project folder ready to go, but it won't register ... any hints?

dwirch posted this comment on 2011-06-12:

can you try bringing over the required version from your xp box, dropping it in a different directory of course, jump to an elevated command prompt, then try registering it?

dtsolutions posted this comment on 2011-06-12:

I may not know exactly what you mean by "elevated command prompt" ... I am running cmd.exe with administrator privileges, is that the best I can do?

I have tried to register from both the System32 directory and the SysWOW64 directory ... same result, a RegSvr32 error message "The module c:ado_oldmsjro.dll failed to load.

Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.

The specified procedure could not be found.

Any more ideas?

dtsolutions posted this comment on 2011-06-12:

Uh-oh, I found some scary stuff but with a possible solution:

"Windows 7 SP1 has broken backwards compatibility of MDAC 2.8. Software compiled on Windows 7 SP1 that relies on MDAC ADO will not work on Windows versions prior to Windows 7 SP1 (including Windows 7 RTM, Vista, XP). Microsoft has provided solutions to work around this issue for some applications but VBA applications remain affected."

And the possible workaround (for my case it looks like I'll have to upgrade from ado 2.1 to ado 2.6 - don't know what kind of problems that will cause):

http://support.microsoft.com/kb/2517589/en-us?sd=rss&spid=14481

Will post again after trying the fix...

dtsolutions posted this comment on 2011-06-13:

Ok, the linked workaround worked as Microsoft intended ... at least, my app is now working on my Vista box (warning to readers of this post: this particular app doesn't use anything but the very simplest ADO code). I'm not happy about having to upgrade to ado 2.6...

dwirch posted this comment on 2011-06-13:

I don't think you'll run into any problems - I've got a couple of apps that were developed with 2.1, now happily running with 2.8.

alanserr posted this comment on 2011-06-17:

Thanks for the detailed help in installing VB6 on Win 7 x64. It all seems to be working 100% - including MSDN.

dwirch posted this comment on 2011-06-17:

Glad to be of assistance, alanserr!

alanserr posted this comment on 2011-06-17:

Darn, I spoke too soon! There's one irritation that I'm hoping you have come across before - When running the Package and Deployment Wizard, the app sticks on the "Loading package types" screen for some time (3-4 minutes), before continuing as normal to the "Packaging Script" screen. Any ideas?

dwirch posted this comment on 2011-06-17:

I actually don't use the PDW, but Inno Setup. Much more flexible and reliable. I'll see if I can duplicate your problem, though.

alanserr posted this comment on 2011-06-22:

I was being lazy in having to learn a new app. I guess I'll have to get to grips with Inno Setup and packaging VB6 apps for the different Windows platforms - what to do about the system .DLL and .OCX files etc.
Thanks for your advice.

dwirch posted this comment on 2011-06-22:

Inno handles these things quite nicely, and is very straightforward in configuring the installation of DLL and OCX files. If you can write and understand an INI file, then you should have no problem with Inno. It's even free!

Can't say enough good things about it. And nope - I am not affiliated with the author in any way. Just a fan.

alanserr posted this comment on 2011-06-22:

I haven't yet had to work with INI files but I'm sure it's just a syntax thing. I've installed Inno and it looks pretty straight forward but.......that learning curve begins!

Thanks again for your help.

dwirch posted this comment on 2011-06-22:

Happy to be here, proud to serve.

sgeinc posted this comment on 2011-07-03:

Cannot Save Files in VB6 Windows 7
1. click Save Project
2. Window "Save changes to following files"
3. Click Yes
4. exit IDE
5. Does not let me exit but loops to "Save changes" again
6. I cannot get out of this loop without ending program in Task Manager

I moved my VB6 project from folder "Program Files" to another

dwirch posted this comment on 2011-07-03:

Do you have a the necessary NTFS permissions to save to the location you trying to save the project to?

rap posted this comment on 2011-08-03:

Upon starting my installation the computer asked me:

Are you sure you want to update the VB6.0 Common Controls (Q896559)?

Should I proceed??

FortyPoundHead posted this comment on 2011-08-04:

Yes. No harm will be done in updating the VB6 common controls.

redzoneglobal posted this comment on 2011-08-11:

Wanted to thank all for their contributions! I had been running VB6 on a 7 yr old XP box (It was a workhorse, but finally died).. So, I've got VB6 installed, SP3 & SP6 installed on my new Win7 box, and all looked good, until I went to run my first legacy program.

We have a remote SQL server that this legacy program connects to. Always ran fine on my XP box.

I have the ODBC configured and tested successfully in the ODBC Data Source Admin. (Done this a zillion times on various boxes.

RDO connection code is pretty generic.

Dim db As rdoConnection
Dim RS As rdoResultset

Declared in the General area, have a reference in the project to MS Remote Data Object 2.0

sConnect = "UID=sa;PWD=############;"
Set db = rdoEnvironments(0).OpenConnection("ppcbidtracker", 1, True, sConnect, 32)

Do While db.StillConnecting = True
DoEvents
Loop
db.QueryTimeout = 1600

Code executes the db connection above with no errors, but then the code below errors: The rdoConnection object is not connected to a data source.

qs$ = "SELECT ActionDate FROM activeengines"
Set RS = db.OpenResultset(qs$, 2, 4, 64)

I'm lost! I use this type of query and RDO resultset in 99.9% of the SQL server access in my legacy VB6 programs.

How can I get a good connection to the SQL Server, but get the RDO Connection error when I try and execute a query?

I'm beginning to really hate Win7!

poli0651 posted this comment on 2011-08-29:

Hello:
After install vb6 @win7 64 bit follow above steps,I went to run my sample program ,it looks good on XP box.
but I use the datediff() api,it show the below error message"
invalid procedure call argument" on a win 7,
How can I use this function on Win7??
Thanks

dwirch posted this comment on 2011-08-29:

You might want to check your logic, or values that you are feeding to the function. The DateDiff function is working fine for me here, using VB6 on Windows 7 x64. Works fine in the IDE, or compiled.

ko6no posted this comment on 2011-09-03:

I tried unsuccessfully to use your method to install VB6.0 Pro on Win 7 64b. It didn't work because my CD didn't have the Install Options you list. I will try it again and make notes of where it differs.

I am trying to make my App which works on XP run on W7. I get a Runtime Error 380. Need the IDE working to find out where.

Beginning to hate MicroSoft.

ko6no posted this comment on 2011-09-03:

In previous comment, I said that I could not get VB6 installed. I just went through the procedure for Custom Install again and everything worked. VB6 working on W7 OK. Thanks.

ko6no posted this comment on 2011-09-05:

In one of the comments above, I saw mention of SP6 for VB6. I found a download site for this but no description of what it does. Is there a tutorial covering SP6?

dwirch posted this comment on 2011-09-06:

I'll get something together for you, ko6no

Isha posted this comment on 2011-09-12:

Thank you sooooo much you have been a Grrrrrr88888888!!!!!!!!!!!!!1 help nobody could help me thanks allloooooottttt!!!!!!!!!!

carlfo posted this comment on 2011-09-15:

Install went fine. But when I hit start for even the simplest program (one line), I get, "Visual Basic Has Stopped Working". It seems to happen on compile, I never get to my code in debug. Any ideas? Thanks

dwirch posted this comment on 2011-09-16:

Have you gotten any matching entries in the system or application event log?

Joe posted this comment on 2011-09-17:

Tried to install VB6 on Win7 64bit before I read this forum and now when I tried do it right it comes up only w/ Server Setups/BackOffice Installation Wizard but not VB6?

dwirch posted this comment on 2011-09-17:

You might try uninstalling any remnants from your previous installation before trying to reinstall.

Joe posted this comment on 2011-09-17:

Deleted "c:Program FilesVisual Studio" but problem still exists?

reza_OTMS posted this comment on 2011-09-17:

I have instaled vb6 on win 7 successfully . but while I was trying to run my project i faced to below error:
"copmiler error - can't find project or library."
in windows xp this error was because of dont instalation of office but after install office the problem still exist on my machine with win 7 home premium.
is here anybody how can help me ?

dwirch posted this comment on 2011-09-17:

reza - what libraries does your project reference?

dwirch posted this comment on 2011-09-17:

Joe - Why did you not use the uninstall under the control panel ? The problem is that the registry still thinks that your package is still installed. Simply removing the directory is not enough to remove the information from Windows.

Jug Ears posted this comment on 2011-09-20:

Great page. Glad I found it. Am having problems installing VB6 on a win 7 Pro 64 bit (new) machine. I didn't have the instructions above but persevered all the same and installed the IDE with all attendant special Active X controls. The huge legacy application worked well. I then installed VMWare and Office 2010. Oh! And Skype too. And SP1 for win 7. (I forgot). When I tried the legacy app again, it started to give me problems relating to 'recordsets'. I can see that the definitions in the .vbp file have been adjusted to 'compensate' for Program Files (86). Anyone have any ideas. A line with 'Set rs = .......'gets the error 'Compile error - Object library invalid or contains references to object definitions that could not be found'.

My applications are heavy on recordset use.

I have another installation of win 7 pro eng where the code will run.

It's all very confusing.

dwirch posted this comment on 2011-09-20:

There seems to be a theme starting up. I've run into half a dozen or so people now that begin to have problems with recordsets after installing SP1 for Windows 7.

I'll see if I can find a solution, and report back here.

Jug Ears posted this comment on 2011-09-20:

Thanks for the trouble. Of course, I could always use XP Mode but that would be giving up. The Win 7 machine where it does work also has Office 2010 and VMWare installed and VB6 still works. I will examine the SP1 issue. It is installed on an additional hard disk on this computer and I would have to restart to 'get to it'. Restarting Win xp again would sap another 35 mins until XP has 'settled down'. When I do get Win 7 up and running with all attendant applications and utilities, I can't wait to re-install a new copy of XP here and rebuild.

Jug Ears posted this comment on 2011-09-20:

dwirch. I have checked the second installation of win 7 pro eng and the VB6 works fine there with the various recordsets. The Win 7 is without SP1 Hmmmmm.

dwirch posted this comment on 2011-09-20:

Just got home and checked, and my home workstation is running Win7 Ultimate, x64, SP1. Recordsets appear to be working fine.

The only virtualization that I have running currently is virtualbox on the local machine, although there are VMWare activex controls installed, to allow views into my ESX server. Office 2010 is installed as well.

I'll try building a new project and compiling just to see if it is a "new build" problem with SP1 machines.

Jug Ears posted this comment on 2011-09-20:

Well. I do have win 7 ultimate with sp1 iso file on disk D:. Downloaded it from msdn three days ago. However, I will wait a few days to see if you or other commenters have a better solution. It would take me two days to get to the point that I am now on the existing win 7 installation if I reformatted and installed win 7 ultimate. And I would prefer win 7 (64) pro as I expect that most of our customers will be using that version of win 7 in the future when they will have eventually given up on XP. Not because of anything specifically bad but because Microsoft will eventually say that it no longer supports XP.

I do think that Microsoft made a mistake calling Program Files and program Files (86). It should have been Program Files (64) and Program Files. I think that they may have saved themselves a lot of grief had they done so.

dwirch posted this comment on 2011-09-21:

So here is a question - and I am kind of embarrassed that I didn't ask it sooner - Does your app rely on a particular version of ADO? What MDAC is installed, and what is referenced by your project?

Jug Ears posted this comment on 2011-09-22:

My app relies on MDac 2.8

ON my XP machine:
Reference=*G{00000600-0000-0010-8000-00AA006D2EA4}#2.1#0#....Program FilesCommon FilesSystemadomsadox.dll#Microsoft ADO Ext. 2.1 for DDL and Security
Reference=*G{00000205-0000-0010-8000-00AA006D2EA4}#2.5#0#....Program FilesCommon Filessystemadomsado25.tlb#Microsoft ActiveX Data Objects 2.5 Library

On my Win7 machine:
Reference=*G{00000600-0000-0010-8000-00AA006D2EA4}#2.1#0#....Program Files (x86)Common FilesSystemadomsadox.dll#Microsoft ADO Ext. 2.1 for DDL and Security
Reference=*G{00000205-0000-0010-8000-00AA006D2EA4}#2.5#0#....Program Files (x86)Common FilesSystemadomsado25.tlb#Microsoft ActiveX Data Objects 2.5 Library

They are the same except for the (86). I used Total Commander Compare utility.

Do you have any hints how to improve the speed of network discovery between the two machines in a simple, (but Microsoft 'simple'), home network.

Be happy to provide any other information.

dwirch posted this comment on 2011-09-22:

Have you tried:

http://www.fortypoundhead.com/showcontent.asp?artid=20562

FortyPoundHead posted this comment on 2011-09-22:

If you open it in the IDE on the Win7 machine, and can you remove and re-add the references?

Jug Ears posted this comment on 2011-09-22:

'If you open it in the IDE on the Win7 machine, and can you remove and re-add the references?'

Well. I did a bit of detective work there. The reference is to msadox.dll. On the XP machine, it is in the 'right' place and is version 2.81.3012.0

On the Win7 machine the version is 6.1.7601.17514

Obviously a big difference. I tried to backup the win7 copy and replace it with the XP version BUT, when trying to rename it on the Win7 machine, I get permission from TruthInstaller to make changes to this file.

One thing that really puzzles me is that the installed finished (commercial) application still runs smoothly.

Any chance of using Skype between us. I could let you see my win7 screen with the screen sharing facility and the info sharing between us would be speeded up. I could then update this post when we have arrived at some solution.

I am Greenwich Meantime + 2. I use screen sharing with the USA on a daily basis. Assuming that is where you are.

Jug Ears posted this comment on 2011-09-22:

DWirch. Yes. I have network discovery turned BUT, I have to initiate it each time win7 is 'started'. And it is slow. I use TotalCommander for file manipulations and it often doesn't 'see' the other machine.

I find using windows explorer screens very limited but they do look nice relative to the TotalCommander. But still, as a programmer, content and ease of use is so much more important than look.

Two XP machines on my network are much, much faster 'discovering' each other but the rate of data transfer seems the same.

dwirch posted this comment on 2011-09-24:

Try this from an elevated command prompt to speed up your slow discovery problem:

netsh interface tcp set global autotuning=disabled

Jug Ears posted this comment on 2011-09-24:

Thanks for the attention dwitch.

I did it. The command prompt needs to be run as as administrator. After I estarted WIN 7 and double clicked the network icon.

I can't say that there is any improvement in 'discovery' time.

I can live with it but I bought an i7 processor with 8 GB of fast memory and am a bit disappointed with some of the performance. Other things work blindingly fast. VMWare for instance and installations are very quick. Copying large files on the same diak is 'very fast' too.

Anybody have any ideas on the MDac problem.

If I don't see my way out, I will reformat the disk, install Win 7 enterprise and XP mode and use XP mode for the VB 6 IDE.

Sort of giving up really BUT, if a solution does materialize afterwards, I can always install it directly on the win 7 machine at a later date.

man1932 posted this comment on 2011-09-30:

Installed VB6 on my pc with Win7 64-bit. But it seems that VC++ is not working as should. I can compile but the program won't run. Does VC++ work with this installation method of Visual Studio 6 on Windows 7 64-bit?

Thanks for your help.

dwirch posted this comment on 2011-09-30:

It *should*. I can't say for sure, as I am not a C++ kind of guy.

aquamarine_kath posted this comment on 2011-09-30:

Hi. I installed vb6 on my friend's laptop. It was installed but when I double click the control on a form to write a code, vb6 stopped working..The error says, "VB6 has stopped working." I can't write a code. How can I fix this?
OS is windows 7 home basic and it is 64 bit.

man1932 posted this comment on 2011-10-01:

Thanks dwirch. If there someone out there who have successfully installed VC++ please let me know how you did it.

Thanks

dwirch posted this comment on 2011-10-01:

@aquamarine_kath: Are there any matching errors in the event log?

aquamarine_kath posted this comment on 2011-10-01:

hmmn, there's nothing any matching errors except it just stopped working when writing a code..

Jug Ears posted this comment on 2011-10-02:

man132 - do any of your vb apps use memory recordsets. That is recordsets created by code and populated and manipulated with code???

And is you Win 7 service pack 1??

MCxWillyxP posted this comment on 2011-10-05:

So I have the disk files and license code but I don't have the disk. Whenever I run setup.exe, I get a pop-up informing me that "This program has known compatibility issues", I hit 'Run Program', then 'Next' and then the setup stops working and I get told by Windows to close it. Any help?

Jug Ears posted this comment on 2011-10-08:

MCxWillyxP. Did you read the instructions at the top of this page???

luisev posted this comment on 2011-10-14:

i've successfully installed vb6 but my problem is i cannot open the view code..plz help..

dwirch posted this comment on 2011-10-14:

I've not seen that before. Have you tried double-clicking a control, or the form itself?

luisev posted this comment on 2011-10-16:

i've already did that and there's always saying windows are checking solutions to the problem then msgbox appear debug or close program.

GerardK posted this comment on 2011-10-31:

Great site. My question is a bit different. I have a VB6 app compiled in 1999 ans used by many users. I want them to be able to instal and execute the 1999 version on a W7 workstation. The app installs fine and starts up fine.

However in the code I have a clock synch procedure that checks that their clock is correct based on a time offset setting. It uses the VB6 system variables Date and Time.

But I get an error trying to set these in Windows 7. I do not run across any issues with setting these variables on a windows XP machine.

So for now I am not forwardly compatible with my app. Is there a way to run the app under a different setting or other trick to get past the Date = or Time = intruction when the OS is W7?

Can a Windows XP compiled VB6 app run on Windows 7 after installing the setup of the XP compiled app. we would like not to have to recompile etc. just have users switch OS to Windows 7 and it runs.

Any ideas? Thanks in Advance.

dwirch posted this comment on 2011-10-31:

Sounds like a permissions issue.

Are you setting date and time? or simply getting the date time? If you are setting it, does the user have permissions to set the date time, without elevation?

Remember, if the user context that program is running in does not have permission to do certain things, then your program will not have permission either.

You can test this by performing a Run As... and running the program as a user that has administrative permissions on the machine.

gwilliams posted this comment on 2011-11-02:

I'm having problems running VB6 web app (ASP Classic) on Windows 7. Compiling the code via command-line works fine and the produced DLLs behave as expected. However when I try to run the code through the IDE I get a WebClass Designer error "An unspecified error has occurred". As you can imagine this message was not met by a wave of calm, and is causing me a great deal of discomfort. I can run Win Form apps perfectly fine. No references are missing. Any ideas?

dgordon42 posted this comment on 2011-11-04:

Great advice about how to set up VB6 on a modern machine - Thanks

I used your procedure to load VB6 and VB6 SP6 on a Vista 64 bit OS.

One small problem, when loading componments into a project I get a "Cannot access Registery" error, although the components seem to load OK. I closed VB6, drilled down into the disc to find VB6.EXE, and raised the security for Users to "Full". This seemed to fix the problem, maybe it will help someone else.

Thanks Again.
DG

FortyPoundHead posted this comment on 2011-11-04:

Good catch, dgordon42! Your approach certainly works for more secure systems. Just out of curiosity, would right-clicking and select Run As Administrator have the same effect?

steve posted this comment on 2011-11-04:

I installed VB6 and SP6 as per your great instructions on a Windows 7 machine.

Editing and compiling work fine. The first screen of the Package and Deployment add-in works too. However, the first screen takes several minutes to complete, whereas in XP it took several seconds. The completed installation package works on Windows 7 and XP.

However, on Windows 7, if there is more than one form with "Show in Taskbar" set to True, there are flaws in the operation. Only one button appears on the taskbar. When this button is activated, a menu appears with the several forms listed. Clicking on the menu causes the form to pop on the screen. However, clicking on the menu X does not pop the form off the screen. Also, "Close All Windows" does not work. Any hints or suggestions would be appreciated.

Woti posted this comment on 2011-11-17:

I installed VB6-Prof-SP6 on Win7-32bit-Prof and have 2 problems:

1. I can't scroll in a VB code module.
In any other application I can scroll with the mouse.
The mouse is a Logitech, that is registered as Microsoft PS/2 Mouse

2. I use VB-Partner as Addin but I get the message that "ACTBAR.ocx
is not registered correct".
ACTBAR.ocx is in C:windowssystem32
When I run
C:windowssystem32 egsvr32 C:windowssystem32ACTBAR.ocx
I get no reply. I did it also with UAC OFF.

Do you have any ideas that do do ?
Thanks in Advance

dwirch posted this comment on 2011-11-17:

VB6 scroll wheel addin:

http://support.microsoft.com/kb/837910

and does ActBar.OCX actually exist at the path you've given?

Jug Ears posted this comment on 2011-11-17:

With reference to my problems running VB6 on a Win 7 machine after installing sp 1. (See 2011-09-20)

There is a lot of discussion at http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/3a4ce946-effa-4f77-98a6-34f11c6b5a13 where Microsoft owns up to the problem. Someone claims that there is a solution in win 8 and another pleads for an MDac service pack.

Microsoft makes our lives a misery. A misery.

Woti posted this comment on 2011-11-18:

Many Thanks to dwirch.
Your answer helped 100%

My second problem is also gone.
Now the registration of ACTBAR.OCX was successful.

NewGeekSteve posted this comment on 2011-11-20:

Firstly, thanks for taking the time to help with issues like this. I feel a bit of an idiot asking this question as it seems so obvious to everyone else but: how do you create the dll file in the first place?

dwirch posted this comment on 2011-11-20:

Hey Steve - don't feel like an idiot! That's what we are here for, is to answer questions!

Open a command prompt, and change directory to Windows, then type:

COPY CON MSJAVA.DLL

After hitting enter, you'll just a blinking cursor. Just press F6 and enter, and your zero-byte file will be created.

wavy posted this comment on 2011-11-21:

Great thread, seems to be the only place to go for info on running VB6 on Win7, thank you! I went through the install procedure a few months ago and it had been working great. I'm on Win7 x64. I've had periodic problems with the IDE menus becoming unresponsive and it seems to be happening much more frequently lately. Basically, a handful of the IDE menus and toolbars will just stop working, such as Exit, Save (all of 'em), Run, Options, etc.. and a slew of others. Other times some of the above menu items will work and not others. The keyboard shortcuts for the menus are unresponsive as well. However I'm always able to edit code and switch between files, which leads me to believe it's not the CPU spinning out of control (verified by task manager). Any clue what this might be or where to look? Event logs show nothing useful.

Thanks!
Dave

dwirch posted this comment on 2011-11-21:

Wow! That's the first I've heard of a slow degradation of the IDE. And nothing in the background hogging cycles? Visual styles turned off? Compositing turned off?

Anyone else seen this?

wavy posted this comment on 2011-11-21:

Yep, running in win xp sp3 compat mode with "visual themes", "desktop composition" and "display scaling on high DPI settings" all disabled... and cpu and mem usage looks fine. The IDE runs fine for a while but seems to get in this weird state after editing for a while, like 15 to 45 minutes, depending on it's mood. I've lost a fair amount of code due to suddenly being unable to save... good times!

wavy posted this comment on 2011-11-22:

So, playing with this some more today... I disabled all my add-ins (should have done that first thing), which consisted of the mouse wheel fix and mz-tools. I'm now 95% sure the issue I'm having is caused by mz-tools, namely the "Find procedure caller" feature. After running that feature I start to see the behavior I described above. Anyone running mz-tools without issues? So, this may or may not have anything to do with the fact it's running on Win7, but have never seen this issue before on xp, though I found this on the mz-tools site:
http://www.mztools.com/v3/faq.aspx#MenusCorrupted
Sounds similar to the behavior I'm seeing but not exactly.

dwirch posted this comment on 2011-11-22:

Never used it, but I am downloading the demo to test your theory ;)

wavy posted this comment on 2011-11-22:

Awesome dwirch! Let me know if you see the same thing.

Here's a use case:
1. Install mz-tools
2. Open a project.
3. Go to a method definition, highlight the method name, right-click the highlighted name->MZ-Tools->Procedure Callers (might have a better chance of repro-ing if there are many calls to the method you highlighted)
4. Double-click one of the instances in the procedure caller results window.
5. Select menu Tools->Options...
6. If the options window is not displayed after selecting the options menu item, you've successfully repro'd

I should mention, I went through the steps described in the mz-tools faq (resetting the toolbars) and it did not solve the issue I'm having.

craigkl posted this comment on 2011-11-24:

Thanks 40poundhead. Following your advice I got VB6 installed with no problem on my new i7 64-bit Windows machine. My difficulty now is with a couple of the add-in OCXs that I use -- LeadTools and TX Text (both old versions.) (TrueDB Grid installed just fine.) When I try to start their SETUP programs I get an incompatible program message, and none of the compatibility settings that Windows suggests do any good. When I click the "Start the Program" button in the compatibility dialog, the wait cursor spins for about a second and then just quits.

This is way beyond your call of duty, but if you are installing VB6 and old OCXs I am just hoping that you have encountered this kind of problem before and know how to fix it. I suppose I could copy the various OCXs and DLLs over from my old machine and try to register them, a real PITA, but that still leaves the problem of getting their licensing file schemes to cooperate, a nut I have never been able to crack.

Thanks for whatever suggestions you can provide!

Jug Ears posted this comment on 2011-11-25:

craigkl. Are you using MDAC?

michaeldalnay posted this comment on 2011-11-29:

This is a very helpful link.. but for now i really need to know on how to create a zero byte .DLL ? can anyone please provide me the steps, i really need to install vb6 on my win7 ultimate 32bit OS , since this is the only computer i have. and i need it badly for school thesis :( .. hope you'll reconsider my request. thank you.

dwirch posted this comment on 2011-11-29:

Open a command prompt, and type the following lines, pressing enter after each line:

CD\WINDOWS
COPY CON MSJAVA.DLL

After hitting enter, you'll just a blinking cursor. Just press F6 and enter, and your zero-byte file will be created.

schulzzz posted this comment on 2011-11-30:

Hey, i followed all the instructions above an am not able to install vb6 on my win 7 Home Premium 64bit.

The only difference is ta´hat i'm installing from my hard disc.

with the first install i did all the steps, uac off, msjava.dll created, entered license infos, name all all whats needed an clicked OK - mesage is "searching for installes ...."

and that's it?!

after 30-40 min. i quitted, nothing is installed.

The registatration an other infos are recognized, if i start it again, i must not enter the infos again - but´there's again the message "searching...." as above, an the install freezes.

if i delete all visual basic 6 entries from registry, i can start with the install as on top..


Wht do i wrong??
Pleas help.

Thank you.

craigkl posted this comment on 2011-12-01:

Jug Ears,

In response to your question of 11/25, yes I use MDAC, but have had no problems installing it. I don't think this has anything to do with the other OCX install problems I referenced on 11/24.

dwirch posted this comment on 2011-12-01:

shulzzz - try burning your install directory to a cd, and installing from there. Failing that, create an ISO from the directory, mount the ISO, and install from that.

and you are sure UAC is off?

mccindy posted this comment on 2011-12-05:

I am having problems with ADODC Recordsets. I moved a VB 6 (SP6) project from XP to a Win 7 64 bit system. My movecomplete functions get a compile error "procedure declaration does not match the description of the event or procedure having the same name". I've searched some, but can't find a solution that works. The project reference includes Microsoft ActiveX Data Objects Recordset 2.8 library on both the XP and Win 7 systems. The other references all look the same on both systems. Can you provide any input?

Here is the code declaration that is failing...

Private Sub AdodcImportData_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

dwirch posted this comment on 2011-12-06:

Hi McCindy - I've posted your question over in the Q&A section. You can see the answers by clicking on the Q&A link at the top of the screen.

You should get an answer pretty quickly. There are lots of smart folks that have their eyes on that section.

ern1943 posted this comment on 2011-12-08:

Have uccessfully installed on W7 64 bit but I am stumped at installing SP4. I cannot seem to get the MDAC 2.5 components loaded even though I've followed the instructions religously.
thanks

Louw222 posted this comment on 2011-12-08:

I just attempted to install VB6 onto Windows 7 Professional 64-bit. Although I followed the instructions you provided, the responses from the OS were different in a lot of places. I guess that the instructions were written for Vista, not Windows 7. I muddled through and eventually got it installed.

The problem was installing Service Pack 5. I get the error message: "This Service Pack requires MDAC 2.5 or greater ..". MDAC 2.5, 2.6 & 2.8 are, in fact loaded and work correctly. Executing "MDAC_typ.exe" does nothing.

Any ideas?

ern1943 posted this comment on 2011-12-08:

I found this regarding the MDAC issue with installing the SPs
Did as instructed and all fixed......yippeeee

http://social.msdn.microsoft.com/forums/en-US/windowsgeneraldevelopmentissues/thread/cd740951-dd2c-46eb-856f-6e653a2e3d07/

Jug Ears posted this comment on 2011-12-17:

Just an update.

Have re-installed WIN7 (64) Ultimate on my 8GB i7 processor machine. Have installed VMWare and will be installing VB6 on a new VM XP machine with office 2003 and Wise Installer 8.

I already have a WIN 7 Virtual Machine with vs2010 and office 2010. Couldn't find a control which successfully imports and exports Excel files, (xlsx) in a 'German' environment where the decimal separator is ",". So we made an NET Exe file in vs2005 using ComponentOne flex grid .Net which manages the import and export without any trouble and blindingly fast even for a multi worksheet file.

Spread 8 (Active X) - Grape City, which is what we were using, know of the problem, (multiplies numerical values by 100 in the exported file), since September but seem loth to correct it even though I imagine that it is a minor piece of code changing inside the control to be aware of the decimal separator. (The problem occurs when 'exporting'. Not when importing.

Sorry to be a 'traitor' but work must go on and promises from Microsoft that WIN 8 will solve the MDAC problem are not satisfactory at this stage until WIN8 is 'production'.

ramnath555 posted this comment on 2011-12-20:

Thanks for the Great Tip. I got vb 6 installed and everything is working fine.
But the VB6 application compiled on windows 7 platform is not running on the Windows XP system. Why? have you any idea? (Sorry the same issue would have already posted here. i am not able to locate it)

dwirch posted this comment on 2011-12-20:

Any errors you could share would be greatly helpful in diagnosing your problem.

ramnath555 posted this comment on 2011-12-20:

There is no error. I have an MDI Main form (Frm_RMSMAIN). But the first form is other one in the name of frm_database, opened in vbmodal for selecting database. From there i open the mdi parent form. the program flow works till it tends to open MDI form. After that without any error the application ends. (Right now i am debuging it with breakpoints with msgbox "1" "2"...and so on) So far i found out this. You can come on teamviewer if you would like.

ramnath555 posted this comment on 2011-12-20:

i am on yahoo messenger. ID is ramnath555

foxilla posted this comment on 2011-12-23:

how to create a zero byte file sir?

dwirch posted this comment on 2011-12-23:

foxilla:

Open a command prompt, and change directory to Windows, then type:
COPY CON MSJAVA.DLL
After hitting enter, you'll just a blinking cursor. Just press F6 and enter, and your zero-byte file will be created.

dwirch posted this comment on 2011-12-23:

ramnath555:

that sounds like a tough one. I am not really sure where to go with it, with no real debugging information other than an approximate area of flow where it is stopping.

Have you tried *not* firing the main form? Rather, create a dummy form, with nothing on/in it. After the first form completes, have it fire the dummy form instead. If the program doesn't bomb, maybe something in the main form is having a problem.

Any weird DLLs or controls being used? Non-standard database access?

razausmani posted this comment on 2011-12-25:

When I install the VB 6.0 on Win 7.0 (32-bit) VisData.exe has stopped working and several messages after this appears. The installation completed successfully, but when I try to load my project. It say, "Unable to read System registry"

dwirch posted this comment on 2011-12-26:

You might need to re-install MDAC / DAO to get rid of the visdata error.

Did you turn off UAC? Failing that, you might try running the IDE as administrator.

ramnath555 posted this comment on 2011-12-29:

dwirch:

Not yet got a solution for my problem. But the VB 6 is working fantastic with Windows 7. It is very fast (than in XP).

I should really thank you for this.

I do the compiling in windows XP. And also create the Setup file also with XP only.

ISA posted this comment on 2011-12-30:

Hi
Just wondering if JVM is a required dependency for Visual Studio 6. I am trying to install VS6 on Win7 64bit machine.
thanks.

FortyPoundHead posted this comment on 2011-12-30:

nope- not a requirement. Check out the original post above, and the comments below, especially the part about creating a zero-byte file to get around the JVM requirement.

Hvanaken posted this comment on 2012-01-02:

I installed VB6 on W7 64 ok. Thanks for the great information.
I've installed SP6 with no problem.
I have one unresolved problem.
I get a message that I don't have a license to use the msflxgrd.ocx in development environment.
I found a VB6controls.reg that was supposed to fix that but it doesn't

FortyPoundHead posted this comment on 2012-01-02:

Have you tried to re-register the OCX manually?

Hvanaken posted this comment on 2012-01-02:

Yes I have unregistered and reregistered and it registers ok
It can be used in compiled mode. E.g. App.exe

ISA posted this comment on 2012-01-12:

Thanks.
Just wondering what JVM is used for and what sort of issues I can expect with VS6 by not having JVM?

Thanks for excellent information.

dwirch posted this comment on 2012-01-12:

If you're doing java development, you'll need a JVM, but you don't want the version that is packaged with VS6

ISA posted this comment on 2012-01-13:

what version of JVM is recommended/supported for VS6?

dwirch posted this comment on 2012-01-14:

A JVM that adheres to the Java 1.1 standard laid out by Sun Microsystems. The problem lies in that the detection of JVM in the VS6 setup does not detect newer versions of JVM, and forces you to install an old, moldy version. Hence the instructions around JVM in this post.

gowans07 posted this comment on 2012-01-16:

Installed VB6 no problem without the need of running as admin etc, problem now is installing SP6 i've downloaded the file saved it into a folder, set the run properties of setupsp6.exe and acmsetup.exe to administrator and XP SP3 compatability, with no luck. I've disable UAC and tried still no look, is it worth rebooting with UAC off and retrying? Or any over ideas?? Cheers

kaktuz posted this comment on 2012-01-23:

[IMG]http://i172.photobucket.com/albums/w24/eugcar/Error.jpg[/IMG]

i follow the instruction but there's an error to "movecomplete" coding...

dwirch posted this comment on 2012-01-23:

Do you have a sub or function that is trying to use the same name?

Bolta posted this comment on 2012-01-23:

I am so relieved i found this info, thanks a million.

kaktuz posted this comment on 2012-01-23:

[IMG]http://i172.photobucket.com/albums/w24/eugcar/Error2.jpg[/IMG]

no... there's no same name! adodc1 = adoItem then adodc2 = adoItem2
when i double click the adoItem2 "User-Defined Type not Defined"

kaktuz posted this comment on 2012-01-23:

Sir, do you have a clean copy of vb6?

dwirch posted this comment on 2012-01-24:

In your screenshot, I see adoitem defined in the procedure, but I don't see adoitem2 defined. However, you reference a control called adoitem2 as the last line in the procedure. You can't reference and object that has not been created, hence the "undefined" error.

Not quite sure what you mean by a "clean" copy of VB6. If you're looking for pirated software, I can't help you. If you're looking for a copy for purchase, you'd have pretty good luck finding a reputable seller on eBay.

kaktuz posted this comment on 2012-01-24:

i mean of clean copy! when i install the vb6 and required reboot they will continue! because if i install vb6 then required to reboot pc. after rebooting, ".inf" file not responding.. so they we need to browse again the setup.exe to continue the installing of vb6.

i see.. Actually i download a copy of "vb6 + PSDK 2003"

[IMG]http://i172.photobucket.com/albums/w24/eugcar/Ado.jpg[/IMG]

kaktuz posted this comment on 2012-01-24:

[IMG]http://i172.photobucket.com/albums/w24/eugcar/setupwiz.jpg[/IMG]

1st rebooting and 2nd rebooting they will appear.

drp1drp posted this comment on 2012-01-27:

I see that you can recompile a vb6 program in the windows 8 preview version to clear up the ADO access problems a lot of us have.

However, I can't seem to get VB6 running on my copy of windows 8. Anyone installed vb6 on that platform??

Any Help is most appreciated.

Don

dwirch posted this comment on 2012-01-27:

Just fried my Windows 8 machine, but will test this as soon as I get it rebuilt.

jheisler posted this comment on 2012-02-02:

Our VB6 Legacy software is having trouble with VBA components running on Windows 7. The culprit is apc64.dll. In my IDE, I'm unable to instantiate an instance of apc64.dll. I'm invoking the CreateObject call. It seems Windows 7 views this active x as a threat. The file is set to full access for admin and non-admin. Nothing has changed with this file since the beginning which tells me Windows 7 registry is affecting it. Please help if you can.

jheisler posted this comment on 2012-02-02:

Something else I forgot to add. The compiled version of our software does initialize VBA successfully, but only if you are logged on as an admin user. And this is the crux of our issue. We have clients who want to role out our software to non-admin folks. Once I run the software as an admin, logout, and log back in to the same machine as non-admin, the software launches VBA successfully. But this isn't a viable work around at a client site with 1500 work stations. Thanks.

dwirch posted this comment on 2012-02-03:

Do you have a GPO that might be preventing users from registering ActiveX controls? Maybe a local policy?

The description you give sounds exactly like a permissions issue with users (who are not local administrators on the workstation) not being able to register ActiveX controls due to permissions.

If_Only posted this comment on 2012-02-12:

I just found this great forum.
After reading about a quarter of the contributions I just had to become a member.
Lots of more reading for me tomorrow.

Many thanks.

manu153 posted this comment on 2012-02-18:

hi,
am trying to install vb6 from hdd,
disabled UAC, created msjava.dll
run setup as admin,
select custom
prompted to run acmeboot.exe
clicked ok
says
message says "setup cannot access the required initialization file installation pathossystemodbccp32.dll"

and then it quits

manu153 posted this comment on 2012-02-18:

to add
am running a windows 7 pro, i7 pro, 6 gb

dwirch posted this comment on 2012-02-18:

It's the 32-bit odbc control panel. Could be:

DLL is missing
Currently logged on user does not have permission to the system directory
Invalid path

manu153 posted this comment on 2012-02-18:

tried to "run as admin"
same result,
path does not exist, have installed from same path dozens of times when rebuilding xp machine ,
DLL is missing : Any suggestions on how to resolve

dwirch posted this comment on 2012-02-18:

Someone has posted a zip file containing this file. Just grab it, unzip it to the proper path, and you should good. If not, manually register the file.

http://www.techsupportforum.com/forums/f10/missing-dll-odbccp32-dll-150890.html

manu153 posted this comment on 2012-02-18:

well just checked and the odbccp32.dll exists in the wind/sys32 folder

so back to sq 1

manu153 posted this comment on 2012-02-18:

Ok, now just tried something,
created a folder in the installation directory with the wanted dll.
well it just moved on to demand another one.

seems it is not able to see or whatever dll's

what to do??

dwirch posted this comment on 2012-02-19:

have you tried registering the dll?

manu153 posted this comment on 2012-02-19:

did that too, it just asked for another and so on.....

manu153 posted this comment on 2012-02-19:

there seem to be a couple of other references to this problem n other forums but no solution that i saw

dwirch posted this comment on 2012-02-19:

More DLLs? Sounds like your Windows might be pooched.

manu153 posted this comment on 2012-02-19:

they all exist in the win/sys32/ directory
and its a brand new system..sony preinstalled win 7 pro
its something else, its not allowing the setup to look into the win/sys32 directory
tried the UAC, run as admin, everything,
am stuck with this machine with no use for it..:(

dwirch posted this comment on 2012-02-19:

Add your user account to the local admins group. I'd definitely check local policy for restrictions, too.

manu153 posted this comment on 2012-02-19:

Done that too, even swithced off 'dep'
Aaagh so frustrated

brucep posted this comment on 2012-02-20:

I've completed installation as suggested at top of post.
I am now trying to open the references using the Project->References menu and am getting the "Error accessing the system registry". This happens no matter what previous xp project I try to work against. (am guessing it's a permissions issue..but am stuck on what to try next)
Any ideas on my next step to get past this problem?

dwirch posted this comment on 2012-02-20:

You might check your event logs (system and security) to see what registry hive/branch/key is denying access. From there, you should be able to open the offending section in RegEdit, view and/or edit the permissions directly.

manu153 posted this comment on 2012-02-21:

no luck there,
no event shows up indicating anything amiss at all...

vb6hack posted this comment on 2012-02-21:

I'm glad I discovered this site. Thanks!

I've been successfully running VB6 under 64 bit Windows 7 but a problem just showed up which I suspect is related to the combination. When I open the environment search box, it opens at the bottom of the screen, partially under the task bar. If I drag it up, it jumps back down the next time I click Find Next. This started recently for no apparent reason -- maybe a Win7 update? It's quite a nuisance. Is anyone else experiencing this? Any solutions?

vb6hack posted this comment on 2012-02-21:

Followup -- I've discovered that the search box jumps to the bottom of the screen only if it's located within the boundaries of the environment window. With the environment window sizeable, positioning the search box away from the window prevents the position jumping.

manu153 posted this comment on 2012-02-25:

wud u beleive it was bcoz of a scratched cd.... recreated it from a backup and wrked just fine,

dwirch posted this comment on 2012-02-25:

good to hear! Let the be a lesson to all of us: Always check the sanctity of your installation media!

dahuan60 posted this comment on 2012-02-29:

I got dbgrid32.ocx, msmask32.ocx, MSFLXGRD.ocx could be load in VB6(SP6) vbp file.
I did regsvr files in DOS. All the controls files are located C:WindodssysWOW64. But can't be used in VB6. I also did reinstall VS6 and SP6 without trouble.

dwirch posted this comment on 2012-02-29:

Try putting them in c:\windows\system32 and registering there.

pyzimm posted this comment on 2012-02-29:

Thank you for the excellent guide. I'm going to attempt the installation of VS6+SP6 in the next day or two, but first want to ask about also installing Visual Studio 2010. Is there an ideal order the installations should be performed in or anything else to take into consideration?

dwirch posted this comment on 2012-02-29:

The installation order shouldn't matter. However, that being said, I would install VS6 first, followed by VS2010. The installer for VS6 is pretty unforgiving, and can replace files without notice, possibly pooching your VS2010 install.

The VS2010 setup is a bit more "friendly", in that it shouldn't overwrite existing files.

Just my thoughts, though!

onenoneblond posted this comment on 2012-03-05:

Hi!
I am completely stuck. Got this rocket of a Pc with Win7 64bit on it and can't make Vb6 work on it. First I installed it somehow and after the installation I could even run in with couple of minor warnings, but I was able to open the project. Didn't need it for couple of days, untill today, when I tried to run it but got only the weird message and it wouldn't start. Then I started googling about problems with Vb6 and Win7. Found this forum. Tried to uninstall Vb6 but to no avail. Then tried the reinstall as written above. During the installation everything works smoothly. But, when I run Vb6, it loads with '#2050' could not be loaded and then disappeares after 5 seconds by itself, regardless if I click Ok or not. As there are still couple of projects developed in Vb6 and not yet in Vb.Net I do need it. In urgent situation I run it under Ms Virtual Xp, but I would really like to use the benefit of the Win7 speed and not get confused with so many enviroments (also got Virt W98, another testing virt XP, many times couple of TeamViewer supports and so on - really messy, lol).
Does anyone have any idea what else I could I try?
Any help appreciated!

dwirch posted this comment on 2012-03-05:

@OneNoneBlond: You might try installing SP6 before running the IDE again. Also, make sure that all of your OCX files (ie, your controls) are installed and registered.

onenoneblond posted this comment on 2012-03-06:

Hi!
I installed SP6 without any problems (reading posts above - admin rights and so on), but the symptom after SP6 is even worse: "unexpected error - quitting" when loading. Oh well, I think I shall try to uninstall it and use it in Virt Xp... Pitty thou... MS own product...

dwirch posted this comment on 2012-03-11:

For those having problems with your dbgrid after installing SP6, check out the great post by Brain Assassin on the work around:

Brain Assassin dbgrid workaround

shijua posted this comment on 2012-03-17:

yes

dahuan60 posted this comment on 2012-03-20:



I got dbgrid32.ocx, msmask32.ocx, MSFLXGRD.ocx could be load in VB6(SP6) vbp file.
I did regsvr these files in DOS. All the controls files are located C:WindodssysWOW64. But can't be used in VB6. dwirch suggested me "Try putting them in c:windowssystem32 and registering there". No help. My VB still can;t use these three active control. ???
Thanks for any help!

gka123 posted this comment on 2012-03-22:

Hello,
I’m struggling with VB6 set-up in W7 – 64 bits. I’ve followed the steps outlined above (creating msjava.dll (0 bites), turning off UAC, running the set-up as admin, etc.) but I got the message “javasign.dll was unable to register itself in the system registry”. I’ve downloaded javacypt.dll and put it into c:windowssystem32. However, registering it with regsrv32 fails (compatibility error message). I did the same for c:windowssyswow64 (using the regsrv32 located in this map), but this also failed.
As a result, the VB set-up says “Installation not completed” and I’m unable to install VB6 SP 5. Please advice..

Gert

dwirch posted this comment on 2012-03-22:

not sure why you are getting those errors, to be honest. Those files don't even exist on my system, and VB6 installed just fine without even making the zero-byte file.

During setup you might try removing the reference to the java dev tools, just to see if setup will complete successfully without it.

I'll keep looking around, though, and see what I can see.

gka123 posted this comment on 2012-03-22:

Finally I managed to install VB6 (+ SP6). Instead of selecting (step 10) I selected during the VB setup and subsequently checked . You are right: even on my old XP machine I could not find any reference to javasign.dll or javacypt.dll. Thanks anyway...
Gert

gka123 posted this comment on 2012-03-22:

strange: text placed between greater than sign disappeared in the post. You should read: Instead of selecting CUSTOM (step 10) I selected PRODUCTS during the VB setup and subsequently checked VISUAL BASIC 6

dwirch posted this comment on 2012-03-22:

yep - the commenting system incorrectly detects \ and > and < as html code or sql exploits, so strips them out.

*sigh* a bug I need to fix....

dwirch posted this comment on 2012-03-24:

bug fixed - the special characters should now appear in future posts.

codeguru posted this comment on 2012-04-08:

I just wanna say thanks for these instructions.... not to mention that the setup of VB6 has to be in the root of the disk - or with subst connected to a drive letter, or just put on a flash. Also the SP6 has acmsetup.exe and setupsp6.exe.... the latter is the good one, if "run as administraor" is used. Starting the acmsetup leadts in acmsetup.stf is missing.... this file is built by the setupsp6.exe when examining the installed components.

There is also lot of confusion about 32 bit components on 64 bit os - when a 32 bit tool is started it sees the registry beound HKLM\Software\syswow6432node\JohnDoeSoft (seen frmo 64 bit) as HKLM\software\JohnDoeSoft (seen from 32 bit)

and of course there have to go registry keys belonging to 32 bit software. Using regsvr32 seems to do the job automatically.... When exporting reg keys from 32 Bit systems the paths must be adapted otherwise a only 64 bit software sees these keys. A simple doubleclick on the .reg files imports them into 64 bit environment.... except using pure 32 bit legacy tools in c:\windows\syswow64 and this is the location where custom controls should go as well (in theory). After registering they should show up in VB in the component list.

bantakiah posted this comment on 2012-04-28:

can somebody help me i have my vb application run in windows xp sp 2 correctly but if i copy that application in windows 7 32 bit or 64 bit serevral form can not be load corectly with this error after i check the log

Line 201: Property ColumnWidth in Column00 had an invalid value.
Line 204: Property ColumnWidth in Column01 had an invalid value.
Line 207: Property ColumnWidth in Column02 had an invalid value.
Line 211: Property ColumnWidth in Column03 had an invalid value.
Line 214: Property ColumnWidth in Column04 had an invalid value.
Line 218: Property ColumnWidth in Column05 had an invalid value.
Line 221: Property ColumnWidth in Column06 had an invalid value.
Line 224: Property ColumnWidth in Column07 had an invalid value.
Line 227: Property ColumnWidth in Column08 had an invalid value.
Line 230: Property ColumnWidth in Column09 had an invalid value.
Line 233: Property ColumnWidth in Column10 had an invalid value.
Line 364: Property ColumnWidth in Column00 had an invalid value.
Line 367: Property ColumnWidth in Column01 had an invalid value.
Line 370: Property ColumnWidth in Column02 had an invalid value.
Line 373: Property ColumnWidth in Column03 had an invalid value.
Line 376: Property ColumnWidth in Column04 had an invalid value.
Line 379: Property ColumnWidth in Column05 had an invalid value.
Line 382: Property ColumnWidth in Column06 had an invalid value.
Line 519: Property ColumnWidth in Column00 had an invalid value.
Line 522: Property ColumnWidth in Column01 had an invalid value.
Line 525: Property ColumnWidth in Column02 had an invalid value.
Line 528: Property ColumnWidth in Column03 had an invalid value.
Line 531: Property ColumnWidth in Column04 had an invalid value.
Line 534: Property ColumnWidth in Column05 had an invalid value.
Line 640: Property ColumnWidth in Column00 had an invalid value.
Line 643: Property ColumnWidth in Column01 had an invalid value.
Line 646: Property ColumnWidth in Column02 had an invalid value.
Line 649: Property ColumnWidth in Column03 had an invalid value.
Line 652: Property ColumnWidth in Column04 had an invalid value.

in that form i usr datagrid and adodc component

and i cannot save my project or form

can somebody help me?

dwirch posted this comment on 2012-04-29:

@bantakiah -

Can you post some code that relates to these errors? Also - you might want to post this question over in the Q&A section.

judyk posted this comment on 2012-05-02:

This site saved me! So grateful, thanks. Do you have similar instructions for allowing 32 bit VB6 applications to run on a Windows 2008 server? I'm having problems connecting to Oracle - that's as far as I've gotten. That's my next assignment and I need more magic.

dwirch posted this comment on 2012-05-02:

@judyk:

Getting a specific error? As I recall, it should be as simple as loading the 32-bit Oracle ODBC driver on to your 2008 server.

bantakiah posted this comment on 2012-05-05:

@dwirch.

ok that problem resoved with rezise ing my data grid and save. thanks
but why i can not save my project? even i click save as menu my project will ask about save my form and my project wont cloase after that

chet posted this comment on 2012-06-04:

First of all, Thank You for the great post.

I've tried these instructions to get Visual Studio 6.0 (Visual C++ 6.0) installed (in addition to VB). My goal is to have Visual C++ working on Win7 so that I can maintain some 6.0 workspace files (*.dsw) which I inherited. I've gotten close, here's what I experienced.

The VS exe is ...\Microsoft Visual Studio\CommonmMSDev98\Bin\MSDEV.EXE. If the Compatibility Properties of this exe is set to "Run this program in compatibility mode for Win XP SP3" = checked, then the files do NOT load. This needs to be Unchecked otherwise the IDE crashes when loading class information.

My second discovery:
When compiling the active project, I get an error message "Error executing rc.exe". I have this VS6.0 IDE installed on WinXPSP6 and in the WinXP environment, I do not get this error (I am able to compile). Therefore this rc.exe error seems to be specific to installing/compiling with Win7.

Any suggestions?

OliverH posted this comment on 2012-07-16:

Many many thanks, this post is so extremely helpful.

VB6 all up and running on Win7 x64, and, BTW, at least for me it totally works even without having additional compatibility options besides "XP SP3" set.

Still, I fell into a pitfall that existed already in the old days and I just forgot about it. It causes the VB6 IDE to crash randomly every now and then, and freaks you out cause it's so out of the blue. So if you experience similar problems, I can recommend to check for this:

http://support.microsoft.com/kb/244140
"BUG: A Fatal Error Occurs If You Run a Microsoft Visual Basic Application by Using the HtmlHelp API"

The addin "HHCtrlAv.dll" described there effectively cures it, even on Windows 7 (x64).

Again, thanks for the great work,
Oliver

CoryFromCanada posted this comment on 2012-07-17:

Hi Derek,

Kuddos for maintaining this thread, you really made my life so easy. Everything went as described and I will do some further testing over the next few days.

Any experiences with compiling on W7 and trying to run on an XP machine (I don't have high hopes). Also, if the executable will be running on W7 clients, any guesses as to which will be more stable:

- an executable built on XP and moved over to the W7 client or
- an executable built on W7 and deployed to a W7 client?

Thanks,
Cory

dwirch posted this comment on 2012-07-17:

I haven't had any stability issues moving between the two OSs, other than my own noob mistakes. My main workstation at the office is W7 Enterprise x64, while field/branch machines (3000+) are WinXP 32-bit. There is a CMDB and log shipping agent that I compiled on the Win7/x64 machine that runs quite nicely on the 32-bit XP machines. Just remember to include in your setup package any controls not already present on the target machine, and you should be ok.

I haven't tried compiling on an XP machine in quite some time, but you shouldn't have any issues going XP -> Win 7 either, since the compiled code *should* be the same in either case.

The only difference would be if your code is referencing some special feature that is only available in one architecture, and not the other.

Richard506rb posted this comment on 2012-07-20:

Just installed vb6 & sp6 on Win7 64. It worked perfectly with the "glassy" look for a while. Then today, a notice came up when vb6 started that a program was interfering with the "aero" look and will be run as an XP.
Why the change?

Richard506rb posted this comment on 2012-07-21:

Incredible!!! I right clicked on vb6.exe and selected "Troubleshoot Compatibility"-- It analyzed it for a moment then said to Start Program... VB6 started and it had the "glassy aero" look. I right clicked on vb6.exe and checked properties and it left Run this program in compatibility mode for Windows XP (SP2). But it UNchecked Disable visual themes; Disable desktop composition and Disable display scaling.
My program seems to run a bit slower, but is that the only bad effect from unchecking those three items???

dwirch posted this comment on 2012-07-21:

You'll get sluggish IDE performance with Aero and desktop composition enabled, because it is not "open-minded" enough to work with Aero. You can run the IDE with these options enabled (unchecked), but working with objects in the form builder portion in the IDE will be *painful*. Hence the instruction above to turn it off, which increases performance.

Compiled programs will work nicely without turning off these features, though.

dsgcompu posted this comment on 2012-07-24:

It is really useful information thanks to FortyPoundHead web team to provide such useful stuff. It helps me lot to run VB6 as well as VB6 applications on windows 7 operating system.

boscad posted this comment on 2012-07-28:

Stroll-on man! RESPECT! Great work, great site, aye, bonny stuff - got LOADS of legacy VB6 code now supported on W7. Thanks guys!

CoryFromCanada posted this comment on 2012-07-31:

Hi Derek,

Here's something a wee bit odd - perhaps you can think of some reason for this. When I run the code below, I get different results in debug than I do when I compile and create a .exe

1) create a new project
2) add a form with a label (label1 is fine)and give it width to display a caption of ~50 characters
3) paste the following code into code for the form
4) run in debug
5) compile and run the .exe


--- start code ---
Option Explicit
Option Compare Text

''''''''''''''''''''
Const VER_PLATFORM_WIN32_NT = 2
Const VER_PLATFORM_WIN32_WINDOWS = 1

Private Declare Function GetVersionExA Lib "kernel32" _
(lpVersionInformation As OSVERSIONINFOEX) As Integer

'This is the post NT4 SP6 version.
Private Type OSVERSIONINFOEX
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 ' Maintenance string for PSS usage
wServicePackMajor As Integer
wServicePackMinor As Integer
wSuiteMask As Integer
wProductType As Byte
wReserved As Byte
End Type

Private Sub cmdOk_Click()
Unload Me
End Sub

Private Sub Form_Load()

'http://support.microsoft.com/kb/q189249/
'http://support.microsoft.com/kb/304289
' Windows 95 Windows 98 Windows Me Windows NT 4.0 Windows 2000 Windows XP Windows Server 2003 Vista
'PlatformID 1 1 1 2 2 2 2 2
'Major Version 4 4 4 4 5 5 5 6
'Minor Version 0 10 90 0 0 1 2

Dim os As OSVERSIONINFOEX
Dim retval As Integer
Dim WindowsVersion As String

os.dwOSVersionInfoSize = 148
os.szCSDVersion = Space$(128)
retval = GetVersionExA(os)

WindowsVersion = "Unknown OS"

Select Case os.dwPlatformId
Case VER_PLATFORM_WIN32_WINDOWS
Select Case os.dwMinorVersion
Case 0
WindowsVersion = "Windows 95"
Case 10
WindowsVersion = "Windows 98"
' If .Version.Revision.ToString() = "2222A" Then
' WindowsVersion = "Windows 98 Second Edition"
' Else
' WindowsVersion = "Windows 98"
' End If
Case 90
WindowsVersion = "Windows Millennium"
End Select
Case VER_PLATFORM_WIN32_NT
Select Case os.dwMajorVersion
Case 3:
WindowsVersion = "Windows NT 3.51"
Case 4:
WindowsVersion = "Windows NT 4.0"
Case 5: '5
If os.dwMinorVersion = 0 Then
WindowsVersion = "Windows 2000"
ElseIf os.dwMinorVersion = 1 Then
WindowsVersion = "Windows XP"
ElseIf os.dwMinorVersion = 2 Then
WindowsVersion = "Windows 2003"
End If
Case 6:
WindowsVersion = "Windows Vista"
If os.dwMinorVersion = 0 Then
WindowsVersion = "Windows Vista"
ElseIf os.dwMinorVersion = 1 Then
WindowsVersion = "Windows 7"
ElseIf os.dwMinorVersion = 2 Then
WindowsVersion = "Windows 8"
End If
End Select
End Select

Label1.Caption = " os.dwPlatformId " & CStr(os.dwPlatformId) & ", os.dwMajorVersion " & _
CStr(os.dwMajorVersion) & ", os.dwMinorVersion " & CStr(os.dwMinorVersion) & _
" --> WindowsVersion = " & WindowsVersion

End Sub


--- end code ---

I'm running this on W7 SP1 32 bit.

Thanks,
Cory

dwirch posted this comment on 2012-07-31:

hehe - - yep. Running in the IDE, I get a Windows Version of Windows XP. Running compiled, I get a WindowsVersion of Windows 7.

Remember, during setup of Visual Studio, the last part of the process is to set the IDE to run in Windows XP SP3 compatibility mode. When you hit F5 to run the program from within the environment, the IDE is spawning the process, which takes on the characteristics of the parent process, even the compatibility mode setting.

When you double click the executable, there is no compatibility mode setting (unless you set it manually!), so it is running directly on Windows 7.

Nifty, eh?

CoryFromCanada posted this comment on 2012-07-31:

Makes sense...

To prove it beyond a doubt, I changed the compatibility settings on VB6.exe to W2K and ran the program in debug mode and wouldchabelieveit, it said it was running on a W2K platform.

Next, I figured that I'd see what happened if I set the compatability settings of the compiled .exe to different settings (Windows 95, W2K, XP-SP3, etc.) and figured that the program might report back different results to match the compatibility settings. To my surprise, it always came back as W7. I'm not sure why, but don't plan on sweating it too much. I'm happy to have an explanation of what was going on and again... MANY THANKS!

CoryFromCanada posted this comment on 2012-07-31:

I couldn't let a sleeping dog lie...

Just for grins, I changed the compatability settings on VB6.exe to W7 and fired up VB and loaded my simple program and it came up and I was able to run it in debug, move the form around, compile the .exe. All these actions seemed to work fine.

So, that begs the question, do you know what problem setting XP-SP3 compatibility solves, or was this just being cautious? I agree that the other settings of (Disable Visual Themes, Disable Desktop Composition and Disable display scaling on high DPI settings) are needed to make it perform better, but is XP-SP3 really necessary?

Cheers,
Caption Curious

dwirch posted this comment on 2012-07-31:

The XP-SP3 compatibility mode is mainly for setup, specifically during the first run of the IDE, where some key registry settings are made.

CoryFromCanada posted this comment on 2012-08-01:

So have you (or anyone else out there) played with switching the compatibility settings to W7 after the install and first run of the IDE - to see how it behaves and whether it causes any problems? Chances are that nobody has any real reason to switch it back to W7 (why mess up something that seems to be working, right?).

dwirch posted this comment on 2012-08-02:

I haven't, for that very reason - if it's working, why fix it? ;)

Smudger posted this comment on 2012-08-04:

Thank you so much for your great article. I found your site so informative I've immediately registered. Thanks again

win7 posted this comment on 2012-08-15:

Wowie, thanks. I installed as per instructions in this article. :)

wharris posted this comment on 2012-08-30:

I have been using a Windows XP virtual machine on my Win7 x64 machine for several years now. (I originally tried VB6 on Win7 but had lots of problems.)

I have installed the software per your instructions. The IDE seems to work. But, I needed to turn UAC back on for some of my other apps.

Can UAC be turned back on once the VB6 installation is complete?

When configuring the VB6.exe compatibility, should the "Run As Admin" be checked or not?

When I had the compatibility set to Win XP SP3, my project would not load. It would just spin and spin. I turned off compatiblity mode and the project loaded right up.

Thanks in advance.

dwirch posted this comment on 2012-08-30:

You should be able to turn UAC back on with no problem. As for "Run as Admin", you should be able to turn that off as well, as long as the program you are working with is not attempting to modify some "restricted airspace" that requires elevation.

burningsoulako posted this comment on 2012-08-31:

hi. you see i can't properly install vb6.0 in my laptop. it's win7 32 bit.
when i first tried to install it, here's what happened:
http://a8.sphotos.ak.fbcdn.net/hphotos-ak-ash4/398977_473596015992955_371972971_n.jpg
but when i followed your steps, this happened.
http://a5.sphotos.ak.fbcdn.net/hphotos-ak-ash4/376599_473595982659625_2005503697_n.jpg
still i can't use vb6.0 properly. hoping you can help me. i really need to use it for a my project~

i would really appreciate your help.
XOXO

dwirch posted this comment on 2012-08-31:

Can't really make out your screen shots, especially the first two screen shots in the second set. But the third, looks like the IDE hung up, and went non-responding.

Are you running the IDE as administrator?

burningsoulako posted this comment on 2012-08-31:

here. it is. an HD version. the first time i run it, this happened~
1. http://a3.sphotos.ak.fbcdn.net/hphotos-ak-ash4/296009_473837462635477_1350456952_n.jpg
2. http://a7.sphotos.ak.fbcdn.net/hphotos-ak-snc7/394280_473837569302133_125362038_n.jpg
3. http://a1.sphotos.ak.fbcdn.net/hphotos-ak-ash4/296071_473837589302131_686781851_n.jpg
4. http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/304370_473837629302127_1317085081_n.jpg
5. http://a6.sphotos.ak.fbcdn.net/hphotos-ak-snc7/303676_473837649302125_1841228607_n.jpg
6. http://a8.sphotos.ak.fbcdn.net/hphotos-ak-prn1/546510_473837719302118_1160385016_n.jpg

but when i followed your steps (run it as administrator, and pick only four on the option list), this happened:
1. http://a3.sphotos.ak.fbcdn.net/hphotos-ak-ash4/296009_473837462635477_1350456952_n.jpg
2. http://a7.sphotos.ak.fbcdn.net/hphotos-ak-snc7/394280_473837569302133_125362038_n.jpg
3. http://a8.sphotos.ak.fbcdn.net/hphotos-ak-prn1/546510_473837719302118_1160385016_n.jpg

burningsoulako posted this comment on 2012-08-31:

FIRST TIME RUNNING:
Error 1. Setup coul not remove the file: 'C:\Windows\system32\DBNMPNTW.DLL'
Error 2. Setup could not remove the file: 'C:\Program Files\Common Files\system
oledb\SQLOLEDB.DLL'
Error 3. javasign.dll was unable to register itself in the system registry.
Error 4. Visual Studio 6.0 Enterprise Setup was not completed successfully.
Error 5. the Visual Studio 6.0 setup failed. Please try re-running the Installation Wizard. For answers to common installation questions and updated information about this product please visit the Microsoft Developer Network (MSDN) website at http.//www.microsoft.com/msdn/.
when running VB6.0, Error 6 shows:
Visul Basic has stopped working.
A problem caused the program to stop working correctly. Windows will close the program and notify you if a soulution is available.

dwirch posted this comment on 2012-08-31:

Those errors might be a permissions issue. Make sure you are running as administrator, and UAC is turned off, at least during the first run.

burningsoulako posted this comment on 2012-08-31:

but when i followed your steps, the errors are minimize. Errors 1, 2 and 6 are the only errors that show when i run it as an admin. how can i turn on/off an UAC? and what is UAC?

dwirch posted this comment on 2012-08-31:

Check this link to turn off User Acceptance Control (UAC):http://www.fortypoundhead.com/showcontent.asp?artid=19521

burningsoulako posted this comment on 2012-09-10:

error6 still appears~

Anonymous posted this comment on 2012-10-15:

Really great help, works 100%.....Thanks!!

shankarkiyer posted this comment on 2012-10-16:

Hi i recently purchased a win 7 x64 bit lap.. installed vb6.. then i followed all the procedure tat u had given in the beging of the post... all worked fine.. bt the prob actullay started wen i used a combo box in a form.. after creating a combo box in the form i saved and closed the prj.. later wen i try to open the form vb crashes.. it really very urgent as i am runnig out of time..

mahela posted this comment on 2012-10-17:

please give me a link to download visual basic 6.0 to windows 7 32bits. when i open the vb6 that i have already installed on my computer it says "method of object failed".also in vb6 I already installed microsoft windows common controll 6.0 is not exist.it has microsoft windows common controll 5.0 (sp2).

dirkrim posted this comment on 2012-10-23:

Hi, Just to say thanks very much for the installation instructions - worked perfectly - but I've now got a small problem with my VB app, which maybe you can help me with. On my old, now defunct XP laptop, I used MS San Serif as the font for just about everything with a font size which is shown in the .frm files as 8.25. But now in Win7, the smallest font size seems to be 10, which means many of my text boxes and command buttons are too small to display the text. Is there an easy way of fixing this, or do I have to do it the hard way by resizing everything?
Many thanks again.

dwirch posted this comment on 2012-10-23:

Kind of odd. The smallest shown in my font selector is 8. Instead of resizing all the text boxes/labels/etc, can you simply edit the .frm files to set it for just 8, rather than 8.25 ? My thinking it might be choking on the .25 part of the size specification. But just a thought.

dirkrim posted this comment on 2012-10-24:

Hi, thanks v much for the answer, but editing the .frm didn't work. But... when I checked my own font selector for MS San Serif, it only gave me the options of 10,12,15,17,23,30 and the scroll bars weren't enabled. Other fonts had the full range of sizes and enabled scroll bars. [Should have come back to you then!]
But... I thought maybe if I installed the XP version of the font on Win7, that might solve the problem, but now that I have...
- VB just hangs after opening - just a grey featureless frame
- Viewing the font shows it minus the "Version" and "Open Type..." header lines and the letters are very blocky.
- Trying to reinstall my backup copy of the Win7 font doesn't change anything.
- I can't delete the installed XP version of the font
Er... any help you can give this dimwit would be most gratefully received!!!

Joel posted this comment on 2012-10-25:

THANK YOU SO MUCH AS VB6 is running now on my PC Windows 7 !!! Congratulations and many thanks !!!

cgsh posted this comment on 2012-11-05:

So far so good! I try to install on Windows 8 x64 but my setup stops/hangs during 'Setup is updating your system'?
I quit setup and starts program with an 'Automation error' 'Error accessing the OLE registry'. I am running setup: Run as administrator..
Any idea?

cgsh posted this comment on 2012-11-05:

I'm Sorry - why try to search this site? So of course I found the issues with Windows 8! Thank You!
http://www.fortypoundhead.com/showcontent.asp?artid=23916

pwl2706 posted this comment on 2012-11-10:

Hi,

Thanks for this excellent article for VB6 on Windows 7 works perfectly

However, when I try to install MSDN Library 6 I get a lot of error messages such as "cannot find file" - is this related to UAC/permissions on C:\ drive or is it possible that I don't have a complete MSDN disk image?

thanks

dwirch posted this comment on 2012-11-10:

I've not installed the MSDN library in a loooong time, since the information contained therein is all available in the online library. However, if you *really* want to get it installed locally, you might try running the MSDN setup seperately; just be sure to run it as an administrator. That should get where you need to be.

dgswanson posted this comment on 2012-11-14:

Did this problem ever get solved?

By: brucep
Date: 2012-02-20

I've completed installation as suggested at top of post.
I am now trying to open the references using the Project->References menu and am getting the "Error accessing the system registry".

I am seeing the same problem. Not skilled enough with Event Viewer to learn much.

Thanks



Read more: http://www.fortypoundhead.com/showcontent.asp?artid=20502#ixzz2CEhaCuLh

dwirch posted this comment on 2012-11-14:

Try running the IDE once as Administrator (Right-click, run as administrator). That should bypass any permissions issues that may be happening.

dgswanson posted this comment on 2012-11-15:

Running IDE as administrator does not work.

After searching some more, I found several links and was able to fix it.
Problem is, some application writes a Registry key as user/owner SYSTEM.
When VB6 scans the registry in Projects -> Registry it hangs at that registry
key, because it doesn't have permission to even look at it.

If you run REGEDT32 as Administrator, you still can't look at it or modify it.

This link talks about Crystal Reports causing the problem.
http://support.microsoft.com/default.aspx?scid=http%3A%2F%2Fsupport.microsoft.com%2Fsupport%2Fkb%2Farticles%2FQ269%2F3%2F83.ASP&NoWebContent=1
But their instructions are out of date.

This is the link I used. Go to the very end.
http://www.vbforums.com/showthread.php?545433-RESOLVED-Sudden-quot-Error-accessing-the-system-registry-quot

By the way, the key that caused my problem had something to do with "FlashAccess"

Regards to all

JohnPap posted this comment on 2012-12-04:

Hello everybody,

Are you aware of this cumulative update (date published 8/16/2012) http://www.microsoft.com/en-us/download/details.aspx?id=7030 and if yes, should we install it?

My specs: Win 7 Ultimate x64, VB6 Enterprise.

Regards,
John

dwirch posted this comment on 2012-12-05:

I for one was not aware of the update. It looks serious enough that I will be installing it at my first opportunity.

pwl2706 posted this comment on 2012-12-14:

Can anyone help me?

Recently I have been getting this error and VB6 failes to start:

C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE

The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

It's strange because it installed fine, and worked for a couple of weeks, but now I am stuck and can't run it at all.

Thanks for any help
Philip

pwl2706 posted this comment on 2012-12-14:

Sorry, I have just fixed the above issue - I forgot that I had tried to put a manifest in the VB6 directory!

aschuss posted this comment on 2013-01-10:

Hi, just transferred all the code for my VB 6 app to my Windows 7 machine. It will not compile. It just locks up and VB crashes. Any ideas? I run the VB as an administrator in Windows XP SP 3 emulation. Thanks.

dwirch posted this comment on 2013-01-10:

Are making reference to any controls that may not exist in your new configuration? Service pack levels the same for VB ?

OldGuy posted this comment on 2013-01-24:

I just bought a new computer with Win 7 64 bit (my old computer died). I want my VB6 back. I have read all the above threads and am anxious to get started. I inserted the Visual Studio 6.0 and followed your instructions. In the Visual Studio 6.0 installation wizard I get this message: "Setup has detected that your system has been locked down and will therefor not be able to run". What gives?

dwirch posted this comment on 2013-01-25:

@OldGuy: Doesn't sound a like a message from Windows or the Setup program. Can you give the exact error message wording. The only guess I can hazard is that UAC is still turned on. If it is, go to this link for instruction on turning it off.

BarryEm posted this comment on 2013-01-25:

I have been using VB6 on Win 7 for years with no problem. About three daya ago, however, Win 7 decided to emancipate the IDE's child windows (even though they are only 15 years old). The Project, Properties, etc., windows go their (unattached) way wherever they will--won't even minimize with the main IDE window. The IDE is now very awkward to use. Any ideas?

patrick posted this comment on 2013-02-08:

I have an unsucessful earlier install on my machine. Is there anything special required of an uninstall to prepare for your success strategy? Also, I'm overjoyed that VB 6.0 on Win7 is possible; will I truly be able to once again enter debug mode from a call originating from MSAccess?

dwirch posted this comment on 2013-02-08:

After doing the uninstall, be sure to remove any directories that have been made under Program Files (or Program Files x86).

And yes, you should get the debug mode after a successful installation.

patrick posted this comment on 2013-02-10:

Thanks for the suggestion.

I performed an uninstall and checked for leftover directories. There weren't any.

I ran the install without any problems. I may have opened the IDE before changing the compatability settings. I was unsuccessful running SP6; it's looking to replace files in C:\Windows\System32 but the .ocx files are in C:\Windows\SysWOW64.

With UAC set to off, I opened a VB6 .dll project as Administrator and started it. I opened a VBA project through MSAccess as Administrator and set a reference to the running .vbp. I set a breakpoint in the Access VBA and one in the VB6 Project. The first time I traced this the VBA code would run but not trigger the VB6 debugger. Changing a line in the .vbp confirmed (from the resulting output) that the .vbp was not getting the call. Since then when the VBA reference is set to the running .vbp I get the error "ActiveX component can't create object". The 429 error stops if I go back to the .dll reference.

Do you have any idea what might be causing this?

patrick posted this comment on 2013-02-11:

If I create a simple project with a Global class, a MultiUse class and a Public Not Creatable (Interface) class implemented by a MultiUse class having only private methods, I can call all of these from MSAccess and from a breakpoint debug from MSA into VB6 and trace through methods. This is a major win. Thanks very much for posting your method to accomplish this. It's sincerely appreciated.

Unfortunately I have a large (mission critical) project that works fine from MSA when I'm calling the dll. If I switch to running the project in VB it returns a 429 error to MSA when I try to create any MultiUse class that implements a Public Not Creatable class. For example:

Public Function TestABBalance() As Currency
Dim obj As ABSvr30.ILoc1

Set obj = New ABSvr30.CLoc ' this line returns Err 429 from the running project but not the dll
TestABBalance = obj.Balance("305100")
Set obj = Nothing
End Function

If I make the above project part of a group and call into it from MSA through a second project in the group having the same class achitecture (interface/multiuse) then it will allow a debug through both projects!?!? For example:

Public Function TestABBalance() As Currency
Dim obj As ABCli30.ILoc1

Set obj = New ABCli30.CLoc ' this works from the running project and the dll
TestABBalance = obj.Balance("305100")
Set obj = Nothing
End Function

Where ILoc1 is simply:
Public Function Balance(ByVal AccountID As String) As Currency
End Function

And ABCli30.CLoc looks like:
Implements ABCnt30.ILoc1

Private Function ILoc1_Balance(ByVal AccountID As String) As Currency
Dim obj As ABSvr30.ILoc1

Set obj = New ABSvr30.CLoc
ILoc1_Balance = obj.Balance(AccountID)
Set obj = Nothing
End Function

I first tried unregistering and reregistering the dll. Then I tried re-making the dll on the Win7 box. Nothing so far is allowing me directly into that running project.

Perhaps this is a bug that was fixed in later service packs. I'm at SP0. Do you have any suggestions for how I can get SP6 installed? As I mentioned above, it's expecting to find ocx files in Windows\System32 but they're in Windows\SysWOW64 on my machine.

Thanks for any insight that you can offer.

dwirch posted this comment on 2013-02-12:

As long as the dlls are properly registered, it shouldn't matter where they are at. To take the path question out of the equation, simply create the path, and drop the ocx files there. Unregister the ones in syswow64, then register the ones in system32. Not really a good practice, but could help in troubleshooting the issue.

Also - when you unregistered and re-registered previously, was UAC turned off, and you did it from an elevated command prompt ?

patrick posted this comment on 2013-02-12:

I've finally been successful installing SP6 but that hasn't addressed my problem.

The problem is that one of my projects will compile and can be called as a .dll but if if switch the project to run the calling project reports Err 429.

I can import all the classes and modules into a new project with a different name, set it to run, and I can call it without any problems. Does this mean that something about the original project's registration is corrupted? I've tried unregistering/registering as Administrator with UAC turned off, running both VB and VBA as Administrator. Nothing will allow me to call that project while its running in VB. Is there something obvious that I'm missing?

dwirch posted this comment on 2013-02-12:

Have you found any errors in the application or system event logs that occur when the program is attempting to access the DLL (file not found or some such) ? Maybe an "Access Denied" error in the security event log?

Have you tried RegMon or FileMon to find out the exact path that the program is expecting to find the DLL at ? Checked Class IDs in the registry ?

patrick posted this comment on 2013-02-13:

Complus reports this error in the Application Windows Log:
The system has called a custom component and that component has failed and generated an exception. This indicates a problem with the custom component. Notify the developer of this component that a failure has occurred and provide them with the information below.
Server Application ID: {57190151-39FE-49CB-B767-FFC3A3FAD7F2}
Server Application Instance ID:
{080B704D-0E9D-4F5A-91DF-B05AF6877E71}
Server Application Name: ABSvr30
The serious nature of this error has caused the process to terminate.
Exception: C00000FD
Address: 0x6A94682C

When I run Process Monitor there is nothing strikingly different between a successful call directly to the DLL versus an unsuccessful call to the project running in VB up to point where that call fails.

If I run the project without Binary Compatability to an older copy of itself, and select No Compatability instead then I can call it without any problem while running in VB.

When VB is going into run mode, the Process Monitor "Result" is NAME NOT FOUND for the following for each of my concrete classes:
HKCR\Wow6432Node\CLSID\...\InprocServer32\InprocServer32
HKCR\Wow6432Node\CLSID\...\InprocHandler32
HKCR\Wow6432Node\CLSID\...\InprocHandler
HKCR\Wow6432Node\CLSID\...\TreatAs
However, I get the same result when I run the project with No Compatability and with this setting it works fine so I don't think the "Result" is meaningful.

Why the project can be called as a DLL but not when running under VB is the crux. If I can't figure this out I'll have to re-issue a new version of the component. I'd obviously prefer not to have to do this.

newvision posted this comment on 2013-02-14:

Thanks! This was really helpful!

CharlieHall posted this comment on 2013-02-18:

Hi,

I asked the following question 2.5 years ago and am wondering if you have new insight - we did not resolve it at the time


I am having problems with one feature that I use a lot.

I am using Win 7 64 bit. I am able to create new versions of my dlls and reference them in my excel applications so I think VB6 SP6 is installed correctly.

However, I like to run the dll inside the vb6 application so I can debug on the fly. When I try to reference this dll running inside vb6 I get the error "Error in loading DLL".


I am trying this again on a new computer and am still having the same problems. Furthering my debug of the situation and hoping it might help - I created a new very simple DLL - and then opened a new instance of vb6, created a simple project which referenced this new DLL running inside vb6 and everything worked - I can run the project, and it executes the DLL inside a different vb6 instance - so I can break and single step where I need to.

So the only thing not working is getting vba in Excel 2010 to reference this DLL inside vb6 rather than one saved to disk first.

Any insight into what I can do to fix this?

Thanks in advance

Thanks in advance, Charlie

Aviator27 posted this comment on 2013-03-12:

Thanks a lot mate :)

PixieDog posted this comment on 2013-03-23:

Hello, Excuse my ignorance. Are there any security problems associated with turning off UAC? TIA.

dwirch posted this comment on 2013-03-24:

In a nutshell, it's because Windows users (outside of most corporate-owned infrastructures) are usually logged in with administrative rights. This allows all process that are spawned during the session to run with elevated privileges, with the ability to make rampant changes, such as installing services, bypassing antivirus, or modifying registry entries.

User Account Control (UAC) is a feature in Windows that can help prevent unauthorized changes to your computer. UAC does this by asking you for permission or an administrator‌ password before performing actions that could potentially affect your computer's operation or that change settings that affect other users. When you see a UAC message, read it carefully, and then make sure the name of the action or program that's about to start is one that you intended to start.

By verifying these actions before they start, UAC can help prevent malicious software (malware) and spyware from installing or making changes to your computer without permission.

It gives the user the ability to run as a "limited administrator" on the local machine, and still have a measure of security in place.

Make sense ?

patrick posted this comment on 2013-04-09:

The solution to the issue I posted above was rather simple in the end.

I had to run BOTH VB 6.0 and Microsoft Access as administrator. It's possible that deleting a copy of the ActiveX application from COM+ may have contributed to the solution but I couldn't say for sure.

In any case, I am delighted to be able to debug VB 6.0 projects from Microsoft Access on my Windows 7 64 bit machine. Thanks for your post!

randydellinger posted this comment on 2013-06-06:

When I load an existing project that uses the Windows Common Control 6.0 (mscomctl.ocx) I get the error "Object library not registered". I tried re-registering the ocx via with no luck. However, I got it working by using an elevated command prompt and typing in the following:
cd \Windows\SysWOW64
regtlib msdatsrc.tlb

Hope this helps someone in the future.

Shaikh Foysal posted this comment on 2013-06-14:

Hello admin
I am new in visual basic 6. I download vb6 from this link http://www.microsoft.com/en-us/download/details.aspx?id=5721. But i cannot install this in my computer with the help from this post it's operating system is w7.
Please help me and give me the right vb6.
Thanks.

dwirch posted this comment on 2013-06-14:

Can you please be more descriptive about what errors you are getting ? What part is not working ? The "Broke, please fix." does not help the rest of us in diagnosing your problem.

Shaikh Foysal posted this comment on 2013-06-15:

My first problem is am i get the right vb6 from microsoft,

2nd it 26 mb file is that good?

3rd when i click it, it want a location, then i give him a location, then i found setupsp6.exe file from them, then i double click it shows : "setup cannot install system files or update shared files if the files are in use. Before use close any open applications". After all that it show : visual studio 6.0 service pack 6 setup was not completed successfully.

Can you give me the right download link of visual basic 6.0 .

dwirch posted this comment on 2013-06-16:

That doesn't appear to be the right installation package. I just checked the MSDN subscriber downloads page, and I show the ISO to two CDs, one of 260 MB, the other weighing in at 500 MB.

Shaikh Foysal posted this comment on 2013-06-17:

Thanks dwirch
but what is iso? can i get it from internet? is that iso can install visual basic 6.0?
please give me link.

dwirch posted this comment on 2013-06-17:

ISOs are CD images that can be mounted as virtual CDROM devices, or burned to blank CDs. These particular ISO images are shown (in my case) listed in the Developer Tools section of the MSDN subscriber downloads, developer tools section The link is:

http://msdn.microsoft.com/en-us/subscriptions/downloads/#searchTerm=&ProductFamilyId=79&Languages=en&PageSize=10&PageIndex=0&FileId=0

However, you need to log in with a valid MSDN subscription ID in order to download.

If you have a TechNet subscription, you should be able to get the same download, just from the TechNet site.

I am sure you can find it elsewhere, but I believe these are the only authorized sources for the software. You can grab it from somewhere else, but I would question the safety of any downloads you find in other places.

jvdpeet01 posted this comment on 2013-06-18:

Hello fortypoundhead,
Thanks very much for this useful contribution of yours. I have applied it and it worked splendid on my desktop PC (but I had a problem with disk 2 of the MSDN,it did not install).
On my laptop however, despite applying the same procedure as for the desktop PC, it resulted in a not compatible application. I could not change the compatiblity settings for the IDE executable under UPDATE.
Please advise.

kind regards,

Jan van der Peet

MrO posted this comment on 2013-06-30:

Thanks for this guide.
I ran into it a year ago and it saved my day.

Here is an addition:

Recently some VB6 OCX's and DLLs stopped working on my installation and I received messages like
Line 18: Class MSComctlLib.StatusBar of control StatusBar was not a loaded control class
etc.
I got problems with three different libraries that I used. There might be more for others.

The solution for this is to uninstall Microsoft Internet Explorer 10.
When I did that, all my problems disappeared. (Well, not all my problems like not having enough money or women etc, but I will not rant about that here).

Mr O.

dwirch posted this comment on 2013-07-01:

If you find a solution to your money/women problem, please let us know. I think there are a few folks here who would like to know the secret.

jgarcia69 posted this comment on 2013-07-09:

Greets all.

I too have been running into many of the same issues being reported with VB6 (SP6) and Win7. My environment is Win7 x86. For me, the major issue was the ActiveX controls would not load in the project and getting the infamous “Object Library not registered” error message on project load. It seemed that no matter what Control set I was using (MS Windows Common Controls 5.0, 6.0, 5.0-2, etc), I could not get the controls to load.

The biggest WIN for me when reading this site was the registering of the Type Library MSDATSRC.TLB. That seemed to solve several problems with the ActiveX Controls. Many thanks to “randydellinger” for posting the idea. However, I did notice that from time to time, the reference to Microsoft Windows Common Controls 6.0 (SP6) | MSCOMCTL.OCX does get lost and I have to issue a RegSvr32 command and re-register the OCX component.

So, in short, if you are having issues getting the ActiveX Controls to load (Progress bar, Tree view, List view, Masked Edit Control, etc), try the following:

Open a Command Prompt as Administrator (Run as Administrator)
For x86 machines:
Change directory to C:\Windows\System32
Execute: regtlib msdatsrc.tlb
Execute: regsvr32 mscomctl.ocx

for x64 machines
Change directory to C:\Windows\SysWOW64
Execute: regtlib msdatsrc.tlb
Execute: regsvr32 mscomctl.ocx

This should help.

Cheers!

dwirch posted this comment on 2013-07-10:

Thanks, jgarcia69! Very helpful post.

enpiccoli posted this comment on 2013-07-15:

Thank you. Worked perfectly on my Windows 7, 64 bit laptop. Great Post and much help. Thank you, Thank you...

andy-w posted this comment on 2013-08-20:

Excellent, followed these instructions and worrked like a dream installing VB6 + SP6 on a Win7 64bit desktop.

andy-w posted this comment on 2013-08-20:

Useful tips on adding a manifest regarding UAC elevation.

http://www.questionhub.com/StackOverflow/3166943

Arman posted this comment on 2013-08-20:

Hi
MSCOMCTL.OCX does get lost and I have to issue a RegSvr32 command and re-register the OCX component. still the IDE comes with the error object library not registered. when I try to do these steps
Change directory to C:\Windows\System32
Execute: regtlib msdatsrc.tlb
Execute: regsvr32 mscomctl.ocx

the error in CMD is regtlib is not a recognised as internal or external command.

dwirch posted this comment on 2013-08-20:

The command is either not present in your path, or not present at all.

RegTLib.EXE should be present in C:\Windows
RegSVR32.exe should be present in C:\Windows\System32

Or there was a typographical error when you typed the command into the console.

galaxy posted this comment on 2013-08-23:

I have installed Visual Studio 6 Enterprise Edition with SP6 on Windows 7 professional - 32bit. The installation was fine with the procedures mentioned at the beginning of this thread. I still got the problem with loading MSCOMCTL.OCX.
When I open the old vb6 application, got errors and checked the log file and found "MSCOMCTLLIB.Imagelist of control Imagelist2 was not loaded".

I have tried to create a new VB6 project and tried to add the component in the IDE, but the component cannot be applied .
I have tried regsvr32 the OCX, but still does work.

any idea , please ?

galaxy posted this comment on 2013-08-23:

sorry, I mean even re-register the OCX , still doesn't work for loading the MSCOMCTL.OCX in VB6

vbcorner posted this comment on 2013-09-19:

This tool install automatically VB6 PRO or VS6 PRO/ENT on Windows 2000/Vista/7/8, any version (HP, Pro, Ultimate):

VS6 Installer
http://nuke.vbcorner.net/Articles/VB60/VisualStudio6Installer/tabid/93/language/it-IT/Default.aspx

It's totally free and simple to use.
No UAC, no RunAs, no Setup (just unzip in your folder), no registration.
I'have installed with success my VS6.0 Enterprise on Windows 7 Ultimate 64bit, Windows 8 64bit, Windows 8 64bit Pro.
Also, we can install Crystal Report 4.6.

Very very good!!!

vbcorner posted this comment on 2013-09-19:

VS6 Installer:
of course we can install MSDN and SP6, also.

dwirch posted this comment on 2013-09-19:

I see what you did there. Nicely done, though!

abenarif posted this comment on 2013-09-20:

ok vb6 work good on windows 7 but the problem now is :
List box and combo box always the alignment on left by other words the property LeftToRight dont work.... is there any solutuion for this problem?

elammari posted this comment on 2013-09-21:

I installed VB6 on Windows 7. When I open a project I get an error box with the title "Data View" and the message "out of Memory". What is missing?
Thanks.

dwirch posted this comment on 2013-09-22:

Try posting your code over in the forums. We can't troubleshoot your code without seeing it.

BTW- It could be as simple as lack of drive space, or trying to reference a source that does not exist in the path specified, or perhaps you don't have permission to the file location.

asdasd posted this comment on 2013-09-30:

One more name addition to name of loosers is required : http://sahilp.in/ as there is same content on http://sahilp.in/install-visual-basic-6-vb6-on-windows-7-windows-8/ ...

just to notify


Another thing is that the content is very good and helpful

thanks forthat

andreamillspaugh posted this comment on 2013-10-01:

Hi, I worked with visual basic 6.0 for a long time on windows xp but I just installed windows 7 64bit and I did the how to install visual basic 6.0 on windows 7, and it installed and everything but when I go to select a componemts And clicked on Microsoft windows common controls 6.0 I get an error that says Object library not registered did I not install it correctly, It dose this for all controls. Please help.

bilbo13 posted this comment on 2013-10-03:

Over the past 15 years, I have installed VB6 at least a few dozen times. Yesterday was my first time on Windows 7 64bit. The install was sitting on what I now know is Step 12, so I went googling and found this post.

I wish I had seen the bonus tip from badbrad on 2009-11-20, though. Not installing an ancient java AND not having to reboot would have saved me quite a bit of time over the last 4 years. ;-)

Kubos on this post!

bength posted this comment on 2013-10-11:

Thanks a lot for the useful information on how to install VB6 on Windows 7. Everything worked fine on my 32 bit system. However, there is one thing that doesn't work. I have an old application which worked fine on XP but here I get "Errors during load" while loading the application and "Method or data member not found" when compiling. Where it gets stuck is where I use a PictureBox control. In the log files I get "Class MSWLess.WLList of control List1 was not a loaded control class" and equivalent. I have copied the mswless.ocx from VS6, disk 2, to c:\windows\system32 and registered it. Any idea what could be missing?

dwirch posted this comment on 2013-10-11:

To be honest, you've already tried would I would suggest. The only thing I could think to do is to remove the list control that it appears to be tied to, and recreate it.

Clinsys posted this comment on 2013-10-16:

Thanks this has been a very helpful site. I have followed instructions and got VB6 working on my Win 7 64 bit laptop.

I have an outstanding issue. When I try to add component mscomctl.ocx or dblist32.ocx it gives message "File not found". Both of these are in c:\windows\syswow64\ which is where 1 post suggested they should be and where VB6 is supposedly looking for them. I think it may be a registry problem.

But I am an inexperienced user. I do not know how to unregister or re-register files like this manually. Some detailed instructions would be very useful. Thanks

Also dbgrid32.ocx is truly missing. I think this was kept in VB6 to be compatible with VB4. Any suggestions on whether I can use this and how I would go about getting it and registering it (I have it on my XP computer). Or should I rather upgrade it to the msdatgrd.ocx

rickyjames posted this comment on 2013-10-29:

How great to see an old friend back in my "All Programs" list, thanks so much.

mporter posted this comment on 2013-11-03:

I have tried the procedure at the head of this thread and am unable to install VB6 on my new computer (Windows 7 Home Premium). I set properties of acmsetup and setupsp6 to "rin as administrator" and set compatabiliity to XP sp3. I turn UAC off (slider down to "never notify"). I then right click on setup and click on "run as administrator. Install gets as far as agree to EULA, athen I get the message "visual Studio 6.0 service pack 6 setup was not completed successfully." Same occurs when I try sp5 with the sp598ent.stf hack to avoid the MDAC 2.5 issue.

tree1891 posted this comment on 2013-11-19:

I have tired in Windows 8 x64.
But in the last of setup, it keeps not finished.
I force to close it. vb6 does work well. but what's wrong?

dwirch posted this comment on 2013-11-19:

Yes, the setup hangs at the end, but VB works otherwise. Check out the VB6 on Windows 8 article:

http://www.fortypoundhead.com/showcontent.asp?artid=23916

RM posted this comment on 2013-12-02:

Thanks. That was a very useful HOWTO.

robertooo posted this comment on 2013-12-09:

Hi!

Visual basic is running but when I open my project file it writes object library not registered.

Have sb any ideas?

dwirch posted this comment on 2013-12-09:

are you referencing any custom controls ?

DanCollins posted this comment on 2013-12-30:

Howdy, This may sound like a real basic question, but I'm having trouble with terminology regarding the effort to install VB6 onto Win7. Specifically, is VB6 the same as Visual Studio 6.0? I have VB6 installed on an XP box and the disc only says VB6 not VS; and when I fire up the IDE it also only says VB6 not VS. Yet my installation of VS 2005 clearly says VS in the IDE. So I'm wondering if this discussion is about installing VS 6.0 or VB6? Thanks in advance. Dan

dwirch posted this comment on 2013-12-30:

Hey Dan -

This post specifically deals with installing VB6. The instructions given above were created by me, utilizing the Visual Studio media.

If you are not using the VS media but are instead using the VB6 media, the installation instructions should be *very* similar, with a few items left out.

AnonymousCoward posted this comment on 2014-01-28:

vc6.0 has the same problem.

AnonymousCoward posted this comment on 2014-01-30:

Hello, I have VB6 installed on a Windows 7 SP 1 64 bit VM box. It was installed by our System Admin, but I don't think the exact install method above was used. He sent me some screen shots of the install, and I don't see the options list from above. I am having several issues. First, a lot of DLLs that are registered on the system, are showing as missing in the project references. When I try to compile the program, I get a "can't find project or library" on a Common Dialog Control, even though I have comdlg32.ocx registered in c:\windows\syswow64. I get the same message on a "Command" statement, which accepts parameters to the program. Any idea what is wrong?



Steve28 posted this comment on 2014-01-30:

I decided to register with this site, not sure if that is necessary to get a response. I submitted the question above.

dwirch posted this comment on 2014-01-30:

Just for reference, I show the following four files in my SysWOW64 folder:

COMDLG32.DEP
COMDLG32.DLL
COMDLG32.OCA
COMDLG32.OCX

Does your install show the same ? Also, you might make sure that the control did register correctly by using something like http://www.nirsoft.net/utils/registered_dll_view.html

AnonymousCoward posted this comment on 2014-01-30:

I see those 4 files in my SysWow64 folder. I downloaded that app and none of my DLLs are showing as registered. I even re-registered comdlg32.ocx with this app, and it said it was successful, but it's still is not showing as a registered control. I am at a loss.

Steve28 posted this comment on 2014-01-30:

Somehow I got logged out of here again. Anyway, the 32 bit version of RegDLLView is showing comdlg32.ocx as registered, as well as a bunch of other DLLs that are showing as missing in VB6. Any ideas?

dwirch posted this comment on 2014-01-31:

Did you try running the IDE as Admin, Steve?

Steve28 posted this comment on 2014-01-31:

Yes, I did. I am stumped.

dwirch posted this comment on 2014-01-31:

have you checked the windows event logs (system, application, security) for anything weird related to firing the IDE? I'd suggest launching the IDE, loading your app, then immediately check the event log for events that might say where it is looking for the control (maybe it's looking in the wrong place or at the wrong version), or possibly an access denied to path error.

Steve28 posted this comment on 2014-02-01:

The log file is showing "Line 475: Class MSComctlLib.StatusBar of control sbStatus was not a loaded control class."

RegDLLView is showing MSComctl.ocx registered in c:\windows\system and c:\windows\syswow64.

Does this control need to be registered in a specific location? I thought I read somewhere this need to be in c:\windows\system, not sure why it's showing in 2 locations.


Steve28 posted this comment on 2014-02-01:

Actually, I think this log file is from before I registered the control in c:\windows\system. I am not getting this anymore when I load the app. I just get "can't find project or library" when I try to compile it.

Steve28 posted this comment on 2014-02-05:

Just an update on this, I think I have this working now with the help of a co-worker. The error message VB was giving me was leading me down the wrong path. I had to remove the reference to the missing DLLs, recompile, then add the references back in to get it to compile. We decided to remove the references completely on many of the DLLs, and use late binding. Everything appears to be working now. Just wanted to update for anyone else who might have this problem, although this might not be specific to a Windows 7 installation. Thanks for your help!

dwirch posted this comment on 2014-02-05:

Thanks for the update, Steve!

AnonymousCoward posted this comment on 2014-02-06:

I installed vs6 on my winy 32bit machine. Trying to maintain old vb7 app. It seems to be installed correctly, but when I try to open an existing vb6 project (.vbp), the IDE crashes with a "Visual Basic stopped working" message. When going into the JIT, the message appears, "Unhandled exception at 0x0040d5c8 in VB6.EXE: 0xC0000005: Access violation writing location 0x76eca632.". Same thing happens when I run it as an admin.

In the aqpplication log file, the following is logged "Faulting application name: vb6.exe, version: 6.0.97.82, time stamp: 0x403acf6c
Faulting module name: vb6.exe, version: 6.0.97.82, time stamp: 0x403acf6c
Exception code: 0xc0000005
Fault offset: 0x0000d5c8
Faulting process id: 0xc00
Faulting application start time: 0x01cf2355504ebe7f
Faulting application path: C:\Program Files\Microsoft Visual Studio\VB98\vb6.exe
Faulting module path: C:\Program Files\Microsoft Visual Studio\VB98\vb6.exe
Report Id: e0adf951-8f48-11e3-8040-000ffe8c01a4"

Seems like I have a permissions issue?

mgrahn posted this comment on 2014-02-06:

Reposted after I registered....sorry for the repost....

I installed vs6 on my win 7 32bit machine. Trying to maintain old vb7 app. It seems to be installed correctly, but when I try to open an existing vb6 project (.vbp), the IDE crashes with a "Visual Basic stopped working" message. When going into the JIT, the message appears, "Unhandled exception at 0x0040d5c8 in VB6.EXE: 0xC0000005: Access violation writing location 0x76eca632.". Same thing happens when I run it as an admin.

In the aqpplication log file, the following is logged "Faulting application name: vb6.exe, version: 6.0.97.82, time stamp: 0x403acf6c
Faulting module name: vb6.exe, version: 6.0.97.82, time stamp: 0x403acf6c
Exception code: 0xc0000005
Fault offset: 0x0000d5c8
Faulting process id: 0xc00
Faulting application start time: 0x01cf2355504ebe7f
Faulting application path: C:\Program Files\Microsoft Visual Studio\VB98\vb6.exe
Faulting module path: C:\Program Files\Microsoft Visual Studio\VB98\vb6.exe
Report Id: e0adf951-8f48-11e3-8040-000ffe8c01a4"

Seems like I have a permissions issue?

I have some third party ocx files and some dlls.

dwirch posted this comment on 2014-02-06:

Unregister MSCOMCTL.OCX, then re-register it. It's in the System32 folder.

mgrahn posted this comment on 2014-02-06:

thanks for the quick response......unregistering and rereistering did not work for MSCOMCTL.OCX

still the same problem...

dwirch posted this comment on 2014-02-06:

Assuming your 3rd party OCXs and DLLs are registered, I would suggest removing references to said OCXs and/or DLLs one at a time. You can do this by editing the project file with notepad, and temporarily removing one of the lines that start with "Reference".

After removing a line, save the file, and try opening the project. If it fails with the same error, then it's not the culprit. If it fails with a different error (most likely something along the lines of "Reference not found") then you most likely have found it.

It may be as simple as re-registering the particular DLL or control. In some cases though, you either have to find an updated control, or move the code back into the project, rather than using an external codebase.

You might also check to see if these third party bits have any dependencies themselves. I've seen in the past where a developer referenced a specific icon in the Windows XP version of User32.DLL. When moving that project to Windows 7, the DLL still existed, but the icon did not, causing very similar behavior to what you describe.

mgrahn posted this comment on 2014-02-06:

I re-registered all of the ocx files except mscomctl.ocx which I unregistered but failed to re-register. when trying to register, it failed with "The module "mscomctl.dll" was loaded but the call to DllRegisterServer failed with error code 0x80004005.

So maybe that ocx is corrupt???? replace it?

dwirch posted this comment on 2014-02-06:

0x80004005 is an access denied. Are running the command prompt as administrator ? Is UAC turned off ? You may have to turn it off during the process.

AnonymousCoward posted this comment on 2014-02-06:

Installing vb6 on Win7 gives no problem. Of course there is a but. A few years ago I had the same problem. Installed vb6 but it was not possible to close it without an Appcrash of VB6. Also Each error in debugging mode results in the same appcrash. A year later, I don't know why (I installed something else or so) it worked perfectly en kept working. Now I re-installed my windows 7 (ultimate) and the same problem is back. Each error or closing action results in appcrash. Please help, I'm desperate.

Ouwegrijze posted this comment on 2014-02-06:

It was Ouwegrijze who posted unintentionally as Anonymouscoward :-)

dwirch posted this comment on 2014-02-06:

Most likely, some application that you installed between the non-working state and the working state updated or reverted a DLL or control that the VB6 IDE was more happy with. That's why when you re-installed Win7, all that went away, and you were back to the beginning, trying to find the one package that changed a DLL to make VB6 happy.

mgrahn posted this comment on 2014-02-06:

reregistering all the ocx and dlls did not help. I ran another vb6 project with less ocxs and dlls and the same error comes up....When going into the JIT, the message appears, "Unhandled exception at 0x0040d5c8 in VB6.EXE: 0xC0000005: Access violation writing location 0x76eca632."

mgrahn posted this comment on 2014-02-06:

all of these vb6 projects are using windows API calls. Such as kernel32.dll and user32.dll....

so is the culprit is those API functions...

dwirch posted this comment on 2014-02-06:

I don't think it is necessarily a permissions issue, per se. "Unhandled Exception" and "Access Violation writing location" in the same error message usually means that the code tried to write to a memory location (virtual or physical) outside of the space assigned by Windows. Without peeping out the flow the code and which APIs are being summoned and how, it'd be pretty hard to troubleshoot "over the phone".

Is it just this one project that is giving you problems ?

mgrahn posted this comment on 2014-02-06:

I have two other projects writtn in vb6 that are behaving the same way. Open the project and "VIsual Basic has stopped running" they are all using WIN32 API Calls....

mgrahn posted this comment on 2014-02-07:

when I take all of the OCX controls out, the project loads albiet with errors on the forms.

When I selectively take out a set of ocx coltrols like just 3rd party ones, the project does not load.

SO individually or a combination the project does not load.

mgrahn posted this comment on 2014-02-07:

so it appears just using .ocx controls, the project will not load.....

dwirch posted this comment on 2014-02-07:

So you've narrowed it down to OCX controls. Are the OCX's referencing something that does not exist in Windows 7 or greater ? Do you have access to bring the code from the OCXs into your project ?

GeneticWolf posted this comment on 2014-02-23:

By: mgrahn
Date: 2014-02-06
according to the error message you give us,
You have unregistered mscomctl.ocx but you then tried to register mscomctl.dll instead of mscomctl.ocx (I for myself doesn't have the DLL, it doesn't come with Vb6)

also, plz note that Vb6 doesn't appear to run properly on Win7 if you have installed IE10 or IE11
I didn't try the msdatsrc.tlb trick yet, I'm just finishing reading the whole forum and all the reference
took me a few hours... :)

I already had a working vb6 on Win7x32sp1 installation prior to come here. I had
figured out how to install it by spying on the install process. However, I'm attempting to circumvent
the IE10 bug.

also, about the API call, I got a program (vb6) made of more then 15000 lines of codes and with hundred of API call
There is no problem there. I also use Subclassing wich can make Vb6 GPF (crash) if you don't know how to
handle it the right way. so again, the API is NOT the culprit if your code is properly made.

One thing to note about API call is the fact theses DLL are made in C. This being said, almost ALL call to API
equiring a string MUST BE null terminated. otherwise, the call will probably work 7 times out of 10 and for no
apparent reason GPF (global protection fault) your program of even Windows. I have seen a bad case scenario where a Vb6
could BSOD Win7 (very rare). To know more about wich api require null string terminated and wich doesn't, refer to
API documentation (for myself I'm using "Dan Appleman Visual Basic 5.0 Programmation des API Win32")

hope that helped.

AnonymousCoward posted this comment on 2014-08-18:

Hi

Could sb help me? I've installed VB6 on Win 7 Ultimate 64 bit and I've registered mscomctl.ocx successfully in cmd but when I start VB6 it writes it isn't registered.

AnonymousCoward posted this comment on 2014-10-02:

Not works with Windows 10 Enterprise Preview. It got stuck at "Setup is updating your system...". There is some CPU activity for the installer but after a few hours it didn't finish.

AnonymousCoward posted this comment on 2014-10-02:

Addition to Win10: I can start the IDE but I cannot install SP6 for it, I think because the uncomplete setup.

dwirch posted this comment on 2014-10-02:

As for Windows 10, I haven't got my copy installed as of yet. But in my humble opinion, Windows 10 is a bolt-on or service pack for Windows 8.1.

That being said, you might try the instructions for installing VB6 on Windows 8 elsewhere on this site. Seeings how it's probably pretty much the same underneath, you might have better success using the Windows 8 instructions.

I'll get the tech preview installed as soon as I can, and give the process a try.

AnonymousCoward posted this comment on 2014-10-21:

The VB6 IDE installs on Windows 10 (technical preview). VB6 programming looks to have a future !

AnonymousCoward posted this comment on 2014-11-07:

Nice to see that the VB6 IDE installs and runs on Windows 7, Windows 8.x and Windows 10 technical preview.

Not surprising though, since VBA programming is supported on them all.

Clearly there is no point in converting applications developed using VB6 programming to dotNet.

dwirch posted this comment on 2014-11-07:

The write-up specific to Windows 10 is available as well, if you're interested:

http://www.fortypoundhead.com/showcontent.asp?artid=23993

AnonymousCoward posted this comment on 2014-11-23:

Hi, I just successfully installed VB6 as per your instructions, FortyPoundHead, but when I insert Components into the ToolBox, there is an error saying 'object library not registered'.

AnonymousCoward posted this comment on 2014-12-21:

Thank you very much for this information. I archived my own version of this site as PDF just in case, if it's OK.

Elizalde Baguinon
Philippines

AnonymousCoward posted this comment on 2015-01-12:

I've got my VB6 up and running on Win7, so thanks!

FPH, I would urge you to revise your OP list above so that it incorporates all of the various pre-and post- setup steps that have been mentioned in the comments, in the order they need to be performed.  Everything you need to do is mentioned here someplace , but it's all fragmented as far as the sequence goes.  The order I did stuff discussed here:

1. MSJAVA.DLL.  When you create a zero-byte .txt file, you've got to drop the .txt extension so it becomes a .dll (See: http://windows.microsoft.com/en-us/windows/file-names-extensions-faq#1TC=windows-7)

2. dx7vb.dll - ( http://originaldll.com/file/dx7vb.dll/965.html )

3. Common Controls  ( http://www.microsoft.com/en-us/download/details.aspx?id=10019 )

4. Disk Install

5. IDE Compatability setup

6. Service Pack 6 (http://www.microsoft.com/en-us/download/details.aspx?id=5721)

 

 

dwirch posted this comment on 2015-01-12:

I'll work on getting the process updated this week!  Thanks for the input!

AnonymousCoward posted this comment on 2015-01-28:

cant get past the jvm install. keeps asking me to install it and then reboots even after i put msjava.dll in c:\windows and tips?

AnonymousCoward posted this comment on 2015-02-03:

i can't get by the jvm install either. created the msjava.dll in the correct folder. but keep getting asked to isntall the jvm which doesnt seem to get installed? any tips?

dwirch posted this comment on 2015-02-04:

Just ran through the process on a fresh virtual machine (fully patched Windows 7), and had no issues. The JVM zero-byte file trick worked with no problem.

Are you sure that you created msjava.dll, and not msjava.dll.txt ?  Did you follow the procedure for creating a zero-byte file ?

AnonymousCoward posted this comment on 2015-02-09:

Microsoft have just closed a suggestion on the Visual Studio UserVoice site calling for the VB6 programming language to be updated.

The request has now been merged with a previous request for VB6 programming at:-

http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3440221-bring-back-classic-visual-basic-an-improved-versi

Microsoft have prevented any further voting, but you can still make comments there.

AnonymousCoward posted this comment on 2015-02-16:

HI!

Thx Peter for a 5 star article on running VB 6 On Windows 7 (In my case Pro 64 bit).

With some peculiar stuff it went just smoothly to install and run.

My own and only DLL!! (maid by myself) worked just fine as well.

SYSWOW64 and so on.

Greetings from Sweden

Goran - with the double dots above the 'o'

 

dwirch posted this comment on 2015-02-16:

I am glad you found this post useful, Göran. Drop me a line in the forums or through the contact page if there is anything else you need.

But, I have to ask, who is Peter ?

AnonymousCoward posted this comment on 2015-03-03:

I feel something strnage when installing Visual Basic 6.0 on Windows 8.1.

Even I have created MSJAVA.DLL to C:\WINDOWS why did Installation still ask for installing Java?

dwirch posted this comment on 2015-03-04:

In your screenshot, I notice that you do not have extensions visible. Is it possible that you have created a file named MSJAVA.DLL.TXT, rather than MSJAVA.DLL?

Try jumping out to a command prompt, and type:

dir MSJAVA.*

Check the file extension on the results. If there is anything after the .DLL, you'll need to change the name of the file.

AnonymousCoward posted this comment on 2015-03-24:

if i have a third party ocx where can i actually put it(the file .ocx or .dll) 

thanks

AnonymousCoward posted this comment on 2015-03-25:

Very useful article. Thank you.

I was getting an error with a object library not registered, i.e. the VB6 Common Controls. A quick search revealed that explicit registration of an ocx and tlb was needed, so under an admin level command prompt...
cd \Windows\sysWOW64
regsvr32 mscomctl.ocx
c:Windows\Microsoft.NET\Framework\v4.0.30139\regtlibv12 msdatsrc.tlb
...and VB6 and my project loaded without error.

AnonymousCoward posted this comment on 2015-04-26:

Please spread the word about a new project to create a vb6 replacement:

 

https://www.indiegogo.com/projects/a-replacement-to-visual-basic-6-ide-and-compiler/x/9882893

boblite posted this comment on 2015-04-28:

Suppose I want to make certain that my prog written in VB6 uses historic DLLs and OCXs that have been superseded, with the purpose of making sure that my prog will work.  Is there a way I can register these to a special directory created by me, so that my program can rely on these old versions ?   Or will new Windows versions sometimes or always thwart this kind of approach, either by design or by necessity ?  Or are new versions of old DLLs and OCXs always backwardly compatible, rendering unnecessary what I am proposing ?

Within my program can I establish path names to these DLL's placing them in directories that only my prog will use, using the regsvr32 procedure ?  Or can I declare special pathnames within my prog ?

Suppose I rename old DLLs and OCXs and put them in Windows\System32\ . Would this allow me to ensure my program uses the old DLL's & OCX's ?   Or are DLLs and OCXs designed so they cannot be renamed ?  Or is it illegal to rename them ?  Suppose I rename a DLL from comctl.dll to comctl1998.dll and put it in System32 ?
 
Or is this outlawed behavior ?  Or are my questions based on wrong assumptions ?

WIll much appreciate advice, as I do not know the norms and practices within this area.

dwirch posted this comment on 2015-04-29:

The situation that you are describing is actually not that uncommon.  Some programs, especially portable applications, bundle their own libraries and controls with the application. The DLLs or controls are usually placed in the same folder as the application, or a subfolder below the application directory.  For example:

App directory    -> C:\Program Files (x86)\MyApplication
App Subdirectory -> c:\Program Files (x86)\MyApplication\MyLibs

The mechanism relies on applications not fully qualifying the paths to dependent DLLs when loading them, and the operating system searching the executable directory before any shared location. However this technique can also be exploited by malware, and the increased flexibility may also come at the expense of security if the private DLLs are not kept up to date with security patches in the same way that the shared ones are.

Placing your DLLs or OCXs in %systemroot% most likely won't work on modern Windows operating systems, due to the cool feature of Windows File Protection.  It really is a good thing, as it prevents DLL Stomping, and further, DLL Hell.

Windows File Protection (WFP) prevents programs from replacing critical Windows system files. Programs must not overwrite these files because they are used by the operating system and by other programs. Protecting these files prevents problems with programs and the operating system.

WFP protects critical system files that are installed as part of Windows (for example, files with a .dll, .exe, .ocx, and .sys extension and some True Type fonts). WFP uses the file signatures and catalog files that are generated by code signing to verify if protected system files are the correct Microsoft versions. Replacement of protected system files is supported only through the following mechanisms:

  • Windows Service Pack installation using Update.exe
  • Hotfixes installed using Hotfix.exe or Update.exe
  • Operating system upgrades using Winnt32.exe
  • Windows Update

If a program uses a different method to replace protected files, WFP restores the original files. The Windows Installer adheres to WFP when installing critical system files and calls WFP with a request to install or replace the protected file instead of trying to install or replace a protected file itself.

TLDR; place your DLLs/OCXs in the application folder, or a subfolder.  Don't overwrite stuff in %systemroot%

boblite posted this comment on 2015-04-30:

I have a closely related question.

Suppose I want VB6 to use an older version of a DLL.  Is VB6 compelled to access whatever version is registered  to the Windows directory, making it impossible for VB6 to use an older version of the DLL ?  Or can I put the older version of the DLL in a directory created by me, and instruct VB6 (and only VB6) to access that older version, like by placing code in the registry that would cause VB6 to access the older version, or is this not possible ?

Or... is it erroneous to assume that sometimes, newer versions of a DLL are not entirely compatible with VB6.  Is this correct, or are newer DLLs always backwardly compatible ?   Or just usually backwardly compatible ?  Or.... often incompatible ?Will much appreciate information on this.

Will much appreciate information on  this.

dwirch posted this comment on 2015-04-30:

Yes, you can definitely put your compatible DLL in your applications directory.  The first place the app will look for it will be in its own directory. You don't have to register it with Windows. To be safe, reference it directly, with full path. Kind of like:

app.path & "\mylibrary.dll"

Backwards compatibility usually works. BUT this has bit me in the past, both as a provider and consumer of libraries. If you write some code around specific output of a function in a DLL, and that output changes, well, your borked.

boblite posted this comment on 2015-05-01:

Many thanks for clarifying this.
 
One question: Where do I put the full path, like :

app.path & "\mylibrary.dll"     ?

Does that go in the Start module ?

boblite posted this comment on 2015-05-02:

Thanks for the info but I'm not quite clear on the specifics.

You suggested putting declaration of DLL locations into StartModule.bas like

app.path & "\mylibrary.dll"


As you know I am not an IT professional and this is a bit abstract for me and a concrete example would be very very helpful. 

What would be the correct syntax for the following situation: 

Suppose the program is located in a directory  called


C:\Program Files (x86)\Educ

and I keep all DLLs and OCXs in a directory called

C:\Program Files (x86)\Educ\DLLS

and i have the following DLLs and OCXs


Monday.DLL
March.DLL

HiTime.OCX
HiTime.OCA
Oma.OCX
oma.OCA

What would be the syntactically correct code to place into StartModule.Bas ?

boblite posted this comment on 2015-05-04:

On computers running 64 bit Windows, will it create problems if VB6 goes into Program Files  rather than Program Files (X86) ? 

dwirch posted this comment on 2015-05-04:

VB6 programs should never show up in C:\Program Files on a 64 bit system.  Since they are 32-bit programs, Windows (and setup) should be putting your program into c:\program files (x86).  

The only way they will go into c:\program files is if you have built a custom setup process that forces your program in there. 

Generally, you only want native 64-bit programs going into c:\program files on a 64-bit system.

AnonymousCoward posted this comment on 2015-05-06:

Can't get the JVM thing to by pass at all. I am on 64 bit windows 7, trying to implement this and get out of VM windows xp.

dwirch posted this comment on 2015-05-06:

What part of the JVM solution are you having a problem with?  Assuming the file has been created, are you sure it is called MSJAVA.DLL and not MSJAVA.DLL.TXT ?

Is it located in C:\Windows ?

AndrewW posted this comment on 2015-05-14:

I have just stumbled onto this site - and it looks very useful!

I've just installed VB6 on my new Windows 7 machine using the standard instalation. It seems to work OK now I have set it to run as administrator.

There may be problems that I haven't yet found.

Have I destroyed my chances of following your route to install, eg with permanent changes to the Registry etc?

Can I simply uninstall and start again?

 

 

 

 

 

dwirch posted this comment on 2015-05-15:

You should be able to uninstall and start over, if you want.  

However, it ain't broke, why fix it?

AndrewW posted this comment on 2015-05-15:

Good point!

 

I will come back if I find it is broken in some way.

 

many thanks.

AnonymousCoward posted this comment on 2015-07-10:

Worked like a charm! Thanks for the info! I have this working in a VirtualBox VM with Windows 7. Took about 30 minutes to get it all up and running. I think VB6 was that rare combination of real ease of use yet real power.

Quite exciting to see that VB splash screen after all these years. :)

AnonymousCoward posted this comment on 2015-09-16:

Hi,

I am seeing this error "javasign.dll was unable to register itself in the registry" and then it says ïnstallation did not succed, can you please help

atul

dwirch posted this comment on 2015-09-16:

Did you create the zero-byte file called msjava.dll as prescribed in step two, prior to starting setup ?

AnonymousCoward posted this comment on 2015-09-24:

Hi,

I am trying to install Visual Basic 6.0 Professional Edition. I followed all the steps and the prerequisites but I am always getting a window "Install latest windows service pack" after entering the name and company information. I have to select the Install service package checkbox or Next will be dithered. If I do so, the install is trying to install something else and then closes unexpectedly. Do you have any idea why I get this window?

Many thanks for your help.

AnonymousCoward posted this comment on 2015-10-01:

We created the zero byte file msjava.dll exactly as instructed, but we were still stuck at the java installation screen. Then we deleted the line "VmPath=ie4\msjavx86.exe" in Setupwiz.ini. That help and VB6 is now installed and working on Windows 7 Prof. x64. 

 

AnonymousCoward posted this comment on 2015-10-13:

Trying to install VB6 on my Win7 x64 machine and whenever I get to the Setup is searching for installed components step the installer stops responding. I've done all the steps in the original post but no change. Anyone see this before?

AnonymousCoward posted this comment on 2015-10-19:

I have installed VB6 SP6 on a machine running Win7Pro 64 bit using yuor wonderful instructions.  Worked great!

However, when I try to open an existing VB6 project I get:

Line 18: Class MSComctlLib.ProgressBar of control pbStatus was not a loaded control class.
Line 74: Class RichTextLib.RichTextBox of control rtbDisplay was not a loaded control class.
Line 126: Class RichTextLib.RichTextBox of control rtbDisplay was not a loaded control class.
 

I have gone to the sysOW64 directory and run regsvr32 on the OCXs but still no joy.

Any thoughts?

AnonymousCoward posted this comment on 2015-12-24:

These instructions are very helpful.  I had VB6 installed and running on Win8 for years, but after upgrading to Win8.1 VB6 reported "permssion denied" when starting the IDE.  Setting the compatibility of VB6.exe to "windows XP sp 3" allowed it to run fine.  Thanks!  I spent all day researching ways to fix it before I found this page and was just about ready to restore my PC to the factory settings and go back to Win8.  This saved many hours of aggravation. hvanaller

AnonymousCoward posted this comment on 2016-01-25:

On my Win 7 64bit I had a few problems:
I created the zero-byte msjava.dll file in C:\Windows as above but was still prompted to install Java. I copied a real one (from an XP machine) found in C:\windows\System32 to the Win7 C:\Windows\System32, that fixed the "install Java" problem (didn't try a zero-byte one), BUT....

The install proceeded with files copied but then came up with "javasign.dll was unable to register itself in the system registry" and didn't complete the install ("not completed successfully"), although VB6 and VC seemed to run ok.

I then tried to install SP6 but this failed after the licence dialog saying not installed (no files copied).

I found I couldn't repair/uninstall VS6 (and try again) because the setup.stf file was missing from C:\Program Files (x86)\Microsoft Visual Studio\Common\Setup\1033. AH!

At some point I started to get errors like "Setup could not remove the file: 'C:\Windows\vssetup.ttf', it seems this can be ignored, see http://www.vbforums.com/showthread.php?797619-Running-VB6-and-VC-6-in-windows-8-8-1, but this thread is about Win8.

For the javasign registration issue I took info from https://www.dmcinfo.com/latest-thinking/blog/id/102/installing-visual-studio-60-on-windows-xp-or-vista, but the main description is incomplete (for me), I went with this comment by "Hern"

Friday, April 01, 2011 9:59 AM
I also ran into Java VM issue installing Visual Studio 6.0 on Windows 7 x64. I had to do the following steps to resolve the Java VM issue.
0. Start cmd as administrator
1. Copy msjava.dll and javacypt.dll from an XP machine to BOTH System32 and SysWOW64 directories on Win7 x64 machine.
2. regsvr32 c:\Windows\System32\msjava.dll
3. regsvr32 c:\Windows\System32\javacypt.dll
[note I was in C:\windows\system32 when I ran regsvr32]
After that I (re)installed VS6 over the failed install and it ran to completion, I checked the Uninstall/Repair dialog was now working (but didn't use it).

The SP3 also installed OK.

As another java fix,I remember I did see (above, and similar elsewhere, but forgot to try out:

We created the zero byte file msjava.dll exactly as instructed, but we were still stuck at the java installation screen. Then we deleted the line "VmPath=ie4\msjavx86.exe" in Setupwiz.ini. That help and VB6 is now installed and working on Windows 7 Prof. x64. 

Don't forget to reenable UAC.

Thanks for creating the orginal post.

Cheers, Dave

AnonymousCoward posted this comment on 2016-03-02:

Thanks a lot for all this useful info, but I still have a little problem that I cannot solve with my Windows7 64bits. My project uses controls from FM20.dll (Microsoft Forms Object Library). And I am not able to add the Microsoft Forms 2.0 Object Library component to the VB6 project, so my forms dont load correctly! It always tell me that the object library is not registered. I went thru using regsvr32 as administrator to register FM20.dll in Windows\sysWOW64 to no avail.

Philippe V.

AnonymousCoward posted this comment on 2016-03-02:

On  my win10 laptop, MSJAVA.DLL should be placed on \system32, otherwise the installer would check java updates and keep rebooting

rossy65 posted this comment on 2016-03-09:

I found this article to be invaluable for provisioning the cloud (EC2) for doing VC6 work.   (We are migrating to Visual Studio 2013).

I found that WinServer2012 machines (I think) would crash, requiring the Win8 Rename the EXE fix.

But the WinServer2012R2 machines are fat dumb and happy without the fix.

I saw one thread regarding a MSDEV.COM and MSDEV.EXE and the .COM might be not compatiblie with the new OS.  So renaming prevents the *.com from being executed.  Sounds reasonable... but this doesn't explain why it works on WinServer2012R2 machines to me... at any rate, between this article and the others I was able to get a version going without having to provision a VM running WinServer2003 on the cloud.  (Which I plan to do anyway).

-- Thanks and Regards

 

AnonymousCoward posted this comment on 2016-03-11:

Anybody has an idea on why I cannot set references to MsForms FM20.dll on my VB6 installed on Windows 7 64 bits ? I need MsForms controls form Unicode capacity in my apps, but I find impossible to set a reference to FM20.dll, I get "library not registered", even if I do register FM20.dll in sysWOW64 with regsvr32...

AnonymousCoward posted this comment on 2016-03-19:

Hi all, I'm working with VB6 on W7 thanks to your support. The problem I'm facing now on big screens and tablets is the syze of the controls. E.g. the combobox can be made larger increasing the font size, but there is no way to increase the size of the dropdpwn button, nor to increase the size of the standard menus. The same problem with checkoxes !

Any hint out there for alternative common controls to be set large enough for touchscreens and tablets ?   Gianni

 

 

 

 

 

AnonymousCoward posted this comment on 2016-03-23:

Thank you very very much for these notes. They saved me a ton of time and hassle.

Just to re-emphasize what has already been said, best is to login as an administrator (not just run the installer as an administrator). When I logged in to Win7 as a non-administrator and ran setup as an administrator, it gave me an error that the computer is "locked" which didn't make any sense, and refused to go any further. Also, once installed, I am able to make my projects as a normal user, but at the end it gives me an error about it not being able to access the windows registry. Error still appears if you login as a non-administrator but run VB6 as an administrator. However, the error doesn't seem to affect the ouput. The error does not appear if you login as an administrator.

DaveOLW posted this comment on 2016-04-16:

~~Hi,


Trying to install VB6 on Windows 7 Professional, have followed above instructions but cannot get past -

4.Right-click SETUP.EXE, select Run As Administrator.
5.On this and other Program Compatibility Assistant warnings, click Run Program.

As soon as I click ~~Run As Administrator-- it comes up with a message stating it is not compatable and no option to run only a button to cancel.

Any ideas?

AnonymousCoward posted this comment on 2017-04-15:

A big thank you for your article.Thanks Again. Great.

AnonymousCoward posted this comment on 2017-04-24:

Good article. I might try VB5 on Win7-64. I've got a ton of VB5 source that I need to look at ASAP. Fun? Hell no.

AnonymousCoward posted this comment on 2020-02-14:

Regarding the install of the Help file
I have Oct 2000 MSDN DVD (dual layer)
In Win 8.1 32 bit, I tried to run it, and it (w8.1 presumably) advised that it is a 16bit installer.
It did suggest installing ..... (some thing to help W8.1 32 bit, handle a 16 bit program).
I did not proceed (yet) BECAUSE - I am surprised that the MSDN Help installer is 16 bit

Can anyone confirm that it is indeed 16 bit ?

dwirch posted this comment on 2020-02-15:

You can use the the SigCheck program, which is part of the SysInternals tools. The tool can be downloaded from Microsoft at this link.

To use it, make sure it is in your path, and run it specifying the file you want to check, thus:

You must be logged in to make a comment.