Discussion:
Visual Basic 5
(too old to reply)
John Mott
2014-04-25 08:21:57 UTC
Permalink
I have just upgraded from Win XP to Win7.
Can I instal and run VB5 under Win7 ?

John
ralph
2014-04-25 12:46:03 UTC
Permalink
Post by John Mott
I have just upgraded from Win XP to Win7.
Can I instal and run VB5 under Win7 ?
Yes, but expect a few mild adventures. <g>

-ralph
ralph
2014-04-25 15:47:29 UTC
Permalink
On Fri, 25 Apr 2014 07:46:03 -0500, ralph <***@yahoo.com>
wrote:

On second thought I might have posted more details on the possible
"adventures" you might run into. However, exactly what problem/s you
might run into, and how serious they may be, can vary depending on the
version and media of VB5, the version and configuration of the target
- mainly whether 32-bit or 64-bit Windows 7, and your skill level in
recognizing and repairing the issues.

In any case, don't Panic! <g> If you run across something you can't
fix post back here with details. The fix/s are always trivial, but
occasionally a tad obscure. <g>

Also be aware there are multiple posts and articles out there where
the authors, either due to ignorance or by intention will emphatically
state "you cannot install the VB5 IDE" or "you cannot run VB5
applications" on Vista, Windows 7, or Windows 8. They are wrong. <g>

-ralph
John Mott
2014-04-26 02:43:49 UTC
Permalink
Thanks Ralph

I have 64 bit Win7.
I will give it a go when I get more organised.
I have a couple of old favourite programs which I compiled into exe
files before I updated, but when I try to run them in Win7 I get error
messages about missing component files - ocx or dll or something.

John
Post by ralph
On second thought I might have posted more details on the possible
"adventures" you might run into. However, exactly what problem/s you
might run into, and how serious they may be, can vary depending on the
version and media of VB5, the version and configuration of the target
- mainly whether 32-bit or 64-bit Windows 7, and your skill level in
recognizing and repairing the issues.
In any case, don't Panic! <g> If you run across something you can't
fix post back here with details. The fix/s are always trivial, but
occasionally a tad obscure. <g>
Also be aware there are multiple posts and articles out there where
the authors, either due to ignorance or by intention will emphatically
state "you cannot install the VB5 IDE" or "you cannot run VB5
applications" on Vista, Windows 7, or Windows 8. They are wrong. <g>
-ralph
GS
2014-04-26 15:59:06 UTC
Permalink
Post by John Mott
Thanks Ralph
I have 64 bit Win7.
I will give it a go when I get more organised.
I have a couple of old favourite programs which I compiled into exe
files before I updated, but when I try to run them in Win7 I get
error messages about missing component files - ocx or dll or
something.
Win7 does not include the runtime files and so you must ship those with
your app[s]. I use a manifest with my VB6 apps so OCXs/DLLs do not need
to be registered on the host machine. This is primarily due to my apps
being 100% portable so they can be run from a memstick or some other
removeable media. (Thus, my apps also do not use the Registry for
storage of app data/settings!)
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
ralph
2014-04-26 18:48:40 UTC
Permalink
Post by John Mott
Thanks Ralph
I have 64 bit Win7.
I will give it a go when I get more organised.
I have a couple of old favourite programs which I compiled into exe
files before I updated, but when I try to run them in Win7 I get error
messages about missing component files - ocx or dll or something.
You always* need to "install" a VB application as an Administrator.

You can use the P&D (Setup1) tool that comes with VB, or a number of
3rd party Installers, eg. Inno Setup is popular:
http://www.jrsoftware.org/iskb.php?vb

This does several things:
1) Insure the exe and dependent files are copied to the target and
placed in the correct folder.
2) Insures any dependent ActiveX components are properly registered in
the Registry.
3) Provides an "uninstall" so you can always back-out if things go
wrong.

As noted here:
http://www.techsupportalert.com/content/how-windows7-vista64-support-32bit-applications.htm
File locations and Hives can be less concrete/obvious when running
32-bit applications on a 64-bit platform. Thus knowing exactly where
items should be and how they should be registered can be confusing
without an installer - as the 64-bit platform can recognize the
installer and trusted to do the right thing.

GS was noting an alternative method of "installing" an application. In
this scenario all the components are placed in one location and
'registration activation' happens at runtime. Thus, much less
'scattering' about, avoids pre-registration issues, and generally
resolves permission issues as well.

Some articles that might shed a bit of light on this method:
http://stackoverflow.com/questions/13483753/simple-registration-free-com-with-vb6
http://www.devx.com/vb/Article/32888

As always there are trade-offs, pros and cons, associated with each.
IMHO I would at least experiment with using an "installer" package
builder at first (P&D as you already have it), so as to get a better
understanding of how and why applications need to be installed. The
builders are especially useful in gaining an understanding of exactly
what components an application is dependent on. (You will need the
information to build a manifest anyway - although here again there are
3rd party tools to help.)

This might be too much information atm, but don't worry about it. When
you are ready, just create a P&D package and run the installer. Return
- with details - if you have any problems.

-ralph
John Mott
2014-05-02 09:02:14 UTC
Permalink
I found that VB5 apparently installed on Win 7 successfully, but will
not run properly.

Of two programs that I had previously compiled into exe files and that
would not run, a simple one will now run OK, But a more complex one
crashes with an error message "comctl32.ocx could not load - error
accessing the system registry".

VB5 will apparently successfully access the source code of the simple
program and looks as though it would modify the code etc.

When I try to load the source of of the more complex program, it comes
up with the error message "comctl32.ocx could not be loaded.

Any suggestions gratefully appreciated.

John
Deanna Earley
2014-05-02 09:29:23 UTC
Permalink
Post by John Mott
I found that VB5 apparently installed on Win 7 successfully, but will
not run properly.
Of two programs that I had previously compiled into exe files and that
would not run, a simple one will now run OK, But a more complex one
crashes with an error message "comctl32.ocx could not load - error
accessing the system registry".
VB5 will apparently successfully access the source code of the simple
program and looks as though it would modify the code etc.
When I try to load the source of of the more complex program, it comes
up with the error message "comctl32.ocx could not be loaded.
Any suggestions gratefully appreciated.
Try to do it with "run as admin" once.
This should register them correctly.
--
Deanna Earley (***@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be printed, shredded then fed
to the rats. Please reply to the group.)
John Mott
2014-05-04 07:44:07 UTC
Permalink
Thanks Dianna

I tried "run as admin" once on both VB.exe and the Project.exe but
this did not make any apparent solution to the problem

John
On Fri, 02 May 2014 10:29:23 +0100, Deanna Earley
Post by Deanna Earley
Post by John Mott
I found that VB5 apparently installed on Win 7 successfully, but will
not run properly.
Of two programs that I had previously compiled into exe files and that
would not run, a simple one will now run OK, But a more complex one
crashes with an error message "comctl32.ocx could not load - error
accessing the system registry".
VB5 will apparently successfully access the source code of the simple
program and looks as though it would modify the code etc.
When I try to load the source of of the more complex program, it comes
up with the error message "comctl32.ocx could not be loaded.
Any suggestions gratefully appreciated.
Try to do it with "run as admin" once.
This should register them correctly.
GS
2014-05-02 18:21:36 UTC
Permalink
Post by John Mott
I found that VB5 apparently installed on Win 7 successfully, but will
not run properly.
Of two programs that I had previously compiled into exe files and
that would not run, a simple one will now run OK, But a more complex
one crashes with an error message "comctl32.ocx could not load -
error accessing the system registry".
VB5 will apparently successfully access the source code of the simple
program and looks as though it would modify the code etc.
When I try to load the source of of the more complex program, it
comes up with the error message "comctl32.ocx could not be loaded.
Any suggestions gratefully appreciated.
John
As I already stated, I ship the libs with my apps and include a
manifest so those libs don't require registration. Since XP, Windows
loads all libs specified in your manifest. I use MakeMyManifest to
generate the file for my VBPs.

"It just works!"
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
RW
2014-05-02 19:27:36 UTC
Permalink
Post by John Mott
I found that VB5 apparently installed on Win 7 successfully, but will
not run properly.
Any suggestions gratefully appreciated.
John
Is version 10 (or higher) of Internet Explorer installed? There were
issues with IE10 "breaking" certain OCXs. You probably can find the
details -- and fixes -- with a few quick web searches. When I got bit
I just rolled back the Windows update that installed IE10 and then hid
that update so as not to accidentally apply it again. Since I don't
use IE anyway sticking on version 9 was no big deal for me.

Also, there's this advice from microsoft.public.vb.general.discussion:

"Open an elevated cmd prompt and change to the \Windows\System32
folder (for 32-bit) or the \Windows\SysWOW64 folder (for 64-bit).

Once in the correct folder, enter the following command:

regtlib msdatsrc.tlb

You should get a "Registration of msdatsrc.tlb successful." message.
After that, MSCOMCTL.OCX and MSCOMCT2.OCX work normally."
John Mott
2014-05-04 07:48:01 UTC
Permalink
I tried this solution, but got an error message saying

"regtlib is not recognised as an internal or external command,
operation, program or batch file"

John
Post by RW
Post by John Mott
I found that VB5 apparently installed on Win 7 successfully, but will
not run properly.
Any suggestions gratefully appreciated.
John
Is version 10 (or higher) of Internet Explorer installed? There were
issues with IE10 "breaking" certain OCXs. You probably can find the
details -- and fixes -- with a few quick web searches. When I got bit
I just rolled back the Windows update that installed IE10 and then hid
that update so as not to accidentally apply it again. Since I don't
use IE anyway sticking on version 9 was no big deal for me.
"Open an elevated cmd prompt and change to the \Windows\System32
folder (for 32-bit) or the \Windows\SysWOW64 folder (for 64-bit).
regtlib msdatsrc.tlb
You should get a "Registration of msdatsrc.tlb successful." message.
After that, MSCOMCTL.OCX and MSCOMCT2.OCX work normally."
ralph
2014-05-04 09:03:37 UTC
Permalink
Post by John Mott
I tried this solution, but got an error message saying
"regtlib is not recognised as an internal or external command,
operation, program or batch file"
Type libraries require a separate utility, and there are more than
one. As only developers have need for type libraries these utilities
only shipped with development platforms that could create or use type
libraries. Mere Users shouldn't need to concern themselves about such
things. <lol>(Or so the story goes.)

So what utility is available on your platform and what may or not be
installed may vary. I believe it is the current intention is to
provide a utility on all platforms by default, but I've discover odd
variances at times, especially with vendor O/S's.

So try one of these two:

1) regtlibv12.exe: Comes with any .Net Framework install.
For example:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe
Note, the version number may vary and you usually have more than one
folder.

2) RegisterTLB.exe: Usually found on 64-bit platforms in the
C:\Windows\SysWOW64 folder or sub folders.

They all have similar command line parameters.
AFAIK they all work the same.
John Mott
2014-05-08 09:30:50 UTC
Permalink
Thank you Ralp

I tried to execute your suggestion

1. I do not have RegisterTLB.exe

2. I found regtlibv12.exe in both
c:\WINDOWS\Microsoft.Net\Framework\v4.0.30319 and
c:\WINDOWS\Microsoft.Net\Framework64\v4.0.30319

However I did not have success after running it.
I opened an elevated cmd prompt and changed to the \Windows\sysWOW64
folder and tried " reglibv12 comctl32.ocx" and it said it could not
find reglibv12. So Ichanged to
\WINDOWS\Microsoft.NET\Framework\v4.0.30319 and tried
" reglibv12 comctl32.ocx" and it said successful.
Unfortunately I still get comct32l.ocx not found errors when I try to
load source code or run the compiled exe file.

I am not very experienced or knowledgable in system matters.
Any forther suggestions or can you tell me where I am going wrong ?
John
Post by ralph
Post by John Mott
I tried this solution, but got an error message saying
"regtlib is not recognised as an internal or external command,
operation, program or batch file"
Type libraries require a separate utility, and there are more than
one. As only developers have need for type libraries these utilities
only shipped with development platforms that could create or use type
libraries. Mere Users shouldn't need to concern themselves about such
things. <lol>(Or so the story goes.)
So what utility is available on your platform and what may or not be
installed may vary. I believe it is the current intention is to
provide a utility on all platforms by default, but I've discover odd
variances at times, especially with vendor O/S's.
1) regtlibv12.exe: Comes with any .Net Framework install.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe
Note, the version number may vary and you usually have more than one
folder.
2) RegisterTLB.exe: Usually found on 64-bit platforms in the
C:\Windows\SysWOW64 folder or sub folders.
They all have similar command line parameters.
AFAIK they all work the same.
John Mott
2014-05-08 09:58:10 UTC
Permalink
Further to my last post, I tried a further solution

In c:\windows\microsoft.net\framework\v4.o.30319 I ran

regtlibv12 msdatsrc.tlb

and got a successful message but it did not solve the problem.

John
Post by John Mott
Thank you Ralp
I tried to execute your suggestion
1. I do not have RegisterTLB.exe
2. I found regtlibv12.exe in both
c:\WINDOWS\Microsoft.Net\Framework\v4.0.30319 and
c:\WINDOWS\Microsoft.Net\Framework64\v4.0.30319
However I did not have success after running it.
I opened an elevated cmd prompt and changed to the \Windows\sysWOW64
folder and tried " reglibv12 comctl32.ocx" and it said it could not
find reglibv12. So Ichanged to
\WINDOWS\Microsoft.NET\Framework\v4.0.30319 and tried
" reglibv12 comctl32.ocx" and it said successful.
Unfortunately I still get comct32l.ocx not found errors when I try to
load source code or run the compiled exe file.
I am not very experienced or knowledgable in system matters.
Any forther suggestions or can you tell me where I am going wrong ?
John
Post by ralph
Post by John Mott
I tried this solution, but got an error message saying
"regtlib is not recognised as an internal or external command,
operation, program or batch file"
Type libraries require a separate utility, and there are more than
one. As only developers have need for type libraries these utilities
only shipped with development platforms that could create or use type
libraries. Mere Users shouldn't need to concern themselves about such
things. <lol>(Or so the story goes.)
So what utility is available on your platform and what may or not be
installed may vary. I believe it is the current intention is to
provide a utility on all platforms by default, but I've discover odd
variances at times, especially with vendor O/S's.
1) regtlibv12.exe: Comes with any .Net Framework install.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe
Note, the version number may vary and you usually have more than one
folder.
2) RegisterTLB.exe: Usually found on 64-bit platforms in the
C:\Windows\SysWOW64 folder or sub folders.
They all have similar command line parameters.
AFAIK they all work the same.
ralph
2014-05-08 13:52:59 UTC
Permalink
Post by John Mott
Thank you Ralp
I tried to execute your suggestion
1. I do not have RegisterTLB.exe
2. I found regtlibv12.exe in both
c:\WINDOWS\Microsoft.Net\Framework\v4.0.30319 and
c:\WINDOWS\Microsoft.Net\Framework64\v4.0.30319
However I did not have success after running it.
I opened an elevated cmd prompt and changed to the \Windows\sysWOW64
folder and tried " reglibv12 comctl32.ocx" and it said it could not
find reglibv12. So Ichanged to
\WINDOWS\Microsoft.NET\Framework\v4.0.30319 and tried
" reglibv12 comctl32.ocx" and it said successful.
Unfortunately I still get comct32l.ocx not found errors when I try to
load source code or run the compiled exe file.
I am not very experienced or knowledgable in system matters.
Any forther suggestions or can you tell me where I am going wrong ?
John
First off. My suggestion was narrowly focused on where to find a "Type
Library Registration Tool" in order to follow-through with RW's
suggestion to register the "msdatsrc.tlb" Type Library.

[Frankly, I was not exactly sure why that would help outside the VBIDE
- but I don't use VB5. <g>]

To register COM components/controls (.dll, .ocx, ...) you will use
regsvr32. The issue will be determining if the component is 32-bit or
64-bit and thus which regsvr32 to use since Microsoft decided to give
the same name to both. The following discussion pretty much hashes out
all the nusances involved.

http://stackoverflow.com/questions/4897685/how-do-i-register-a-dll-on-windows-7-64-bit

It is good to check that everything is located on the target, properly
registered, and to know how to fix registration issues should they
come about, but not totally sure that is your real issue. Since all
the components are there, the mismatch is coming from the fact your
projects are compiled against one version and something else is what
is available.

Assumptions:
1) You have VB5 SP3 installed on your new platform (Win7 64-bit)
2) You do not get errors when you open VB5
3) But you do get errors when you attempt to open some projects
That correct?

Try this:
Close the VBIDE.
Open the .vbp file of a troubled project in a text editor and delete
the lines that reference comctl32.ocx and comdlg32.ocx. (Or any .oca
reference that may have slipped in.)
Save the file.
Then open the project in VB, open project references, and add the
common control components back. (Again, make sure you do not
accidently select an '.oca'.)
Save the changes to the vbp file and close.
Re-open the project and test.

Let us know the exact error/s you get, if any.

-ralph
ralph
2014-05-08 14:47:09 UTC
Permalink
On Thu, 08 May 2014 08:52:59 -0500, ralph <***@yahoo.com>
wrote:

To amplify on my
Post by ralph
Close the VBIDE.
Open the .vbp file of a troubled project in a text editor and delete
the lines that reference comctl32.ocx and comdlg32.ocx. (Or any .oca
reference that may have slipped in.)
Save the file.
Then open the project in VB, open project references, and add the
common control components back. (Again, make sure you do not
accidently select an '.oca'.)
You will likely have several "common components" to chose from. Pick
the one most likely to be "VB5" compatible. Experiment with the
others.

[If this doesn't work be sure to reply with what common component
versions are availble. If it does work, let us know which one you
used. <g>]
Post by ralph
Save the changes to the vbp file and close.
Re-open the project and test.
What this will do is change the references in your projects from
whatever interface (and implementing they were once expecting to
whatever is currently available. Hopefully this will get all the
participants on the same page.

However, this is entirely different from the, albeit related, problem
of getting a legacy VB5 compiled program to run on newer platforms.
ralph
2014-05-08 16:38:09 UTC
Permalink
On Thu, 08 May 2014 09:47:09 -0500, ralph <***@yahoo.com>
wrote:

Oops! Set before I meant...


To amplify on my
Post by ralph
Close the VBIDE.
Open the .vbp file of a troubled project in a text editor and delete
the lines that reference comctl32.ocx and comdlg32.ocx. (Or any .oca
reference that may have slipped in.)
Save the file.
Then open the project in VB, open project references, and add the
common control components back. (Again, make sure you do not
accidently select an '.oca'.)
You will likely have several "common components" to chose from. Pick
the one most likely to be "VB5" compatible. Experiment with the
others.

If this doesn't work be sure to reply with what common component
versions are availble. If it does work, let us know which one you
used. <g>
Post by ralph
Save the changes to the vbp file and close.
Re-open the project and test.
What this will do is change the references in your projects from
whatever interface (and implemention) they were once expecting to
whatever is currently available. Hopefully this will get all the
participants on the same page.

However, this is different from the problem of getting a legacy VB5
compiled program to run on newer platforms. This problem is usually
resolved by simply making sure the controls are installed and
registering them..
RW
2014-05-08 19:20:01 UTC
Permalink
Post by ralph
First off. My suggestion was narrowly focused on where to find a "Type
Library Registration Tool" in order to follow-through with RW's
suggestion to register the "msdatsrc.tlb" Type Library.
Just for clarity's sake that wasn't my suggestion per se. I was
quoting a solution Tim Rude had posted in the vb.general.discussion
group (credit [or blame!] where due). : - )

My only suggestion was in regards to which version of Internet
Explorer is installed on the OP's computer, but he didn't say if he
had checked and/or done any investigation in that area.

RW
John Mott
2014-05-09 07:32:19 UTC
Permalink
I have at last found what version of IE is in my machine. Being very
new to Win7 it took me a while to find out how to find the Version.
It is version 11.09600 17105

Since there is a suggestion that version 10 or higher has issues
"breaking" certain OCXs, I will endeavour to follow up this matter and
any cures.

John
Post by RW
Post by ralph
First off. My suggestion was narrowly focused on where to find a "Type
Library Registration Tool" in order to follow-through with RW's
suggestion to register the "msdatsrc.tlb" Type Library.
Just for clarity's sake that wasn't my suggestion per se. I was
quoting a solution Tim Rude had posted in the vb.general.discussion
group (credit [or blame!] where due). : - )
My only suggestion was in regards to which version of Internet
Explorer is installed on the OP's computer, but he didn't say if he
had checked and/or done any investigation in that area.
RW
John Mott
2014-05-11 08:03:38 UTC
Permalink
Post by ralph
Post by John Mott
Thank you Ralp
I tried to execute your suggestion
1. I do not have RegisterTLB.exe
2. I found regtlibv12.exe in both
c:\WINDOWS\Microsoft.Net\Framework\v4.0.30319 and
c:\WINDOWS\Microsoft.Net\Framework64\v4.0.30319
However I did not have success after running it.
I opened an elevated cmd prompt and changed to the \Windows\sysWOW64
folder and tried " reglibv12 comctl32.ocx" and it said it could not
find reglibv12. So Ichanged to
\WINDOWS\Microsoft.NET\Framework\v4.0.30319 and tried
" reglibv12 comctl32.ocx" and it said successful.
Unfortunately I still get comct32l.ocx not found errors when I try to
load source code or run the compiled exe file.
I am not very experienced or knowledgable in system matters.
Any forther suggestions or can you tell me where I am going wrong ?
John
First off. My suggestion was narrowly focused on where to find a "Type
Library Registration Tool" in order to follow-through with RW's
suggestion to register the "msdatsrc.tlb" Type Library.
[Frankly, I was not exactly sure why that would help outside the VBIDE
- but I don't use VB5. <g>]
To register COM components/controls (.dll, .ocx, ...) you will use
regsvr32. The issue will be determining if the component is 32-bit or
64-bit and thus which regsvr32 to use since Microsoft decided to give
the same name to both. The following discussion pretty much hashes out
all the nusances involved.
http://stackoverflow.com/questions/4897685/how-do-i-register-a-dll-on-windows-7-64-bit
It is good to check that everything is located on the target, properly
registered, and to know how to fix registration issues should they
come about, but not totally sure that is your real issue. Since all
the components are there, the mismatch is coming from the fact your
projects are compiled against one version and something else is what
is available.
1) You have VB5 SP3 installed on your new platform (Win7 64-bit)
2) You do not get errors when you open VB5
3) But you do get errors when you attempt to open some projects
That correct?
1) I have V5.0.37.24 installed on win7 64 bit

2) I do not get errors when opening VB5.

3) I do not get errrors opening a simple VB project but do get errors
trying to open a more complex project.
Post by ralph
Close the VBIDE.
Open the .vbp file of a troubled project in a text editor and delete
the lines that reference comctl32.ocx and comdlg32.ocx. (Or any .oca
reference that may have slipped in.)
Save the file.
Then open the project in VB, open project references, and add the
common control components back. (Again, make sure you do not
accidently select an '.oca'.)
Save the changes to the vbp file and close.
Re-open the project and test.
Let us know the exact error/s you get, if any.
-ralph
I used a text editor to delete lines refering to comctl32.ocx,
comdlg32.ocx and msflxgrd.ocx and the project then opened in VB but
showed error messages Error Loading refer to The numerous Frm.logs.
Log entries refer to invalid properties.
When I tied to run it I got I got compile error:
user defined type not defined
Dim pn11 as Panel.

I then attempted to add the common control properties back in.
They showed as being referenced in the text file.
Succeeded with the three above mentioned ocx's, but I cannot fathom
how to add the Panel property back in.

When I try to run the project I get error message saying
cant add Panels - method or data member not found.

The various Frm logs are showing messages
Cannot load control sbar (name of form) ; license not found
and
Line 122: Class MSComDlg.CommonDialog of control dlgCommonDialog was
not a loaded control class.
Line 125: The property name _ExtentX in dlgCommonDialog is invalid.
Line 126: The property name _ExtentY in dlgCommonDialog is invalid.
Line 127: The property name _Version in dlgCommonDialog is invalid.
etc

In the project available references I have:
Visual Basic For Applications
Visual Basic runtime objects and proceedures
OLE Automation
Microsoft Windows Common Copntrols 5.0
Microsoft FlexGrid Control 5.0
All ticked, and many others which do not seem to me to be applicable.

I may not have told you of all the error messages, but have
endeavoured to give a representation of the applicable ones.

I am wondering if we can somehow enable the Panel property whether
this will finally fix the loading and running problems.

I am becoming more confused fiddling with things that I do not fully
understand, hope this all makes sense.

John
ralph
2014-05-11 16:29:46 UTC
Permalink
Post by John Mott
1) I have V5.0.37.24 installed on win7 64 bit
2) I do not get errors when opening VB5.
3) I do not get errrors opening a simple VB project but do get errors
trying to open a more complex project.
Post by ralph
Close the VBIDE.
Open the .vbp file of a troubled project in a text editor and delete
the lines that reference comctl32.ocx and comdlg32.ocx. (Or any .oca
reference that may have slipped in.)
Save the file.
Then open the project in VB, open project references, and add the
common control components back. (Again, make sure you do not
accidently select an '.oca'.)
Save the changes to the vbp file and close.
Re-open the project and test.
Let us know the exact error/s you get, if any.
-ralph
I used a text editor to delete lines refering to comctl32.ocx,
comdlg32.ocx and msflxgrd.ocx and the project then opened in VB but
showed error messages Error Loading refer to The numerous Frm.logs.
Log entries refer to invalid properties.
user defined type not defined
Dim pn11 as Panel.
Perhaps my fault, should have been more clear about how to reconfigure
a project by editing the .VBP file directly:
After deleting the references:
1) open the project with the VBIDE
2) ignore any complaints, errors, warnings, etc.
3) avoid "touching" any vb modules that may be automatically opened in
the editor
4) go immediately to Project References and make your changes.
5) then close the project/VBIDE to save the change
(If it asks you to save anything other than the project -
Select 'NO')
6) then reopen the VBIDE

To insure a competely 'blank' project - no files opened in the VBIDE -
thus no "load errors", you can edit or delete the .VBW (project
workspace) file. It will be recreated when you open the project.

If you did not do this, ie, continue to fiddle in the Project, then
I'm not sure what may or may not have happened as a consequence.
If you still have the original project files, you might replace your
current files and start-over.

For example of why this may be an issue:
Say you have a project that has one Form with a "missing" control. We
will call it MyControl. When the Form is loaded, so to at least
maintain all the code/events behind, VB will replace MyControl with a
PictureBox. At this point it is just a "placeholder". Go to Project
References add the missing control. Then immediately close the
project. When it is reopened MyControl will have been found. However,
if you in any way cause the Form with the PictureBox placeholder to be
*saved* - then the change is permanent.

The latter is an undesirable outcome as the repair is to manually go
back into each module with a text editor and replace all instances of
'PictureBox' with MyControl. For a large project you can use the load
error file to discover those modules that need to be edited. Narrows
the work down a bit, but still a PITA.

However, I'm not sure at this point if any of this is your problem.
Just wanted to let you know for future reference.
Post by John Mott
I then attempted to add the common control properties back in.
They showed as being referenced in the text file.
Succeeded with the three above mentioned ocx's, but I cannot fathom
how to add the Panel property back in.
When I try to run the project I get error message saying
cant add Panels - method or data member not found.
As for the Panel control it would help if someone who is currently
using VB5 or has a better memory would enter this discussion.

The Panel was replaced by Frames with VB6, so not availble. I remember
various howls and complaints when porting to VB6, but wouldn't think
it would be an issue if you are still using VB5 Common Controls. Even
if you screwed up existing panels - I think you should be able to at
least add a new one. Unless of course MS actually removed it from the
updated VB5 control???? (Don't panic just mulling it over. <g>)

I will ponder a bit more.

hth
-ralph
GS
2014-05-11 18:28:15 UTC
Permalink
<FWIW>
I just discovered the existence of both 5.0/6.0 versions of these
controls on my Win7 Home Premium netbook after installing MS Office to
test my VBA mentioned in my recent OP in this NG.

Not sure if this plays into this situation but thought it might shed
some light on another factor...
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
ralph
2014-05-11 17:59:59 UTC
Permalink
Post by John Mott
1) I have V5.0.37.24 installed on win7 64 bit
This is the correct version for VB5 SP3 Common Controls. This is the
one you need to straighten out your current problem. (I think, but
more later.)

Unfortunately, Microsoft has released several subsequent updated
versions of comctl32.ocx and comdlg32.ocx. All the versions of each
component have the *same* GUID but they are NOT compatible. This
breaks the most hallowed Rule of COM but the very B*stards that should
have known better decided to break it. <g>

At some point something is bound to install an updated version*. This
is particularly nasty since you will likely never notice, because as
be noted current programs run fine - it will only be when something
new is compiled that an error will show up.

A compiled VB program still works with the version it was compiled
with or later versions. However, programs complied with a newer
version will NOT run if an older one is registered. Thus when a new
VB5 program is compiled it will likely need to use the VB6 version.

This is the most often 'fix' - just use the new VB6 MSCOMCTL.OCX
controls. This component does have a new GUID and is self-contained -
does not depend on the comctl32.dll. Which is another component were
often a newer version may be silently installed by another
application.

[Might be worth while to see what version of comctl32.dll you have
installed as well. Perhaps there is a mismatch there as well.]

Confused yet? <bg>

This addresses most of the problems with Common Controls, however as I
noted before not sure where the 'Panel Control' falls in all this.

-ralph
ralph
2014-05-11 19:04:49 UTC
Permalink
Post by John Mott
When I try to run the project I get error message saying
cant add Panels - method or data member not found.
Still trying to run down where and what is a "Panel".
Post by John Mott
The various Frm logs are showing messages
Cannot load control sbar (name of form) ; license not found
This sounds like a pure registration problem.

However, I am Not sure what an "sbar" is. It may be provided by a
separate component, is not either an intrinsic or common control. You
need to install and register that component.

[Example: TabStrip, ToolBar, and StatusBar are in comctl32, but the
SSTab control is provided by TabCtl32.ocx.]
Post by John Mott
and
Line 122: Class MSComDlg.CommonDialog of control dlgCommonDialog was
not a loaded control class.
Line 125: The property name _ExtentX in dlgCommonDialog is invalid.
Line 126: The property name _ExtentY in dlgCommonDialog is invalid.
Line 127: The property name _Version in dlgCommonDialog is invalid.
etc
This is complaining about the comdlg32.ocx. Perhaps with all the
emphasis on comctl32 we forgot to register this one?

It will have the same version number but the TypeLib version will be
different (Ver V1.1 vs. V1.2)
Post by John Mott
I am wondering if we can somehow enable the Panel property whether
this will finally fix the loading and running problems.
I am becoming more confused fiddling with things that I do not fully
understand, hope this all makes sense.
Yep.

Don't let it get you down - anyone and everyone that has worked with
VB for very long has run into one or more COM issues while porting,
installing, updating, etc., and had to learn the hard way the nuances
of COM.

Think of it this way - when you finally get it all sorted out you'll
be an expert. It will be all the more easier the next time. <g>

The Rules for COM are quite simple. As long as everyone obeys the
rules all goes well - but if they don't - it gets messy. In this case
it is Microsoft themselves that failed.

-ralph
ralph
2014-05-11 19:32:35 UTC
Permalink
Post by ralph
Post by John Mott
When I try to run the project I get error message saying
cant add Panels - method or data member not found.
Still trying to run down where and what is a "Panel".
There used to be a 3-D Panel.
Try installing and/or registering THREED32.OCX.

-ralph
John Mott
2014-05-12 08:49:29 UTC
Permalink
Hi Ralph

Thank you for all your patience.
It is some 10 - 15 years since I did any programming other than for
modification or maintainence and my aging brain is getting forgetful
and stupid.

I have decided to start again from scratch.
I will uninstal VB5 on the Win7 drive and delete all the VB
directories which I tranferred from the XP drive.
Will then re instal VB5 and copy across the VB directories to the Win7
drive.

From the VB help files:

" A Panel object represents an individual panel in the Panels
collection of a StatusBar control.

Remarks

A Panel object can contain text and a bitmap which may be used to
reflect the status of an application.
Use the Panels collection to retrieve, add, or remove an individual
Panel object.
To change the look of a panel, change the properties of the Panel
object. To modify the properties at design-time, you can change the
properties of the Panel object in the Panels tab of the Properties
Page. At run-time, you can change the Panel object properties in
code."

Strange, but I do not see a Panels tab in the Properties Page.

John
Post by ralph
Post by John Mott
When I try to run the project I get error message saying
cant add Panels - method or data member not found.
Still trying to run down where and what is a "Panel".
Post by John Mott
The various Frm logs are showing messages
Cannot load control sbar (name of form) ; license not found
This sounds like a pure registration problem.
However, I am Not sure what an "sbar" is. It may be provided by a
separate component, is not either an intrinsic or common control. You
need to install and register that component.
[Example: TabStrip, ToolBar, and StatusBar are in comctl32, but the
SSTab control is provided by TabCtl32.ocx.]
Post by John Mott
and
Line 122: Class MSComDlg.CommonDialog of control dlgCommonDialog was
not a loaded control class.
Line 125: The property name _ExtentX in dlgCommonDialog is invalid.
Line 126: The property name _ExtentY in dlgCommonDialog is invalid.
Line 127: The property name _Version in dlgCommonDialog is invalid.
etc
This is complaining about the comdlg32.ocx. Perhaps with all the
emphasis on comctl32 we forgot to register this one?
It will have the same version number but the TypeLib version will be
different (Ver V1.1 vs. V1.2)
Post by John Mott
I am wondering if we can somehow enable the Panel property whether
this will finally fix the loading and running problems.
I am becoming more confused fiddling with things that I do not fully
understand, hope this all makes sense.
Yep.
Don't let it get you down - anyone and everyone that has worked with
VB for very long has run into one or more COM issues while porting,
installing, updating, etc., and had to learn the hard way the nuances
of COM.
Think of it this way - when you finally get it all sorted out you'll
be an expert. It will be all the more easier the next time. <g>
The Rules for COM are quite simple. As long as everyone obeys the
rules all goes well - but if they don't - it gets messy. In this case
it is Microsoft themselves that failed.
-ralph
ralph
2014-05-13 03:34:35 UTC
Permalink
Post by John Mott
Hi Ralph
Thank you for all your patience.
It is some 10 - 15 years since I did any programming other than for
modification or maintainence and my aging brain is getting forgetful
and stupid.
I have decided to start again from scratch.
I will uninstal VB5 on the Win7 drive and delete all the VB
directories which I tranferred from the XP drive.
Will then re instal VB5 and copy across the VB directories to the Win7
drive.
If you installed VB5 successfully the first time, I'm not sure a
re-install is going to magically fix your problem, but what the hey.
<g>

Got to thinking of something else that might be going on...
[Be warned as this is bit exotic.]

If you get the error "COMCTL32.OCX could not be loaded".
Close the project.
Open the .vbp file in a text editor and find the line like ...
Object = "{long GUID}#1.2#0"; "COMCTL32.OCX"
Copy it and paste to a post.
What I'm interested in is the TypeLib version - the "#1.2#0".

-ralph
John Mott
2014-05-13 06:51:52 UTC
Permalink
Here are the lines of the objects which could not be loaded when I try
to open the project:

Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; comctl32.ocx
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX

The file also has:

Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; msflxgrd.ocx

But I do not think this throws up an error message, but maybe it has
something to do with the StatusBar control which I think is causing
the Panels error.

I have re installed VB5 and copied over the data files, and will not
try your suggestion of deleting the the offending lines and inserting
references.

John
Post by ralph
Post by John Mott
Hi Ralph
Thank you for all your patience.
It is some 10 - 15 years since I did any programming other than for
modification or maintainence and my aging brain is getting forgetful
and stupid.
I have decided to start again from scratch.
I will uninstal VB5 on the Win7 drive and delete all the VB
directories which I tranferred from the XP drive.
Will then re instal VB5 and copy across the VB directories to the Win7
drive.
If you installed VB5 successfully the first time, I'm not sure a
re-install is going to magically fix your problem, but what the hey.
<g>
Got to thinking of something else that might be going on...
[Be warned as this is bit exotic.]
If you get the error "COMCTL32.OCX could not be loaded".
Close the project.
Open the .vbp file in a text editor and find the line like ...
Object = "{long GUID}#1.2#0"; "COMCTL32.OCX"
Copy it and paste to a post.
What I'm interested in is the TypeLib version - the "#1.2#0".
-ralph
John Mott
2014-05-13 09:12:09 UTC
Permalink
Post by John Mott
Here are the lines of the objects which could not be loaded when I try
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; comctl32.ocx
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; msflxgrd.ocx
But I do not think this throws up an error message, but maybe it has
something to do with the StatusBar control which I think is causing
the Panels error.
I have re installed VB5 and copied over the data files, and will not
try your suggestion of deleting the the offending lines and inserting
references.
John
Error in above, should say WILL try your suggestion, not WILL NOT try.

I have done it again:
Deleted the lines that reference
comctl32.ocx and comdlg32.ocx and made the changes back again with
Project References and closed the file and also deleted the VBW file.

When I try to open it in the VB IDE, I no longer get the error
messages about the two ocx files, but get errors written to all the
log files about Panels and status bar.
Line 39: Class ComctlLib.StatusBar of control sbarAbove was not a
loaded control class.
Line 46: The property name _ExtentX in sbarAbove is invalid.
Line 47: The property name _ExtentY in sbarAbove is invalid.
Line 48: The property name SimpleText in sbarAbove is invalid.
Line 49: The property name _Version in sbarAbove is invalid.
Line 58: The property name Panels in sbarAbove is invalid.
Not the same in all FRM logs but similar.

It seems that lack of a Status Bar control is the problem.

From the VB5 Help Files it seems that Status Bar control is in
comctl32.ocx: See

A StatusBar control provides a window, usually at the bottom of a
parent form, through which an application can display various kinds of
status data. The StatusBar can be divided up into a maximum of sixteen
Panel objects that are contained in a Panels collection.
Syntax

StatusBar

Remarks
A StatusBar control consists of Panel objects, each of which can
contain text and/or a picture. Properties to control the appearance of
individual panels include Width, Alignment (of text and pictures), and
Bevel. Additionally, you can use one of seven values of the Style
property to automatically display common data such as date, time, and
keyboard states.

At design time, you can create panels and customize their appearance
by setting values in the Panel tab of the Properties Page of the
StatusBar control. At run time, the Panel objects can be reconfigured
to reflect different functions, depending on the state of the
application. For detailed information about the properties, events,
and methods of Panel objects, see the Panel Object and Panels
Collection topics.

A StatusBar control typically displays information about an object
being viewed on the form, the object's components, or contextual
information that relates to that object's operation. The StatusBar,
along with other controls such as the Toolbar control, gives you the
tools to create an interface that is economical and yet rich in
information.

Distribution Note The StatusBar control is part of a group of custom
controls that are found in the COMCTL32.OCX file. To use the StatusBar
control in your application, you must add the COMCTL32.OCX file to the
project. When distributing your application, install the COMCTL32.OCX
file in the user's Microsoft Windows SYSTEM directory. For more
information on how to add a custom control to a project, see the
Programmer's Guide.

I had a look at the properties of the comctl32 .ocx in my version of
Win7 and it shows V 5.00.3714 566 kb 16/1/97.

In my old XP system where the project was created, it shows
V6.00.8105 594 kb 23/5/2000

This suggests to me that theWin7 version is an earlier and smaller
version that the one I have in XP.

What are your thoughts ?

John
Post by John Mott
Post by ralph
Post by John Mott
Hi Ralph
Thank you for all your patience.
It is some 10 - 15 years since I did any programming other than for
modification or maintainence and my aging brain is getting forgetful
and stupid.
I have decided to start again from scratch.
I will uninstal VB5 on the Win7 drive and delete all the VB
directories which I tranferred from the XP drive.
Will then re instal VB5 and copy across the VB directories to the Win7
drive.
If you installed VB5 successfully the first time, I'm not sure a
re-install is going to magically fix your problem, but what the hey.
<g>
Got to thinking of something else that might be going on...
[Be warned as this is bit exotic.]
If you get the error "COMCTL32.OCX could not be loaded".
Close the project.
Open the .vbp file in a text editor and find the line like ...
Object = "{long GUID}#1.2#0"; "COMCTL32.OCX"
Copy it and paste to a post.
What I'm interested in is the TypeLib version - the "#1.2#0".
-ralph
ralph
2014-05-13 13:01:19 UTC
Permalink
Post by John Mott
Post by John Mott
Here are the lines of the objects which could not be loaded when I try
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; comctl32.ocx
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; msflxgrd.ocx
But I do not think this throws up an error message, but maybe it has
something to do with the StatusBar control which I think is causing
the Panels error.
I have re installed VB5 and copied over the data files, and will not
try your suggestion of deleting the the offending lines and inserting
references.
John
Error in above, should say WILL try your suggestion, not WILL NOT try.
Deleted the lines that reference
comctl32.ocx and comdlg32.ocx and made the changes back again with
Project References and closed the file and also deleted the VBW file.
When I try to open it in the VB IDE, I no longer get the error
messages about the two ocx files, but get errors written to all the
log files about Panels and status bar.
Line 39: Class ComctlLib.StatusBar of control sbarAbove was not a
loaded control class.
Line 46: The property name _ExtentX in sbarAbove is invalid.
Line 47: The property name _ExtentY in sbarAbove is invalid.
Line 48: The property name SimpleText in sbarAbove is invalid.
Line 49: The property name _Version in sbarAbove is invalid.
Line 58: The property name Panels in sbarAbove is invalid.
Not the same in all FRM logs but similar.
It seems that lack of a Status Bar control is the problem.
From the VB5 Help Files it seems that Status Bar control is in
comctl32.ocx: See
A StatusBar control provides a window, usually at the bottom of a
parent form, through which an application can display various kinds of
status data. The StatusBar can be divided up into a maximum of sixteen
Panel objects that are contained in a Panels collection.
Syntax
StatusBar
Remarks
A StatusBar control consists of Panel objects, each of which can
contain text and/or a picture. Properties to control the appearance of
individual panels include Width, Alignment (of text and pictures), and
Bevel. Additionally, you can use one of seven values of the Style
property to automatically display common data such as date, time, and
keyboard states.
At design time, you can create panels and customize their appearance
by setting values in the Panel tab of the Properties Page of the
StatusBar control. At run time, the Panel objects can be reconfigured
to reflect different functions, depending on the state of the
application. For detailed information about the properties, events,
and methods of Panel objects, see the Panel Object and Panels
Collection topics.
A StatusBar control typically displays information about an object
being viewed on the form, the object's components, or contextual
information that relates to that object's operation. The StatusBar,
along with other controls such as the Toolbar control, gives you the
tools to create an interface that is economical and yet rich in
information.
Distribution Note The StatusBar control is part of a group of custom
controls that are found in the COMCTL32.OCX file. To use the StatusBar
control in your application, you must add the COMCTL32.OCX file to the
project. When distributing your application, install the COMCTL32.OCX
file in the user's Microsoft Windows SYSTEM directory. For more
information on how to add a custom control to a project, see the
Programmer's Guide.
I had a look at the properties of the comctl32 .ocx in my version of
Win7 and it shows V 5.00.3714 566 kb 16/1/97.
In my old XP system where the project was created, it shows
V6.00.8105 594 kb 23/5/2000
YEP. That's it!

Sorry, I was looking at it "backwards".

Here is a quick answer. I'll come back with more boring details later.

VB5 came out with Win98. You haven't mentioned the platform you were
on before - but sometime between then and now, your O/S was updated
with VB6 SP5 versions of those controls. You went on working not even
realizing you were no longer using "VB5" controls, but the "VB5
Interfaces - on VB6 Controls".

When you install VB5 you installed the older VB5 versions of comctl32,
BUT not the VB6 comctl32.

Simple fix, is to go into the project files and change the "#1.3#0" to
"#1.2#0" (ignoring the quotation marks of cours.
or ... 1.3 to 1.2

That should fix that error.

like I said more details later. ...

-ralph
ralph
2014-05-13 14:36:22 UTC
Permalink
On Tue, 13 May 2014 08:01:19 -0500, ralph <***@yahoo.com>
wrote:


In the following note any of the common control components support
backward-compatibility for previous versions but obviously can't
support anything newer. I now believe that was your actual problem.

My apologies but I made the unfortunate mistake of assuming (what is
the usual case) that you were getting errors because you didn't have
the correct component to support an *older* interface, when the real
problem was you didn't have the correct components to support a
*newer* interface. <g>

[confused yet? <g>]
Post by John Mott
I had a look at the properties of the comctl32 .ocx in my version of
Win7 and it shows V 5.00.3714 566 kb 16/1/97.
This is the version that is supplied with the original VB5 edition -
with NO SP's (Service Packs). TypeLib V1.1

This component provides NO support for TypeLib versions greater than
1.1.

If you installed the last VB5 SP - which was SP3 - you would have
version 5.01.4319 of comctl32. TypeLib V1.2

This component provides NO support for TypeLib versions greater than
1.2

When anything Win2k or later installed comctl32 it would have
installed one of these two ...
VB6 (no SP) version 6.00.8022 TypeLib V1.3 <--- Tah Dah!!!
VB6 SP5 version 6.00.8105 TypeLib V1.3

This version provides support for TypeLib's V1.1, V1.2, and V1.3.

[*Note VB5 SP5 was the last version of comctl32. VB6 introduced a new
common controls component MSCOMCTL.OCX. Without going into the details
again - this component did change GUIDS for TypeLibs and removed the
"imcompatibility" problems.]
Post by John Mott
In my old XP system where the project was created, it shows
V6.00.8105 594 kb 23/5/2000
This as noted above is the last latest 'n greatest comctr32.

There is probably still an install somewhere, but the easiest solution
is to just copy those components (*see below before you do this) over
to your new box and register them. Remember they have to go into the
syswow64 folder, and you have to make sure you use the regsvr32 FOUND
in the syswow64 folder to register them.

If you do that. Then you can put back the TypeLib version 1.3.

Don't get too mad at me for suggesting this fix earlier. I had you do
a simple change in the project file back to V1.2, simply because this
is the easiest way to test my theory, and because you suggested you
were not that familar with COM nuances - in other words - let's do the
easiest first to make sure we were on the right track. <g>

*All the above was about "comctl32". Stuck to explaining about just
the one to keep it simple. But the same sorry story exists for
comdlg32.ocx as well. AFAIK here are the components that make up the
"common control" suite.

comctl32.ocx
comdlg32.ocx
comct232.ocx - different file versions but
comct332.ocx - these only had one TypeLib version
comctl32.dll
(Might be others you have picked-up over the years - make sure to
preserve your old System32 folder - just in case you need to go back
and grab more.)

Copy all of the newer ones on your older system over to your new box
and register the controls. All your "VB5 projects" should be back to
where they were when you last used it.

Also noticed that your version of comctl32 was the one supplied with
original VB5, but IIRC during earlier posts you seem to demonstrate
that you did have VB5 SP3.

You will probably want to install that SP as well. Microsoft does seem
to supply the SP itself any more - but that only means I can't find
it. <g>
If you don't have the disk. You can download it from various sites,
for example:
"Visual Studio 97 Service Pack 3 (for Visual Basic)"
http://www.softlookup.com/display.asp?id=8705
(I'm leerly of these 3rd party sites. but if you are careful and scan.
Should be OK.)

The other - more official way - is via the cab files:
http://support.microsoft.com/kb/172991/EN-US

You can also simply copy over any "newer" files on your old box over
to the new one. But note - this can get harry. <lol> Do a good
inventory before you start. Record what you did, and be prepared to
"back-out" at any time.

Microsoft does supply an "essential" runtime files install for VB5:
"Msvbvm50.exe"
http://support.microsoft.com/kb/180071
But note this is not a SP for the VB5 IDE, it is only the runtime
files to support existing VB5 compiled applications.
But it can save you a lot of trouble if distributing your
applications, you can include it in your package.

Whew! Hope this helps.

-ralph
ralph
2014-05-13 14:43:44 UTC
Permalink
On Tue, 13 May 2014 09:36:22 -0500, ralph <***@yahoo.com>
wrote:

OOPS!
[*Note VB5 SP5 was the last version of comctl32. ...
Should read "VB6 SP5" was the last version of comctl32 ...
(not VB5)
... VB6 introduced a new
common controls component MSCOMCTL.OCX.
This should read "VB6 SP6" introduced a new ...
... Without going into the details
again - this component did change GUIDS for TypeLibs and removed the
"imcompatibility" problems.]
ralph
2014-05-13 14:55:08 UTC
Permalink
On Tue, 13 May 2014 09:36:22 -0500, ralph <***@yahoo.com>
wrote:

OOPS! Again.
Post by ralph
You will probably want to install that SP as well. Microsoft does seem
to supply the SP itself any more - but that only means I can't find
it. <g>
Meant to say "Microsoft DOES NOT seem to supply a download for the VB5
SP3 service pack any more ..."

I only looked at a few of the .cab files I mentioned - some seem SP3
(ie, updated) others I'm not sure about. Sorry. I have not used VB5
since 1998 - so I'm running purely on flumes of a distant memory here.
Sure wish a current VB5 users would reply. <g>

-ralph
ralph
2014-05-13 15:16:05 UTC
Permalink
Post by ralph
http://support.microsoft.com/kb/172991/EN-US
You can also simply copy over any "newer" files on your old box over
to the new one. But note - this can get harry. <lol> Do a good
inventory before you start. Record what you did, and be prepared to
"back-out" at any time.
Again. Just to be borishly clear - never attempt to simply XCOPY a
complete VB development platform over to a new box - it has to be
*installed*.

However, AFTER it has been installed, you can attempt to do a manual
"upgrade" by replacing older components with newer ones - just make
sure you register them as you go along. (You may even need to manually
fiddle with the Registry.)

There is where the .cab files become in handy.
ralph
2014-05-13 18:24:46 UTC
Permalink
On Tue, 13 May 2014 09:36:22 -0500, ralph <***@yahoo.com>
wrote:

A couple of thousand words and still mess-up ... lol

Forget copying the components over - You can get all the updates in
one swoop ...

"Microsoft Visual Basic 6.0 Common Controls"
http://www.microsoft.com/en-us/download/details.aspx?id=10019

Never paid attention before, but this updates BOTH the mscomctl.ocx
AND the comctl32.ocx.

Download and install.

-ralph
John Mott
2014-05-14 09:30:00 UTC
Permalink
I did download and install this, and then tried to load the project
but it still came up with ocx error messages, so I used a text editor
to delete them and used the Project References to make new references.
I am not very familiar with this process so may have bungled.
It then loaded with just one error message written to the log of one
form only saying method or data member not found.

In the window on the left side of the VB IDE it shows the controls
available and only seems to show a limited number which does not
include the Status Bar control and I cannot see how to add it.

After messing about for a while, I got a bit confused so finished up
doing a System Restore and will start again tomorrow.

Maybe I would get a better result by transferring and registering the
old ocx files from the drive which has the old XP files.

John
Post by ralph
A couple of thousand words and still mess-up ... lol
Forget copying the components over - You can get all the updates in
one swoop ...
"Microsoft Visual Basic 6.0 Common Controls"
http://www.microsoft.com/en-us/download/details.aspx?id=10019
Never paid attention before, but this updates BOTH the mscomctl.ocx
AND the comctl32.ocx.
Download and install.
-ralph
ralph
2014-05-14 12:05:42 UTC
Permalink
Post by John Mott
I did download and install this, and then tried to load the project
but it still came up with ocx error messages, so I used a text editor
to delete them and used the Project References to make new references.
I am not very familiar with this process so may have bungled.
It then loaded with just one error message written to the log of one
form only saying method or data member not found.
In the window on the left side of the VB IDE it shows the controls
available and only seems to show a limited number which does not
include the Status Bar control and I cannot see how to add it.
The StatusBar is located in the ComCtl32.ocx.

A 'reduced number of available' controls would suggest that the
"install" is not picking up the common controls. You may have to open
Project References -> Components and add them to your VBIDE. But this
seems a tad exotic.

Run the Microsoft mscomctl install package first.

Frankly I get nervous when remote people keep going back and "deleting
down to the water-line (or below)", or "re-starting" thinking this is
in some way is going to resolve anything. Never know for sure how or
what one might be doing or what they are fiddling-with during these
cycles.

Note: You have to "UN-INSTALL" anything you have installed. For
example, a simple deletion of components or folders often doesn't work
or has unexpected consequences. Experience shows one usually makes it
worse by leaving something behind.

[For example, did you know if you simply move an ActiveX component to
another folder or trash folder - Windows very helpfully, quietly and
silently, re-registers the component in the new folder? ie, it is not
really 'gone'.]

You may have to manually go in and delete the following Registry
entries to insure a clean re-install.
HKEY_CURRENT_USER\Software\Microsoft\VBA\Microsoft Visual Basic
HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\5.0
(But again we need a VB5 programmer to jump in here.)

good luck

-ralph
John Mott
2014-05-15 08:58:27 UTC
Permalink
Old habits die hard. In the distant past when I was administering a
Unix system, It was a golden rule to do a backup before any software
updates so that we could undo it if it went wrong or stuffed up. This
is why I have a habit of creating a system restore point and restoring
if all did not go well. However, I take note of your comments and will
try to be more brave!

Today I ran the VB6 common control update. This put comctl32.ocx V6.00
8106, 1.28 mb, 15.04.2005 into the sysWOW64 folder.
The comctl32.ocx in the old XP drive system32 folder is V6.00 8105,
594 kb, 23.05.2000. A big difference in size !

In the text editor I deleted the lines for comctl32.ocx + #1.3#0 and
comdlg32.ocx #1.2#0 and then loaded the project into VB5 and used
Project Reference to insert references to Microsoft Windows Common
Controls 5.0 (SP2) and Microsoft Common Dialog Control 5.0 and saved
the project.
When I tried to load the revised project in VB5 It came up with an
error message for one of the frm logs:
class comctlib.status of control sbar(name of form) was not a loaded
control class. I noted that there were only 21 controls showing in the
left hand window of VB5 and they did not include one for StatusBar.
When I tried to run it I got error message:
Method or data member not found frmMain "set pn11 = SbarMain PANELS
(1).
I remarked all the lines on the form refering to Panels and the form
loaded successfully. When I tried to use the menu items to select
other forms, it came up with PANELS error:
Method or data member not found.

I then used the text editor to delete comctl 5.0 (SP2) and used the
project reference to add Microsoft Windows Common Controls 6.0 (SP6)
and saved the project.

Now when I try to load the project into VB5 I am still getting the
error:
Line 64: Class ComctlLib.StatusBar of control sbarDividends was not a
loaded control class.

But there are now 30 controls in the left hand window including
StatusBar. When I try to run it, it still comes up with the PANEL
error, Method or data member not found.
I can view the forms and see the status bar on the bottom of the form
complete with panels.
When I look at the properties of the status bar it does not show a tab
for Panels, but shows a tab for a blank picture.

I now have these references in the project file:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0; COMDLG32.OCX
Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; MSFLXGRD.OCX

I note that inthe project it has COMDLG32.OCX V6.01.9782, 149kb,
9.3.2004 whereas the old XP Drive has
COMDLG32.OCX V5.00.3714, 16.01.1997, 125kb, 16.1.1997.
I do not think this mismatch could be a problem.
It seems that we are missing the Panels in the StatusBar control.

John
Post by ralph
Post by John Mott
I did download and install this, and then tried to load the project
but it still came up with ocx error messages, so I used a text editor
to delete them and used the Project References to make new references.
I am not very familiar with this process so may have bungled.
It then loaded with just one error message written to the log of one
form only saying method or data member not found.
In the window on the left side of the VB IDE it shows the controls
available and only seems to show a limited number which does not
include the Status Bar control and I cannot see how to add it.
The StatusBar is located in the ComCtl32.ocx.
A 'reduced number of available' controls would suggest that the
"install" is not picking up the common controls. You may have to open
Project References -> Components and add them to your VBIDE. But this
seems a tad exotic.
Run the Microsoft mscomctl install package first.
Frankly I get nervous when remote people keep going back and "deleting
down to the water-line (or below)", or "re-starting" thinking this is
in some way is going to resolve anything. Never know for sure how or
what one might be doing or what they are fiddling-with during these
cycles.
Note: You have to "UN-INSTALL" anything you have installed. For
example, a simple deletion of components or folders often doesn't work
or has unexpected consequences. Experience shows one usually makes it
worse by leaving something behind.
[For example, did you know if you simply move an ActiveX component to
another folder or trash folder - Windows very helpfully, quietly and
silently, re-registers the component in the new folder? ie, it is not
really 'gone'.]
You may have to manually go in and delete the following Registry
entries to insure a clean re-install.
HKEY_CURRENT_USER\Software\Microsoft\VBA\Microsoft Visual Basic
HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\5.0
(But again we need a VB5 programmer to jump in here.)
good luck
-ralph
ralph
2014-05-15 12:37:29 UTC
Permalink
Post by John Mott
In the text editor I deleted the lines for comctl32.ocx + #1.3#0 and
comdlg32.ocx #1.2#0 and then loaded the project into VB5 and used
Project Reference to insert references to Microsoft Windows Common
Controls 5.0 (SP2) and Microsoft Common Dialog Control 5.0 and saved
the project.
Note the version numbers.
Post by John Mott
[...]
I then used the text editor to delete comctl 5.0 (SP2) and used the
project reference to add Microsoft Windows Common Controls 6.0 (SP6)
and saved the project.
[...]
Now when I try to load the project into VB5 I am still getting the
Line 64: Class ComctlLib.StatusBar of control sbarDividends was not a
loaded control class.
This is still squirrelly.
After you have reloaded your original project . (See below).
Open the .vbp file that is complaining about the "sbar", and send any
directives that refer to that control.

.[...]
Post by John Mott
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0; COMDLG32.OCX
Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; MSFLXGRD.OCX
Note: you are no longer using the same typelib versions. You converted
from using VB6 SP5 components (as was your original) to updated VB6
SP6 components. Not clear if this is a problem or not.

Chewing on too many items at one time. All we were trying to do was
1) Get the original components on your new box.
In this case VB6 sp5.
(The fact you can also install the newer VB6 SP6 components will be
useful later on.)

2) Get your original projects to load without error on the new box.
Referencing the original components you were using on your old
platform.

3) THEN perhaps make changes to update the projects.

Now that you have the Latest 'n Greatest Common Controls installed on
the box, forget about installed components* and go back and reload
your original projects.

Baby Steps.

-ralph
[*This is assuming this "sbar" is in fact not something else.
Threed.ocx for example.]
John Mott
2014-05-16 09:24:33 UTC
Permalink
Post by ralph
Post by John Mott
In the text editor I deleted the lines for comctl32.ocx + #1.3#0 and
comdlg32.ocx #1.2#0 and then loaded the project into VB5 and used
Project Reference to insert references to Microsoft Windows Common
Controls 5.0 (SP2) and Microsoft Common Dialog Control 5.0 and saved
the project.
Note the version numbers.
Post by John Mott
[...]
I then used the text editor to delete comctl 5.0 (SP2) and used the
project reference to add Microsoft Windows Common Controls 6.0 (SP6)
and saved the project.
[...]
Now when I try to load the project into VB5 I am still getting the
Line 64: Class ComctlLib.StatusBar of control sbarDividends was not a
loaded control class.
This is still squirrelly.
After you have reloaded your original project . (See below).
Open the .vbp file that is complaining about the "sbar", and send any
directives that refer to that control.
I am a bit confused by this request (and many other aspects of VB. It
is such a long time since I did much with it other than run existing
projects.

Here is a snippet of the code I think is bringing up the error
message.

'Add Panels to Status Bar.
Dim pnl1 As Panel
Set pnl1 = sbarDividends.Panels(1)
pnl1.Text = "SELECT A TASK TO PERFORM "

There are 10 separate forms in the project and all have a StatusBar.
Somewhere they are created and named but I cannot figure where.

sbarDividends is the reference name for the StatusBar on the bottom of
the Dividend form.

When I try to run the project it does come up with a box across the
bottom of the form, but when I look at the properties of that box it
says it is named sbarDividends Picture Box and shows the name
sbarDividends and all the other stuff such as dimensions etc.

All ten forms have similar charecteristics.

Did not have much time to look at it today, but will pursue further
during the weekend.
Post by ralph
.[...]
Post by John Mott
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0; COMDLG32.OCX
Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; MSFLXGRD.OCX
Note: you are no longer using the same typelib versions. You converted
from using VB6 SP5 components (as was your original) to updated VB6
SP6 components. Not clear if this is a problem or not.
Chewing on too many items at one time. All we were trying to do was
1) Get the original components on your new box.
In this case VB6 sp5.
(The fact you can also install the newer VB6 SP6 components will be
useful later on.)
2) Get your original projects to load without error on the new box.
Referencing the original components you were using on your old
platform.
I cannot see how to do this as it will not load without errors.

John
Post by ralph
3) THEN perhaps make changes to update the projects.
Now that you have the Latest 'n Greatest Common Controls installed on
the box, forget about installed components* and go back and reload
your original projects.
Baby Steps.
-ralph
[*This is assuming this "sbar" is in fact not something else.
Threed.ocx for example.]
Deanna Earley
2014-05-16 12:58:42 UTC
Permalink
Post by John Mott
sbarDividends is the reference name for the StatusBar on the bottom of
the Dividend form.
When I try to run the project it does come up with a box across the
bottom of the form, but when I look at the properties of that box it
says it is named sbarDividends Picture Box and shows the name
sbarDividends and all the other stuff such as dimensions etc.
It was a StatusBar at some point but when VB fails to load a control, it
replaces it with a picture box.
If the user tells it to continue then saves over the top (with a confirm
overwrite prompt) then this will become permanent.

Go and slap the devloper(sic) that did this and revert to an older
version in source control (you do use source control don't you?)
--
Deanna Earley (***@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be printed, shredded then fed
to the rats. Please reply to the group.)
John Mott
2014-05-17 09:13:09 UTC
Permalink
Thanks Deanna for your info about how tricky VB saves the Picture Box
as a permanent change.

Today I made a step forward. I opened the project in VB after stepping
through the ten frm error messages and then on the Main form deleted
the Picture Box and then added a new Status Bar which I had to
configure to insert appropriate panels.

It then appeared to run OK and did not give me the error about Panels
on the StatusBar!
It may be the long way around, but I think the easy way to get the
whole project running may be to modify all the ten forms to delete the
Picture Box and insert a new status bar.
Will probably have another look at it tomorrow - At least I finally
seem to be making progress.
John

On Fri, 16 May 2014 13:58:42 +0100, Deanna Earley
Post by Deanna Earley
Post by John Mott
sbarDividends is the reference name for the StatusBar on the bottom of
the Dividend form.
When I try to run the project it does come up with a box across the
bottom of the form, but when I look at the properties of that box it
says it is named sbarDividends Picture Box and shows the name
sbarDividends and all the other stuff such as dimensions etc.
It was a StatusBar at some point but when VB fails to load a control, it
replaces it with a picture box.
If the user tells it to continue then saves over the top (with a confirm
overwrite prompt) then this will become permanent.
Go and slap the devloper(sic) that did this and revert to an older
version in source control (you do use source control don't you?)
John Mott
2014-05-18 08:05:50 UTC
Permalink
After deleting the Status Bar Picture Box on all the forms I inserted
a new status bar and set the Panels properties.
I then discovered that I had a ProgressBar Picture Box on one of the
forms and had to delete that and insert a ProgressBar.
It seems that the MSCOMCTL.OCX that I am using has different versions
of the StatusBar and ProgressBar controls to the one originally used
to compose the project.
I then ran into another problem when trying to run the project.
Most of the functions I tried seem to be working but I am getting this
"Run Time Error '70' Permission Denied"
Which highlights this code.

Private Sub txtFirst_Change()
If Len(txtFirst.Text) = 2 Then SendKeys "{TAB}", True
End Sub

It looks like correct syntax to me so I have given up for the day and
gone to think about it.
If only I could find the correct version of COMCTL.OCX maybe my
problems would be solved.

John
Post by John Mott
Thanks Deanna for your info about how tricky VB saves the Picture Box
as a permanent change.
Today I made a step forward. I opened the project in VB after stepping
through the ten frm error messages and then on the Main form deleted
the Picture Box and then added a new Status Bar which I had to
configure to insert appropriate panels.
It then appeared to run OK and did not give me the error about Panels
on the StatusBar!
It may be the long way around, but I think the easy way to get the
whole project running may be to modify all the ten forms to delete the
Picture Box and insert a new status bar.
Will probably have another look at it tomorrow - At least I finally
seem to be making progress.
John
On Fri, 16 May 2014 13:58:42 +0100, Deanna Earley
Post by Deanna Earley
Post by John Mott
sbarDividends is the reference name for the StatusBar on the bottom of
the Dividend form.
When I try to run the project it does come up with a box across the
bottom of the form, but when I look at the properties of that box it
says it is named sbarDividends Picture Box and shows the name
sbarDividends and all the other stuff such as dimensions etc.
It was a StatusBar at some point but when VB fails to load a control, it
replaces it with a picture box.
If the user tells it to continue then saves over the top (with a confirm
overwrite prompt) then this will become permanent.
Go and slap the devloper(sic) that did this and revert to an older
version in source control (you do use source control don't you?)
ralph
2014-05-18 09:14:17 UTC
Permalink
Post by John Mott
[...]
I then ran into another problem when trying to run the project.
Most of the functions I tried seem to be working but I am getting this
"Run Time Error '70' Permission Denied"
Which highlights this code.
Private Sub txtFirst_Change()
If Len(txtFirst.Text) = 2 Then SendKeys "{TAB}", True
End Sub
It looks like correct syntax to me so I have given up for the day and
gone to think about it.
You're almost done.
Post by John Mott
If only I could find the correct version of COMCTL.OCX maybe my
problems would be solved.
This error has nothing to do with Common Controls versions.

The older VB5/VB6 version of "SendKeys" is a problem, and needs to be
replaced, on all Windows Platforms since Vista:

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/sendkeys-gets-error-70-permission-denied/6871a2b7-522f-494b-91f4-4e33cf02e6fc

Karl Peterson's quick fix should fix it. The other links just pile on
the details. <g>

-ralph
John Mott
2014-05-19 09:28:03 UTC
Permalink
Thanks for this info. I found the Karl Peterson fix a bit difficult to
figure out how to use, but in the meantime I had commented out all the
lines using Sendkeys as it was only a sophistication when entering
data to jump to the next text box once the previous one was fully
entered. The Enter key or the mouse do the same job and work quite OK.
The project then ran fine !
However I have now run into another crazy problem.
When saving the project it dropped one of the forms and when I re open
it the form is missing. I cannot see how to recover it other than
starting again from scratch.
I tried this and it is still doing it and one time it dropped a
different form when I saved it.

John
Post by ralph
Post by John Mott
[...]
I then ran into another problem when trying to run the project.
Most of the functions I tried seem to be working but I am getting this
"Run Time Error '70' Permission Denied"
Which highlights this code.
Private Sub txtFirst_Change()
If Len(txtFirst.Text) = 2 Then SendKeys "{TAB}", True
End Sub
It looks like correct syntax to me so I have given up for the day and
gone to think about it.
You're almost done.
Post by John Mott
If only I could find the correct version of COMCTL.OCX maybe my
problems would be solved.
This error has nothing to do with Common Controls versions.
The older VB5/VB6 version of "SendKeys" is a problem, and needs to be
http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/sendkeys-gets-error-70-permission-denied/6871a2b7-522f-494b-91f4-4e33cf02e6fc
Karl Peterson's quick fix should fix it. The other links just pile on
the details. <g>
-ralph
Deanna Earley
2014-05-19 09:36:35 UTC
Permalink
Post by John Mott
Thanks for this info. I found the Karl Peterson fix a bit difficult to
figure out how to use, but in the meantime I had commented out all the
lines using Sendkeys as it was only a sophistication when entering
data to jump to the next text box once the previous one was fully
entered. The Enter key or the mouse do the same job and work quite OK.
Surely as it's implemented in each control's event, what's wrong with
NextControl.SetFocus?
Post by John Mott
However I have now run into another crazy problem.
When saving the project it dropped one of the forms and when I re open
it the form is missing. I cannot see how to recover it other than
starting again from scratch.
I tried this and it is still doing it and one time it dropped a
different form when I saved it.
Dropped how?
Removed from the project, or deleted altogether?
Just re-add to the project (making sure there are no duplicate names)

Also, restore from backup or source control when it breaks :)
(I'll keep mentioning source control till you take the hint, everything
you've said so far implies that you aren't using it.
--
Deanna Earley (***@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be printed, shredded then fed
to the rats. Please reply to the group.)
John Mott
2014-05-20 08:32:37 UTC
Permalink
On Mon, 19 May 2014 10:36:35 +0100, Deanna Earley
Post by Deanna Earley
Post by John Mott
Thanks for this info. I found the Karl Peterson fix a bit difficult to
figure out how to use, but in the meantime I had commented out all the
lines using Sendkeys as it was only a sophistication when entering
data to jump to the next text box once the previous one was fully
entered. The Enter key or the mouse do the same job and work quite OK.
Surely as it's implemented in each control's event, what's wrong with
NextControl.SetFocus?
Good idea ! Fairly simple and I had not thought of this.
Post by Deanna Earley
Post by John Mott
However I have now run into another crazy problem.
When saving the project it dropped one of the forms and when I re open
it the form is missing. I cannot see how to recover it other than
starting again from scratch.
I tried this and it is still doing it and one time it dropped a
different form when I saved it.
Dropped how?
Removed from the project, or deleted altogether?
Just re-add to the project (making sure there are no duplicate names)
Also, restore from backup or source control when it breaks :)
(I'll keep mentioning source control till you take the hint, everything
you've said so far implies that you aren't using it.
For some reason VB was mysteriously dropping the form from the
project.
It was late and I was suffering battle fatigue. Today I found the form
in a sub directory and added it back into the project successfully.

My method of source control consists of copious hand scrawled notes
and occassional backups to another file name. I had a search on the
web and saw quite a few source control programs such as VSS and GIT
but did not pursue the matter. What form of source control would you
recommend ?
Thanks for all your advise, I have re learned a lot and now have the
problem project running well.

John
Deanna Earley
2014-05-20 09:19:32 UTC
Permalink
Post by John Mott
On Mon, 19 May 2014 10:36:35 +0100, Deanna Earley
Post by Deanna Earley
Also, restore from backup or source control when it breaks :)
(I'll keep mentioning source control till you take the hint, everything
you've said so far implies that you aren't using it.
My method of source control consists of copious hand scrawled notes
and occassional backups to another file name. I had a search on the
web and saw quite a few source control programs such as VSS and GIT
but did not pursue the matter. What form of source control would you
recommend ?
Personally I use Mercurial, but git is equally capable, and both are
distributed so no need for a central server.

Check out hginit.com.

After each change (feature, bug fix, etc) do a commit. You can then
easily see what has changed, and when something else goes wrong or is
deleted, you can very easily revert.
--
Deanna Earley (***@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be printed, shredded then fed
to the rats. Please reply to the group.)
ralph
2014-05-20 16:59:26 UTC
Permalink
On Tue, 20 May 2014 10:19:32 +0100, Deanna Earley
Post by Deanna Earley
Post by John Mott
On Mon, 19 May 2014 10:36:35 +0100, Deanna Earley
Post by Deanna Earley
Also, restore from backup or source control when it breaks :)
(I'll keep mentioning source control till you take the hint, everything
you've said so far implies that you aren't using it.
My method of source control consists of copious hand scrawled notes
and occassional backups to another file name. I had a search on the
web and saw quite a few source control programs such as VSS and GIT
but did not pursue the matter. What form of source control would you
recommend ?
Personally I use Mercurial, but git is equally capable, and both are
distributed so no need for a central server.
Check out hginit.com.
After each change (feature, bug fix, etc) do a commit. You can then
easily see what has changed, and when something else goes wrong or is
deleted, you can very easily revert.
For the OP:

What follows assumes that you are essentially a hobbyist - a single
developer planning to stick with Visual Basic 5.0 to develop
applications for yourself and possibly friends 'n family.

First Choice: Visual SourceSafe (VSS)

*IF* you already have it use it. It depends on what version of VB5
(and media) you have. It came with Visual Studio 97 "Advanced". It was
offered as an additional product on the VB5 SP3 CD - but not as part
of the SP3 download. If you do, install it off its separate CD, then
update it using the still available free VSS 6.0 Service Pack.

VSS has a lot of warts and is universally dismissed by most
professional developers. In fact there is an entire web site dedicated
to how horrible it is. <g>

The fact is they are right. VSS, in today's world, is a lousy choice
for a multiple-developer, distributed, complex SCCS.

However, it has one saving grace - it integrates seamlessly with the
Visual Basic IDE. Can be used as a simple Add On to the IDE, or with
an external client app. It is simple and performs the basic
requirements of a source code control system (SCCS) well. For someone
who has never used a SCCS before it makes an excellent introductory
tool.

[What follows is mostly a tie. It is just MHO and the fact SCCS's are
new to you that makes me rank marginally above the other.]

Second Choice: Subversion (via TortoiseSVN)
http://tortoisesvn.net/

It has the advantage of being free and mature. There are excellent
tutorials, several forums, and lots of help out there. The TortoiseSVN
client works via the Windows Explorer Shell - ie, if you can use
Explorer, you will be up and running pretty quickly. This metaphor
makes learning how to setup and configure a SCCS very easy.

[One word of warning. Due to the way the VBIDE manages its
files/resources - always close your VB Projects before you start
'managing' them.]

Third Choice: GIT
http://git-scm.com/

Subversion has been superceded by this new kid on the block. In many
ways it is THE superior free SCCS - has many additional features not
found in other very expensive commercial packages. (Definitely
faster.) So why isn't it my pick over Subversion? Simply because it IS
'powerful' and 'new'. The Windows clients haven't quite caught up yet.
Still pretty much obvious Windows "Bolt-on's" of Unix-flavored tools
with frequent updates. They are excellent for someone who has used an
SCCS before and has an understanding of what they want to do, what all
the options are for, and the consequences of their decisions - but
makes it slightly daunting at first sight to someone who has never
used a SCCS before.

With that said, maybe that is exactly what you would like to play with
- a Full-blown Super-Duper SCCS, and thoroughly enjoy jumping right in
to sink or swim? If so get GIT. <bg>

-ralph

John Mott
2014-05-20 08:40:01 UTC
Permalink
Eureka ! I now think I have ironed out all the bugs and at last seem
to have the project running OK under Win 7.
You were right, it is possible to run VB5 under Win7, it just requires
a few tweeks here and there !
Many thanks to you and others who have advised me over the last couple
of weeks. I have re learned a lot that I had forgotten over the past
15 years or so.

John
Post by ralph
Post by John Mott
[...]
I then ran into another problem when trying to run the project.
Most of the functions I tried seem to be working but I am getting this
"Run Time Error '70' Permission Denied"
Which highlights this code.
Private Sub txtFirst_Change()
If Len(txtFirst.Text) = 2 Then SendKeys "{TAB}", True
End Sub
It looks like correct syntax to me so I have given up for the day and
gone to think about it.
You're almost done.
Post by John Mott
If only I could find the correct version of COMCTL.OCX maybe my
problems would be solved.
This error has nothing to do with Common Controls versions.
The older VB5/VB6 version of "SendKeys" is a problem, and needs to be
http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/sendkeys-gets-error-70-permission-denied/6871a2b7-522f-494b-91f4-4e33cf02e6fc
Karl Peterson's quick fix should fix it. The other links just pile on
the details. <g>
-ralph
Deanna Earley
2014-05-19 07:55:37 UTC
Permalink
Post by John Mott
Thanks Deanna for your info about how tricky VB saves the Picture Box
as a permanent change.
Today I made a step forward. I opened the project in VB after stepping
through the ten frm error messages and then on the Main form deleted
the Picture Box and then added a new Status Bar which I had to
configure to insert appropriate panels.
It then appeared to run OK and did not give me the error about Panels
on the StatusBar!
It may be the long way around, but I think the easy way to get the
whole project running may be to modify all the ten forms to delete the
Picture Box and insert a new status bar.
Will probably have another look at it tomorrow - At least I finally
seem to be making progress.
You can edit them as text files and replace the class name, or do it on
one and copy the control block from that to each other file.
--
Deanna Earley (***@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be printed, shredded then fed
to the rats. Please reply to the group.)
Henning
2014-05-16 10:06:02 UTC
Permalink
Any help from this?

The Windows common controls have been upgraded to include new controls and
functions and to use new file names.

Visual Basic version 6.0 ships with two versions of the Windows common
controls. The first version is for backward compatibility only and should be
used when you do not want to upgrade an existing application to use the new
version.

Why Upgrade?
Visual Basic version 5.X common controls were contained in two .OCX files:
ComCtl32.ocx and ComCt232.ocx. Both of these files called into the
ComCtl32.dll file, a system file, for functionality. The new control
versions are contained in two new files: MsComCtl.ocx and MsComCt2.ocx.
Neither of these files are linked to the ComCtl32.dll file. Besides the new
controls added to these files, another reason for upgrading is easier
distribution and maintenance. The file changes are summarized below:

Old File Name New File Name
ComCtl32.ocx MsComctl.ocx
ComCt232.ocx MsComct2.ocx
ComCtl32.dll -- This file is not needed.

/Henning
Post by John Mott
I did download and install this, and then tried to load the project
but it still came up with ocx error messages, so I used a text editor
to delete them and used the Project References to make new references.
I am not very familiar with this process so may have bungled.
It then loaded with just one error message written to the log of one
form only saying method or data member not found.
In the window on the left side of the VB IDE it shows the controls
available and only seems to show a limited number which does not
include the Status Bar control and I cannot see how to add it.
After messing about for a while, I got a bit confused so finished up
doing a System Restore and will start again tomorrow.
Maybe I would get a better result by transferring and registering the
old ocx files from the drive which has the old XP files.
John
Post by ralph
A couple of thousand words and still mess-up ... lol
Forget copying the components over - You can get all the updates in
one swoop ...
"Microsoft Visual Basic 6.0 Common Controls"
http://www.microsoft.com/en-us/download/details.aspx?id=10019
Never paid attention before, but this updates BOTH the mscomctl.ocx
AND the comctl32.ocx.
Download and install.
-ralph
Mayayana
2014-05-04 13:32:40 UTC
Permalink
I don't remember why I have this, but at some point I
wrote a small TLB register-er that I keep on my Desktop
for drag-drop. The whole thin is in the single, small .BAS
reprinted below. (A heck of a lot less trouble than installing
1/2 GB of .Net frammework. :)

'----------------------------------------------
Option Explicit

Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Enum eSYSKIND
SYS_WIN16 = 0&
SYS_WIN32 = 1&
SYS_MAC = 2&
End Enum

Private Declare Function LoadTypeLib Lib "oleaut32.dll" ( _
pFileName As Byte, pptlib As Object) As Long
Private Declare Function RegisterTypeLib Lib "oleaut32.dll" ( _
ByVal ptlib As Object, szFullPath As Byte, _
szHelpFile As Byte) As Long
Private Declare Function UnRegisterTypeLib Lib "oleaut32.dll" ( _
libID As GUID, _
ByVal wVerMajor As Integer, _
ByVal wVerMinor As Integer, _
ByVal lCID As Long, _
ByVal tSysKind As eSYSKIND _
) As Long
Private Declare Function CLSIDFromString Lib "ole32.dll" (lpsz As Byte,
pclsid As GUID) As Long

Public Sub Main()
Dim sCom As String, sFil As String, sCLSID As String, sParam As String
Dim ALib() As Byte
Dim LRet As Long
Dim Otlb As Object
Dim cTLI As TypeLibInfo
Dim tGUID As GUID
Dim iMajor As Integer, iMinor As Integer
Dim lCID As Long
sCom = Command$
On Error Resume Next
If Len(sCom) < 4 Then ErrMsg "Command line required."

sParam = UCase$(Right$(sCom, 3))
If sParam <> " /R" And sParam <> " /U" Then
sFil = sCom
LRet = MsgBox("Click YES to register, NO to unregister.", 35, "TLBReg")
Select Case LRet
Case 7
sParam = " /U"
Case 6
sParam = " /R"
Case Else
End
End Select
Else
sFil = Left$(sCom, Len(sCom) - 3)
End If

If FileExists(sFil) = False Then ErrMsg "Command line invalid. File not
found."
If UCase$(Right$(sFil, 4)) <> ".TLB" Then ErrMsg "Command line invalid.
File not a .tlb file."

Select Case sParam
Case " /R"
ALib = sFil & vbNullChar
' Pass first byte of array
LRet = LoadTypeLib(ALib(0), Otlb)
If LRet <> 0 Then ErrMsg "LoadTypeLib failed with error " &
CStr(LRet)

LRet = RegisterTypeLib(Otlb, ALib(0), 0)
If LRet = 0 Then
ErrMsg "Success."
Else
ErrMsg "RegisterTypeLib failed with error " & CStr(LRet)
End If

Case " /U"
Set cTLI = TLI.TypeLibInfoFromFile(sFil)
sCLSID = cTLI.GUID
iMajor = cTLI.MajorVersion
iMinor = cTLI.MinorVersion
lCID = cTLI.lCID
Set cTLI = Nothing

ALib = sCLSID & vbNullChar
LRet = CLSIDFromString(ALib(0), tGUID)
If LRet = 0 Then LRet = UnRegisterTypeLib(tGUID, iMajor, iMinor,
lCID, SYS_WIN32)
If LRet = 0 Then
ErrMsg "Success."
Else
ErrMsg "UnRegisterTypeLib failed with error " & CStr(LRet)
End If
End Select

End Sub

Private Function FileExists(ByVal sPath As String) As Boolean
Dim i As Integer
On Error Resume Next
Err.Clear
FileExists = False
i = GetAttr(sPath)
If (Err = 0) Then
If (i And vbDirectory) = 0 Then
FileExists = True
End If
End If
Err.Clear
End Function

Private Sub ErrMsg(sErr As String)
MsgBox sErr, 64, "TLBReg"
End
End Sub
Bill Skaggs
2014-05-04 13:34:57 UTC
Permalink
John,

Last year, here in the USA, when we did the fall time change, the next
morning VB6 would not load. Turned out it had something to do with Daylight
Savings Time which was on Nov 3, 2013. I changed the date to the 2nd and
VB6 would load correctly. I could then change the date back to the correct
one and VB6 would continue to run. I had to repeat the date change trick
every time I re-started my computer.

The permanent fix was the same one as already suggested:
' x64 ' cd C:\Windows\SysWOW64\regtlib msdatsrc.tlb
' x86 ' cd C:\Windows\System32\regtlib msdatsrc.tlb 'this is the one I
used

If regtlib.exe is not on your system, you might try searching Google. I see
lots of suggestions there.

-Bill




------------- Original Message -------------

"John Mott" wrote in message news:***@4ax.com...

I tried this solution, but got an error message saying

"regtlib is not recognised as an internal or external command,
operation, program or batch file"

John
Post by RW
Post by John Mott
I found that VB5 apparently installed on Win 7 successfully, but will
not run properly.
Any suggestions gratefully appreciated.
John
Is version 10 (or higher) of Internet Explorer installed? There were
issues with IE10 "breaking" certain OCXs. You probably can find the
details -- and fixes -- with a few quick web searches. When I got bit
I just rolled back the Windows update that installed IE10 and then hid
that update so as not to accidentally apply it again. Since I don't
use IE anyway sticking on version 9 was no big deal for me.
"Open an elevated cmd prompt and change to the \Windows\System32
folder (for 32-bit) or the \Windows\SysWOW64 folder (for 64-bit).
regtlib msdatsrc.tlb
You should get a "Registration of msdatsrc.tlb successful." message.
After that, MSCOMCTL.OCX and MSCOMCT2.OCX work normally."
Loading...