-
Feb 24th, 2017, 06:29 PM
#1
Thread Starter
New Member
Issue with Running VB6 in Windows 7
I am having trouble opening my VB6 code on my new workstation. First, here is the error (as an example from one of my programs):
When I double click to open the .vbp project the following two errors occur.
"Object Library Not Registered"
"Continue Loading Project" / Yes
I click Yes and I'm referred to Form1.log. When I open the Form1.log. The following details are displayed.
Line 13: Class MSComctlLib.ProgressBar of control ProgressBar1 was not a loaded control class.
Line 24: Class MSComctlLib.StatusBar of control StatusBar1 was not a loaded control class.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
I've read several articles on this issue and here's what I've tried. I've taken the following file (mscomct2.ocx) and copied it into C:\Windows\SysWOW64\. Then I followed the following instructions regarding this component:
Manually register this component when VB6 controls are missing
1. Copy component under folders:
C:\Windows\sysWow64 >64
C:\Windows\system32 >32
2. Open DOS cmd prompt with Administrator rights
3. Point to "C:\Windows\sysWow64"
4. Execute command:
regsvr32 mscomct2.ocx
When I run this, I get the following message:
DllRegisterServer in mscomct2.ocx succeeded.
However, after I've run these steps. The same error messages and the same log entries occur. Is there a step that I'm missing?
Thank you
-
Feb 24th, 2017, 08:13 PM
#2
Re: Issue with Running VB6 in Windows 7
Try creating a new project and add that common controls component to it.
If it works save the project then exit out and open the .vbp with notepad
Locate the line [should be near the top] that has the reference to the common controls dll
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1} #2.0#0; MSCOMCTL.OCX
Pay attention to the part in red and then open the troublesome project files .vbp in notepad and compare.
You may see that the last digit there is different. If so change the troublesome project to match the working one, save and try to open it in VB.
-
Feb 25th, 2017, 07:47 AM
#3
Re: Issue with Running VB6 in Windows 7
This happens to me on many occasions. If I continue opening the project, I look on the forms that have the control stated in the log file. It is, in my case, because that control (or sometimes, controls) have been replaced somehow with pictureboxes. For a while, I was going into each form and 'fix' it, by putting the appropriate control back where they needed to be, deleting the pictureboxes.
But, over time, I found (and in every case, BTW), that when I get that error, I STOP loading the project, and close it (without saving it, of course)...then I open the project up again, and everything is fine.
It happens to me (on different projects), about once every two weeks. Not knowing how to 'fix it' so it will never occur again, I found that simply reopening it works fine.
-
Feb 25th, 2017, 11:35 PM
#4
Re: Issue with Running VB6 in Windows 7
I have only ran into the issue a couple of times myself and in each case it was from downloading code that someone did on 7 and I loaded under XP.
Upon inspection I found that the line I showed above in the file was different. Changing it to the one that worked on that machine fixed it no problem.
-
Feb 26th, 2017, 12:53 PM
#5
Re: Issue with Running VB6 in Windows 7
Ahhh, I don't remember all the details, but I also used to have similar problems. They've disappeared since I've kept my development machine fairly consistent over the last couple of years, but I used to copy my source code around to two or three different machines for development because of various circumstances.
I also had problems with that MSCOMCTL.OCX. Here's a Microsoft Link that talks about the problem, but not even that link fully resolves things.
I never totally understood this, but control information is sometimes simultaneously placed in the .FRM files in addition to the .VBP file. It must be in the .VBP file if your project is to load properly. However, I've never found a good reason for it to also be in the .FRM files. In fact, a solution to the problem (for me) was to open the .FRM files in notepad and delete the MSCOMCTL.OCX information (which looked something like the line posted by DataMiser in post #2). (I also deleted all similar lines with never any ill effects.) Also, there were occasional issues regarding whether #2.0 versus #2.1 were on the machine. Again, I forget the issues, but this did cause complications. And it may have been back when I was still having to deal with Win-XP machines.
Good Luck,
Elroy
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Feb 27th, 2017, 04:31 AM
#6
Re: Issue with Running VB6 in Windows 7
There were a series of security patches that may replace MSCOMCTL.OCX with one that broke binary compatibility. The new interfaces are version 2.1 instead of the universal version 2.0.
Some of these patches were related to IE while others were related to Office 2007 and later.
Some systems that got the IE patches were a bit better off, because VB6 could Update ActiveX Controls (if you had not turned the option off) and automatically "promote" existing Projects to the new interfaces. Old compiled code still ran because the OCX still implemented both interfaces.
Other systems got the Office patches, and these were horribly flawed. The problem was the broken installer that broke interface version 2.0's registration and brute-forced in the version 2.1 registration. To compile an existing VB6 Project you had to manually update the interface to 2.1, either by editing the .VBP file or by removing the broken reference and setting a new reference to the altered OCX for which the only valid interface version would be picked up. But as far as I can recall the OCX still implemented version 2.0 interfaces, so a previously compiled EXE would still run.
The IE patch seems to have gone away for whatever reason, so Windows 8.x and later never get it. So unless you have installed Office 2007 or later there only the 2.0 interfaces are implemented in MSCOMCTL.OCX and registered.
That means if an old project ever got "upgraded" to the 2.1 interfaces only manually fixing the Project will allow the Project to open and compile properly.
If you adopt the 2.1 interfaces you still can face a problem. If you compile a program and install it on a machine that already has MSCOMCTL.OCX installed the odds are high that the one already installed does not implement the 2.1 interfaces, so kaboom.
So your best bet is to (a.) move to Windows 10 as your development machine, and (b.) never install Office 2007 or later. Then your compiled programs will run anywhere from Windows 95 through Windows 10, even if some fool has installed Office 2007 or later. That's because they will have been compiled against the universal 2.0 interfaces.
-
Feb 27th, 2017, 04:36 AM
#7
Re: Issue with Running VB6 in Windows 7
BTW:
Code:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
The 2.0 there is the interface version, a qualifier of the TypeID GUID. The 0 after that is an LCID value, and is also a qualifier. But unless you are compiling against a localized OCX it would almost always be 0.
-
Feb 27th, 2017, 09:53 AM
#8
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by DataMiser
Try creating a new project and add that common controls component to it.
If it works save the project then exit out and open the .vbp with notepad
Locate the line [should be near the top] that has the reference to the common controls dll
Pay attention to the part in red and then open the troublesome project files .vbp in notepad and compare.
You may see that the last digit there is different. If so change the troublesome project to match the working one, save and try to open it in VB.
I tried as suggested. When I created the new project, I then attempted to add the component Microsoft Windows Common Controls 2.6.0 (SP6) and received the same error message "Object Library Not Registered", which is odd since I did register it. I even received the message DllRegisterServer in mscomct2.ocx succeeded, when I did it originally.
If I go to the example program I originally posted about, this is what I have in the .vbp:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
-
Feb 27th, 2017, 12:43 PM
#9
Re: Issue with Running VB6 in Windows 7
Note MSComCTL.Ocx is not the same as MSComCt2.Ocx
Are you sure you even registered the right file?
The Progress bar and status bar are in MSComCTL.Ocx
-
Feb 27th, 2017, 02:11 PM
#10
Re: Issue with Running VB6 in Windows 7
Despite what MS says, the IE10 rollout in Win 7 via automatic updates caused all Apps that used MsComCtl.Ocx and many other 3rd party control suites to fail. This is well documented in VbForums as well as the solution. To my knowledge MS never fixed this and is not an issue with Windows 8/10.
The final (correct) fix (in lieu of uninstalling IE10) was:
Run elevated (Admin) command prompt:
x64
---
cd C:\Windows\SysWOW64\
regtlib msdatsrc.tlb
x86
---
cd C:\Windows\System32\
regtlib msdatsrc.tlb
-
Feb 27th, 2017, 02:24 PM
#11
Re: Issue with Running VB6 in Windows 7
Afternoon, DR....you said
To my knowledge MS never fixed this and is not an issue with Windows 8/10.
And, I don't doubt your statement as it relates to the conversations above...however, I, on occasion (after having 'fixed' nothing), experience OP's issue. And, like I said above, instead of really trying to learn why (which I guess I should), because all I have to do is restart the project, and everything loads fine. And, I am using 8.1 on one machine, and 10 on the other...both still experience this once in a while.
Sam
-
Feb 27th, 2017, 02:57 PM
#12
Re: Issue with Running VB6 in Windows 7
all I have to do is restart the project, and everything loads fine. And, I am using 8.1 on one machine, and 10 on the other...both still experience this once in a while.
The issue you are referencing is unrelated to the one presented by BillSher.
The issue of Ocx being replaced with a PictureBox has been around for years and is not related to which version of Windows you are using. If the project cannot find the registered Ocx it gets replaced by a PictureBox. When this happens, do not save the project. Just bail out and try again. This happens often when you are developing your own Ocx and you do not have Binary Compaibility enabled. Also make sure that you have "Upgrade ActiveX Controls" checked.
Last edited by DrUnicode; Feb 27th, 2017 at 03:14 PM.
Reason: Typo
-
Feb 27th, 2017, 04:41 PM
#13
Re: Issue with Running VB6 in Windows 7
Thanks for clarifying. Sorry OP.
PS---On my projects in which this occasionally (still) occurs, I am not creating my own OCX's, and I do have that option checked.
-
Mar 3rd, 2017, 05:48 AM
#14
Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by SamOscarBrown
Thanks for clarifying. Sorry OP.
PS---On my projects in which this occasionally (still) occurs, I am not creating my own OCX's, and I do have that option checked.
I had the same problem a few times, this fix worked for me.
After hours of effort, system restore, register, unregister cycles and a night's sleep I have managed to pinpoint the problem. It turns out that the project file contains the below line:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
The version information "2.0" it seems was the reason of not loading. Changing it to "2.1" in notepad solved the problem:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX
http://stackoverflow.com/questions/1...ate-kb-2687323
-
Mar 3rd, 2017, 07:30 AM
#15
Re: Issue with Running VB6 in Windows 7
mscir (and others)...after reading ALL of the link on post #14, there seems to be other culprits out there, like
The problem has been resolved by running the following in elevated command prompt:
command :
cd C:\Windows\System32\
regtlib msdatsrc.tlbor
cd C:\Windows\SysWOW64\
regtlib msdatsrc.tlb
Interesting...
-
Mar 3rd, 2017, 06:22 PM
#16
Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by SamOscarBrown
mscir (and others)...after reading ALL of the link on post #14, there seems to be other culprits out there, like
Interesting...
Yes that looks pretty serious as well, I was just talking about what worked in my case but the page is definitely worth reading. Let us know what happens if you apply any of these?
-
Apr 20th, 2017, 10:38 AM
#17
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
Before I post what I've tried so far, I want to give a brief walk-through of what I'm experiencing. So, I go to our network, where we store our VB6 applications. I open one of them, one that has a scrollbar and upon loading I get this error:
Object Library Not Registered
I then click OK and I am then asked "Continue Loading Project" to which I respond YES. I then receive the following message:
Log created: Errors During Load. Refer to Form1.log for details.
I check the log and I see this message.
Line 42: Class MSComctlLib.ProgressBar of control ProgressBar1 was not a loaded control class.
So, now let me explain what I've tried so far. Aside for reaching out to an MS Technician, who then directed me here, I went out to this link as per Elroy:
https://support.microsoft.com/en-us/...-error-message
...and I downloaded and reinstalled the Visual Basic 6.0 Common Controls Package. After rebooting I tried to go back into the same project and it still gave me the same errors.
I've also tried these steps as it came within a readme.txt when I downloaded VB6 to my new Windows 7 laptop:
Manually register this component when VB6 controls are missing
1. Copy component under folders:
C:\Windows\sysWow64 >64
C:\Windows\system32 >32
2. Open DOS cmd prompt with Administrator rights
3. Point to "C:\Windows\sysWow64"
4. Execute command:
regsvr32 mscomct2.ocx
...However, this did nothing to change the error message. I'm running out of ideas. Is there something else I'm forgetting?
-
Apr 20th, 2017, 06:13 PM
#18
Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by BillSher
Before I post what I've tried so far, I want to give a brief walk-through of what I'm experiencing. So, I go to our network, where we store our VB6 applications. I open one of them, one that has a scrollbar and upon loading I get this error:
Object Library Not Registered
I then click OK and I am then asked "Continue Loading Project" to which I respond YES. I then receive the following message:
Log created: Errors During Load. Refer to Form1.log for details.
I check the log and I see this message.
Line 42: Class MSComctlLib.ProgressBar of control ProgressBar1 was not a loaded control class.
So, now let me explain what I've tried so far. Aside for reaching out to an MS Technician, who then directed me here, I went out to this link as per Elroy:
https://support.microsoft.com/en-us/...-error-message
...and I downloaded and reinstalled the Visual Basic 6.0 Common Controls Package. After rebooting I tried to go back into the same project and it still gave me the same errors.
I've also tried these steps as it came within a readme.txt when I downloaded VB6 to my new Windows 7 laptop:
Manually register this component when VB6 controls are missing
1. Copy component under folders:
C:\Windows\sysWow64 >64
C:\Windows\system32 >32
2. Open DOS cmd prompt with Administrator rights
3. Point to "C:\Windows\sysWow64"
4. Execute command:
regsvr32 mscomct2.ocx
...However, this did nothing to change the error message. I'm running out of ideas. Is there something else I'm forgetting?
If you open the project and add a scrollbar where there is (I think) a picturebox or other placeholder where the scrollbar was positioned in the original project, can you add it, save it, and reload it? Or do you get an error then too? If so what error?
-
Apr 20th, 2017, 06:44 PM
#19
Re: Issue with Running VB6 in Windows 7
again....although I was told in a post earlier, that what I also experience (like OP) is not the same issue...I TEND to disagree. Like I said also earlier, this STILL happens on occasion....(happened yesterday). I simply say NO to continue loading. Then close the project and reopen it...works fine...every time. I just ignore it, even though it is a pain sometimes, the frequency is not enough for me to complain. And, yes, that old picturebox appears wherever the culprit control would be (happens with MSFLEXGRIDS on occasion, and possibly others...I just forget which ones).
Sam
-
Apr 20th, 2017, 06:55 PM
#20
Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by SamOscarBrown
again....although I was told in a post earlier, that what I also experience (like OP) is not the same issue...I TEND to disagree. Like I said also earlier, this STILL happens on occasion....(happened yesterday). I simply say NO to continue loading. Then close the project and reopen it...works fine...every time. I just ignore it, even though it is a pain sometimes, the frequency is not enough for me to complain. And, yes, that old picturebox appears wherever the culprit control would be (happens with MSFLEXGRIDS on occasion, and possibly others...I just forget which ones).
Sam
Is VB6 installed locally, and are the program files on the same computer?
Is IE10 installed on the local workstation?
https://answers.microsoft.com/en-us/...ff9b36b?page=4
-
Apr 20th, 2017, 06:59 PM
#21
Re: Issue with Running VB6 in Windows 7
Bill,
Did you definitely do what DrUnicode suggested in post #10?
I know it seems unrelated, but it's absolutely not. I've also wrestled often with the mscomctl.ocx and mscomct2.ocx through the years. Yes, re-registering them with regsvr32.exe will sometimes help, but that msdatsrc.tlb is also apparently a dependency, and must be correctly registered as well.
However, and I don't know if it helps to hear this or not, but I basically always get it worked out (typically through the things already mentioned above).
Good Luck,
Elroy
EDIT1: Also, just as an FYI, registering an OCX so it can be used by an executable, and registering it so it can be used in development (by the IDE) are often two different things. To get the second done, the VB6 IDE installation has to go fairly smoothly (elevated and as administrator).
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 20th, 2017, 07:03 PM
#22
Re: Issue with Running VB6 in Windows 7
locally, by me....(THAT may be the problem..."me"!!! ~smile~)
Yes, everything within an app's path. (Usually under a directory (I cheekishly call "VisualBasicProjects") where I keep and run ALL my VB6 programs) (Sub directories under that, of course!!!) I don't export/deploy/ship any of mine, their for MY use only. (Hobbyist).
-
Apr 20th, 2017, 07:03 PM
#23
Re: Issue with Running VB6 in Windows 7
IE 10 installed, but not used hardly at all...Edge is current BOC.
-
Apr 20th, 2017, 07:06 PM
#24
Member
Re: Issue with Running VB6 in Windows 7
IF you aren't using IE10 is it worth a try uninstalling it?
-
Apr 20th, 2017, 09:32 PM
#25
Re: Issue with Running VB6 in Windows 7
I avoid the MS extra dependencies like the plague.
-
Apr 20th, 2017, 09:51 PM
#26
Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by Bobbles
I avoid the MS extra dependencies like the plague.
Plague is an appropriate descriptor. IDK if you're old enough to remember 'DLL Hell'.
https://en.wikipedia.org/wiki/DLL_Hell
-
Apr 21st, 2017, 07:47 AM
#27
Re: Issue with Running VB6 in Windows 7
Originally Posted by mscir
IF you aren't using IE10 is it worth a try uninstalling it?
Interesting. (Windows 10 machine). I can run Microsoft Edge and Internet Explorer 10 (from Cortena search). But, NEITHER show up in the Control Panel's Installed Programs. Right clicking on IE10 and selecting Uninstall, brings me to the Control Panel, but like I said, it is not listed at all....Really odd.
-
Apr 21st, 2017, 08:26 AM
#28
Re: Issue with Running VB6 in Windows 7
Interesting. I have been using VB6 on my Windows 7 box for about a year or so now. I've only had one project fail to load and that was because I had not installed the SS Calendar Widgets on the system.
All projects that use MS Controls load fine, including the ones with progress bar , listview, treeview and so on.
I did get the error message on my XP box at least once and it was that interface entry in the VBP file. The project that caused the issue was downloaded from this forum and had the 2.1 interface. I changed it to 2.0 and no problems at all.
I also have VB6 installed on my Windows 10 machine. I have not used it much there but have not ran into any issues as of yet.
I do not use IE on either box so I have no idea what version is installed and I do not have any of the later versions of Office installed though I am thinking of doing so since Outlook 2002 has a couple of issues under Windows 7
I have no idea what could make a project fail once then work the next time other than a possible hardware or virtualization issue.
Edit: I just checked and this Windows 7 box has IE 11 installed.
-
Apr 21st, 2017, 09:07 AM
#29
Re: Issue with Running VB6 in Windows 7
It's probably (in MY case) my VB6 Installation...after a big "Game Night" next Wednesday (using my Jeopardy! program), I'll uninstall and re-installed it ONE MORE TIME to see if that anomaly goes away. (But am still curious on the other subject, why IE and Edge are not showing up in installed programs.) But, that doesn't really belong in this forum, so I will drop the subject.
-
Apr 21st, 2017, 09:23 AM
#30
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by SamOscarBrown
again....although I was told in a post earlier, that what I also experience (like OP) is not the same issue...I TEND to disagree. Like I said also earlier, this STILL happens on occasion....(happened yesterday). I simply say NO to continue loading. Then close the project and reopen it...works fine...every time. I just ignore it, even though it is a pain sometimes, the frequency is not enough for me to complain. And, yes, that old picturebox appears wherever the culprit control would be (happens with MSFLEXGRIDS on occasion, and possibly others...I just forget which ones).
Sam
In my case, I clicked no to continue loading the project. Then closed out and reopened and still received the same error "Object library not registered". Following that, it still asks if I want to continue loading the project.
-
Apr 21st, 2017, 09:24 AM
#31
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
-
Apr 21st, 2017, 09:26 AM
#32
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by Elroy
Bill,
Did you definitely do what DrUnicode suggested in post #10?
I know it seems unrelated, but it's absolutely not. I've also wrestled often with the mscomctl.ocx and mscomct2.ocx through the years. Yes, re-registering them with regsvr32.exe will sometimes help, but that msdatsrc.tlb is also apparently a dependency, and must be correctly registered as well.
However, and I don't know if it helps to hear this or not, but I basically always get it worked out (typically through the things already mentioned above).
Good Luck,
Elroy
EDIT1: Also, just as an FYI, registering an OCX so it can be used by an executable, and registering it so it can be used in development (by the IDE) are often two different things. To get the second done, the VB6 IDE installation has to go fairly smoothly (elevated and as administrator).
Thanks Elroy.
Yes, I'm unable to run regtlib on my PC (Windows 7).
'regtlib' is not recognized as an internal or external command,
operable program or batch file.
-
Apr 21st, 2017, 09:58 AM
#33
Re: Issue with Running VB6 in Windows 7
Hmmm, at the moment, I'm in Windows 7 Home Premium (64-bit), Service Pack 1.
My regtlib.exe is found in my C:\Windows folder. It's probably not totally advisable to do things this way, but hey ho: Here's a link to the one found my computer. Although, you'd probably do better to get one that's correct for your computer, but I'm not sure where you'd do that.
All The Best,
Elroy
p.s.: You'd also better get it quick if you want it, as I suspect the moderators will delete my link as soon as they see it. Hey Shaggy, please don't be too mad at me.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 21st, 2017, 10:05 AM
#34
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by Elroy
Hmmm, at the moment, I'm in Windows 7 Home Premium (64-bit), Service Pack 1.
My regtlib.exe is found in my C:\Windows folder. It's probably not totally advisable to do things this way, but hey ho: Here's a link to the one found my computer. Although, you'd probably do better to get one that's correct for your computer, but I'm not sure where you'd do that.
All The Best,
Elroy
p.s.: You'd also better get it quick if you want it, as I suspect the moderators will delete my link as soon as they see it. Hey Shaggy, please don't be too mad at me.
I'll give it a shot. Thank you Elroy!
-
Apr 21st, 2017, 10:24 AM
#35
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by Elroy
Hmmm, at the moment, I'm in Windows 7 Home Premium (64-bit), Service Pack 1.
My regtlib.exe is found in my C:\Windows folder. It's probably not totally advisable to do things this way, but hey ho: Here's a link to the one found my computer. Although, you'd probably do better to get one that's correct for your computer, but I'm not sure where you'd do that.
All The Best,
Elroy
p.s.: You'd also better get it quick if you want it, as I suspect the moderators will delete my link as soon as they see it. Hey Shaggy, please don't be too mad at me.
I put this in my C:\Windows\ directory, but unfortunately, it's still not recognized.
C:\Windows\SysWOW64>regtlib.exe msdatsrc.tlb
'regtlib.exe' is not recognized as an internal or external command,
operable program or batch file.
-
Apr 21st, 2017, 01:38 PM
#36
Re: Issue with Running VB6 in Windows 7
Are you saying you put it in the Windows folder then tried to run it from syswow64? If so then yes that will fail
you would need to run it from the folder where it is at and pass the path to the file you want to register
C:\Windows>regtlib.exe \Windows\SysWOW64\msdatsrc.tlb
or alternately
C:\Windows\Syswow64>\Windows\regtlib.exe msdatsrc.tlb
-
Apr 21st, 2017, 01:42 PM
#37
Re: Issue with Running VB6 in Windows 7
Overall it seems a bit strange. I did not do anything special to get VB6 to work under Windows 7 I simply installed it from the disk as admin then installed the sp6 again as admin and set my vb shortcut to run as admin. Everything works fine.
Running Windows 7 x64 Professional
All of the projects I have loaded work except those that use the SSCAL control which I have not yet installed on this PC. Of those projects some were developed under Windows 95,98, Me, NT4, 2000 and XP and some of the older ones were done in VB5 still no issues aside from 3rd party controls that I failed to install.
-
Apr 21st, 2017, 02:28 PM
#38
Re: Issue with Running VB6 in Windows 7
Ohhh, I've quite recently had problems with getting the VB6 IDE to correctly install in a Win7-64 machine. In fact, I was in Montreal during that big storm that blew through there, and I needed to debug on one of their machines. It turned out that the msdatsrc.tlb file was precisely the problem.
And regarding regtlib.exe not being recognized, I'd certainly think that "C:\Windows" would be on the execution path. However, Bill, possibly try just putting it in the C:\ root, and then execute something like the following:
...> c:\regtlib.exe c:\Windows\SysWOW64\msdatsrc.tlb
Also, be sure that msdatsrc.tlb is in your c:\Windows\SysWOW64 folder.
This is all very strange though.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 21st, 2017, 03:43 PM
#39
Thread Starter
New Member
Re: Issue with Running VB6 in Windows 7
Originally Posted by Elroy
Ohhh, I've quite recently had problems with getting the VB6 IDE to correctly install in a Win7-64 machine. In fact, I was in Montreal during that big storm that blew through there, and I needed to debug on one of their machines. It turned out that the msdatsrc.tlb file was precisely the problem.
And regarding regtlib.exe not being recognized, I'd certainly think that "C:\Windows" would be on the execution path. However, Bill, possibly try just putting it in the C:\ root, and then execute something like the following:
...> c:\regtlib.exe c:\Windows\SysWOW64\msdatsrc.tlb
Also, be sure that msdatsrc.tlb is in your c:\Windows\SysWOW64 folder.
This is all very strange though.
I was able to register it from the original c:\windows\ path you gave me. However, I get this message when I try to open the project on the network:
Line 42: Class MSComctlLib.ProgressBar of control ProgressBar1 was not a loaded control class.
However, at least this time I'm not getting the error message, "Object Library Not Registered." Maybe we're getting closer.
-
Apr 21st, 2017, 03:55 PM
#40
Re: Issue with Running VB6 in Windows 7
Ok, I'm not sure but it sounds like you don't have the mscomctl.ocx library as a component in your project's VBP file. If you open your VBP file with notepad, you should see a line that looks something like the following:
Code:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; mscomctl.ocx
If it's not there, you could try adding it. The actual line it's on in the VBP doesn't matter. But it's that mscomctl.ocx file that gives you the ProgressBar in your toolbox.
Try looking into that and see if it solves the problem.
EDIT1: Alternatively (or in addition), you may want to start a new project, add the "Microsoft Windows Common Controls 6,0 (SP6)" under components, and make sure it loads. Also, take one of the new toolbox controls and throw it on a form, and then execute the project, to see that everything works. If that works, then it's got to be something wrong with your VBP project. Possibly get a fresh copy of it (that worked on some other machine) and try again.
Last edited by Elroy; Apr 21st, 2017 at 03:58 PM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|