-
Sep 17th, 2022, 03:16 PM
#41
Re: LED.OCX & Windows 11 Pro
Or even easier, a Shape control.
-
Sep 17th, 2022, 05:26 PM
#42
Re: LED.OCX & Windows 11 Pro
Originally Posted by dilettante
Or even easier, a Shape control.
That's what I started with on the UC I wrote. Wasn't much more than a Shape and a Label.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 19th, 2022, 09:40 AM
#43
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Hello Elroy, thank you very much. I am not ignoring you; I just got super busy work and personal and have not been able to get back to the project. I will here later this week and appreciate all your efforts!!! 8-)
-
Sep 19th, 2022, 11:00 AM
#44
Re: LED.OCX & Windows 11 Pro
Originally Posted by daveyk021
Hello Elroy, thank you very much. I am not ignoring you; I just got super busy work and personal and have not been able to get back to the project. I will here later this week and appreciate all your efforts!!! 8-)
Hey Davey,
Not a problem at all, and I completely understand. I'm just an old retired guy (just turned 70), who likes to keep his hand in this stuff (see if I can keep a few brain cells firing).
Post #38 (above) is really a nice version of the control. It's fairly complex, but it is a single CTL file that you could just include in your project. Again, if you want to learn how to write user-controls, post #18 is a nice (fairly simple) example of a user-control (although not as "pretty" as the one you get from post #38).
Best,
Elroy
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 24th, 2022, 05:12 PM
#45
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
Post #38 (above) is really a nice version of the control. It's fairly complex, but it is a single CTL file that you could just include in your project.
Tomorrow, I should have more time in the late afternoon, but I am trying it now.
How do I add a "user control" to a project? I am working more in VBA, than VB6. Adding it to VBA appears to be a slight issue.
Also, it is rather large. When I tried to re-size it, the image clipped and I didn't see s stretch option. I have one form with about 30 of them stacked on top of each other indication which test is running and the result. Again, this is in VBA. Also, this has just been a very quick attempt, so I am very new to your control.
I am sure, I will do a google here and find out.
Thanks kindly,
Dave
-
Sep 24th, 2022, 06:01 PM
#46
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Okay, adding a user control in VB6 is easy. Adding one to VBA is not possible and that is the majority of where I need them.
It's funny (well not really), the LED.OCX activeX control works fine with VBA on my Windows 11 Home machine, but not either one of my Windows 11 Pro machines.
The Windows 11 Home started out life as a Windows 10 Home machine and upgraded to Windows 11 Home. That old LED.OCX control still works in that machine just fine. It is an unregistered control, btw. You just need to reference it in the IDE and you can you it.
It is a great control when it works.
Last edited by Shaggy Hiker; Sep 24th, 2022 at 08:51 PM.
Reason: Removed attachment that was against policy.
-
Sep 24th, 2022, 08:10 PM
#47
Re: LED.OCX & Windows 11 Pro
I haven't seen this mentioned yet, but could it just be that this particular .ocx file has dependencies that are simply missing on the machines it doesn't work on, but present on the machines it does?
-
Sep 24th, 2022, 08:52 PM
#48
Re: LED.OCX & Windows 11 Pro
This forum does not allow compiled code to be attached. Normally, that's not an issue, as people can just post the source code. Of course, in this case, that won't work, so if anybody would like the control to play around with, contact daveyk021.
My usual boring signature: Nothing
-
Sep 24th, 2022, 09:20 PM
#49
Re: LED.OCX & Windows 11 Pro
An OCX needs to be registered for the VB or VBA IDEs or an MS Office VBA host to use it.
If you browse to an OCX or DLL and select it as a referenced type library the IDE will silently perform the registration. If the run of VB or the MS Office application is not elevated all sorts of problems can ensue. Moving the OCX/DL around afterwar just leads to even more havoc.
For that matter a 32-bit OCX isn't normally usable from a 64-bit Office application, and that might be the real problem here.
Most of it boils down to MS Office issues, not VB issues.
-
Sep 24th, 2022, 09:37 PM
#50
Re: LED.OCX & Windows 11 Pro
Yeah, regarding custom user controls, the VBA is an entirely different animal.
To resize things, there are properties on the properties window such that you can resize the LED circle and/or the font to whatever you want. Then, once it's on a form, just copy-paste the one that's that size.
Regarding the VBA, you'd have to compile it as an OCX, and then register (or have installer do it for you) on the target machine. When compiled, it does get registered during that process, but that's only on the machine it was compiled on.
And all of this sort of takes you back to the situation you were in when we started (getting an OCX correctly registered). Sort of wish I'd known you wanted it for the VBA from the beginning, but I had fun with it, so no big deal.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 24th, 2022, 09:40 PM
#51
Re: LED.OCX & Windows 11 Pro
Also, just as an FYI, OCX controls won't work on the 64-bit version of the VBA (which is where everything is heading). I'm wondering what this application is, and why you don't just get it going in VB6. You can automate Word (or Excel, or PowerPoint, or Access) from VB6. In fact, you can automate the 64-bit versions of any of the Office products from VB6 just fine. (Automate = make Word or Excel or other do things you want.)
If it's some function you want while actually working in Word (or Excel, etc), those are actually better done in the VBA, which would be problematic.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 24th, 2022, 09:43 PM
#52
Re: LED.OCX & Windows 11 Pro
One last thought, now that we have more facts.
These other machines (on which LED.OCX won't work), is it the 64-bit version of MS-Office on them? If so, that's ALL of your problem.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 25th, 2022, 12:17 PM
#53
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by dilettante
An OCX needs to be registered for the VB or VBA IDEs or an MS Office VBA host to use it.
If you browse to an OCX or DLL and select it as a referenced type library the IDE will silently perform the registration. If the run of VB or the MS Office application is not elevated all sorts of problems can ensue. Moving the OCX/DL around afterwar just leads to even more havoc.
For that matter a 32-bit OCX isn't normally usable from a 64-bit Office application, and that might be the real problem here.
Most of it boils down to MS Office issues, not VB issues.
I would think so to, that it needs to register. I went to my Windows 7 shop computer. I can not register or unregister it on that machine, you get the same error as you do in Windows 11, yet it just works when it is referenced. I do not understand this.
What gets me is that is works on the Windows 11 Home machine, the same as it does under Windows 7. It will not work on either Windows 11 Pro machines. Grrrrrrrr
I will send it to you if you give me your email mail adr.
-
Sep 25th, 2022, 12:23 PM
#54
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
-
Sep 25th, 2022, 12:36 PM
#55
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
One last thought, now that we have more facts.
These other machines (on which LED.OCX won't work), is it the 64-bit version of MS-Office on them? If so, that's ALL of your problem.
Good thoughts. I just checked, the Windows 11 Home has 32 bit Office 2016 and the Windows 11 Pro has 32bit Office 2016 too, same exact version.
By the way, I was wrong, it is mostly VB6 I need to get this working in. Only one VBA program uses it and I can easily just remove it and would hardly notice. The program with ~20 LEDS on its page is VB6.
Here is the log file when VB6 tries to load it:
Line 28: Class LEDD.LED of control LED2 was not a loaded control class.
Line 121: Class LEDD.LED of control LED1 was not a loaded control class.
Line 297: Class LEDD.LED of control LED2 was not a loaded control class.
It is Visual Basic 6, 32 Bit, version 8176, 6.0.8169, Forms3: 16.0.14931.20
-
Sep 25th, 2022, 12:42 PM
#56
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
One last thought, now that we have more facts.
These other machines (on which LED.OCX won't work), is it the 64-bit version of MS-Office on them? If so, that's ALL of your problem.
Thinking I did not have the ocx service pack installed, I installed it. VB6 shows the same version:
-
Sep 25th, 2022, 12:53 PM
#57
Re: LED.OCX & Windows 11 Pro
You don't:
There were LOTS of bugs fixed through the years. If you're not running SP6, you're just asking for trouble.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 25th, 2022, 12:57 PM
#58
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
You don't:
There were LOTS of bugs fixed through the years. If you're not running SP6, you're just asking for trouble.
It said SP6 was installing but I guess not. I uninstalled Visual studio and re-booted. I am back to the issue where I cannot get my licensed copy to install under Windows 11 Pro:
-
Sep 25th, 2022, 12:59 PM
#59
Re: LED.OCX & Windows 11 Pro
Since it is VB6 you'll be working in, get the SP6 for the VB6 IDE installed, and then throw that LedUserControl.ctl from post #38 into your project, and get on with it.
As you stated, you'll have a bit of patch-up to do in your code, but that LedUserControl.ctl is a solid piece of code.
And, to say again, resize your LED dot and font size while designing, and then it won't clip. And, if you want several a certain size, just get one resized then copy-paste that control to wherever you want. Each copy of the control will have its own properties, even if you do a control array. But a copy-paste will copies that control's properties.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 25th, 2022, 01:02 PM
#60
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
Since it is VB6 you'll be working in, get the SP6 for the VB6 IDE installed, and then throw that LedUserControl.ctl from post #38 into your project, and get on with it.
As you stated, you'll have a bit of patch-up to do in your code, but that LedUserControl.ctl is a solid piece of code.
And, to say again, resize your LED dot and font size while designing, and then it won't clip. And, if you want several a certain size, just get one resized then copy-paste that control to wherever you want. Each copy of the control will have its own properties, even if you do a control array. But a copy-paste will copies that control's properties.
In trying to the SP to truly install, I am back to where I was when all this crap started a few weeks ago. I can not get my copy of VB6 to install (after un-installing VB6). The copy that did install came from a link on someone's video on how to get it to install in Windows 11. That copy installed but would not take the service pack.
-
Sep 25th, 2022, 01:23 PM
#61
Re: LED.OCX & Windows 11 Pro
Maybe this will help. Be sure to read it carefully, especially the stuff about the msdatsrc.tlb. That file often gets stuck sideways in our systems. I don't have Win11, but I suspect pretty much all of it still applies.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 25th, 2022, 01:31 PM
#62
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
Maybe this will help. Be sure to read it carefully, especially the stuff about the msdatsrc.tlb. That file often gets stuck sideways in our systems. I don't have Win11, but I suspect pretty much all of it still applies.
I'm trying, but it never makes it to the part where it asks for options to install.
-
Sep 25th, 2022, 01:35 PM
#63
Re: LED.OCX & Windows 11 Pro
Originally Posted by daveyk021
I'm trying, but it never makes it to the part where it asks for options to install.
Do you run your Setup-Executable via Right-Click->"Run as Administrator"?
Olaf
-
Sep 25th, 2022, 03:29 PM
#64
Re: LED.OCX & Windows 11 Pro
Originally Posted by daveyk021
I'm trying, but it never makes it to the part where it asks for options to install.
https://www.vbforums.com/showthread....=1#post5579991
-
Sep 25th, 2022, 04:05 PM
#65
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Schmidt
Do you run your Setup-Executable via Right-Click->"Run as Administrator"?
Olaf
Yes, I can not get past this .
That comes after entering license key and selecting to install VB, instead of server components.
-
Sep 25th, 2022, 04:11 PM
#66
Re: LED.OCX & Windows 11 Pro
Dave, you've got to give us a better image. No way I can read that. Maybe crop out the error and make a picture of just that.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Sep 25th, 2022, 04:12 PM
#67
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Eduardo-
Same issue, as soon as I click continue, I get Attachment 185883
Stopped for a few hours while we went to SAMS Club. My original licenses copy of VB6 Pro will not install.
-
Sep 25th, 2022, 04:20 PM
#68
Re: LED.OCX & Windows 11 Pro
Originally Posted by daveyk021
Same issue, as soon as I click continue, I get Attachment 185883
Stopped for a few hours while we went to SAMS Club. My original licenses copy of VB6 Pro will not install.
I have no idea what you posted because the attachment doesn't work.
That procedure is working and has worked for years, I guess you are doing something wrong, perhaps seeing the image I could get a clue.
BTW: I just installed VB6 on Windows 11 22H2 two days ago.
-
Sep 25th, 2022, 04:31 PM
#69
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
Dave, you've got to give us a better image. No way I can read that. Maybe crop out the error and make a picture of just that.
-
Sep 25th, 2022, 04:32 PM
#70
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Eduardo-
I have no idea what you posted because the attachment doesn't work.
That procedure is working and has worked for years, I guess you are doing something wrong, perhaps seeing the image I could get a clue.
BTW: I just installed VB6 on Windows 11 22H2 two days ago.
This is Windows 11 Pro 21H2
-
Sep 25th, 2022, 04:34 PM
#71
Re: LED.OCX & Windows 11 Pro
Originally Posted by daveyk021
OK, the step that must have been missing is:
Originally Posted by Eduardo-
First execute SETUP.EXE normally until you see the error. If it ask to restart, do it and run again.
Then, from the SETUP folder, copy VS98ENT.STF as acmsetup.stf (or it may be VB98ENT.STF).
Execute ACMSETUP.EXE as admin.
or:
Originally Posted by Eduardo-
First execute SETUP.EXE normally until you see the error. If it ask to restart, do it and run again.
Then, from the SETUP folder, copy VS98ENT.STF as acmsetup.stf (or it may be VB98ENT.STF).
Execute ACMSETUP.EXE as admin.
or both.
-
Sep 25th, 2022, 04:36 PM
#72
Re: LED.OCX & Windows 11 Pro
Originally Posted by daveyk021
This is Windows 11 Pro 21H2
I have installed VB6 in Windows 11 Pro 21H2, also in current 22H2 and on several Windows 10, and Windows 7 64 bits.
-
Sep 25th, 2022, 04:58 PM
#73
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Eduardo-
OK, the step that must have been missing is:
or:
or both.
When I do that, ACMSetup tells me it can not find Setup.ini, etc... In the root install folder, there is no AcmSetup.EXE, so I assume you must be meaning to run it in the Setup folder.
I've uninstalled everything that it had installed in the past, except the SP Update, which never took, it will not allow that to be un-installed. I've edited the registry to remove all it's remembrance of VB6. Waiting for a Windows update to finish installing, then it will re-boot, and I can try this again.
-
Sep 25th, 2022, 05:04 PM
#74
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Oh, and I was wrong about one other thing. This machine started out as Windows 10 Pro and upgraded to Windows 11 Pro. The other one I worked with and gave up on started out as Windows 11 Pro.
The one that is working without issue is the HP that started out as Windows 10 Home, and HP hooked up and got it upgraded to Windows 11 Home, as it was supposed to have come. That one, VB6, VBA works without any issues.
Worse case, later, this week, I will order another SSD hard drive (M.2) and buy a Windows 11 Home License, on VIPKeys, for that strip and swap it out as an experiment. The problem is I have so much licenses software and utilities, that even though it is the same machine, I loose an install license and that's a pain in the ass. It's a pain to start over, but I may do that as an experiment.
A Windows 11 update is about 75% installed. I am letting it go an then a re-boot and try again.
I had no issues under Windows 10 doing this, but it was always Windows 10 Home. I can't help but feel there is something in "Pro" that is blocking its install.
-
Sep 25th, 2022, 05:13 PM
#75
Re: LED.OCX & Windows 11 Pro
Originally Posted by daveyk021
When I do that, ACMSetup tells me it can not find Setup.ini, etc... In the root install folder, there is no AcmSetup.EXE, so I assume you must be meaning to run it in the Setup folder.
Yes, in the setup folder.
From the SETUP folder, copy VS98ENT.STF as acmsetup.stf (or it may be VB98ENT.STF).
Then:
Execute ACMSETUP.EXE as admin.
Originally Posted by daveyk021
I've uninstalled everything that it had installed in the past, except the SP Update, which never took, it will not allow that to be un-installed. I've edited the registry to remove all it's remembrance of VB6. Waiting for a Windows update to finish installing, then it will re-boot, and I can try this again.
Forget about other things, try to concentrate in doing right something that I'm telling you it works.
-
Sep 25th, 2022, 06:03 PM
#76
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Eduardo-
Yes, in the setup folder.
From the SETUP folder, copy VS98ENT.STF as acmsetup.stf (or it may be VB98ENT.STF).
Then:
Execute ACMSETUP.EXE as admin.
Forget about other things, try to concentrate in doing right something that I'm telling you it works.
Done that and it will not install. I am giving up for now. My Windows 7 machine will have to run the bench until I get back to this. The Windows 11 Home system that VB6 and VBA is working perfect is not a bench computer. It is an all-in-one and not really a performer; not that it has to be, but currently it is running as an environmental data logger on a file cabinet - lol.
I think I am ordering an M.2 now (should have in two days) and a Windows 11 Home license and give that a try. I mean, I am pulling my hair out. I have two Windows 11 Pro machines that absolutely won't work and on this one, since un-installing VB6, it refuses to install again. Then there is that silly all-in-one running Windows 11 Home that Everything is working fine on. I have no idea why.
-
Sep 25th, 2022, 06:23 PM
#77
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Originally Posted by Elroy
You don't:
There were LOTS of bugs fixed through the years. If you're not running SP6, you're just asking for trouble.
Hello Elroy,
I stumbled with acmsetup added the files and folders as need and got VB6 Installed again on this bench computer.
When I try to install the SP6 service pack, I am getting this:
If it isn't one thing, it's another. I will be happy to use the LED user control from a message way back, but got to get SP6 installed. ...and yes, I rebooted several times. Since the update in an .msi file, you do not get the opportunity to run it as an adminn
-
Sep 25th, 2022, 06:31 PM
#78
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
I found a very old version of the SP6, on my network, that was a folder of files, rather than an MSI files, and it installed.
Attachment 185886
So that is now done. Good Lord, why is it this hard?! lol
-
Sep 25th, 2022, 06:40 PM
#79
Thread Starter
Lively Member
Re: LED.OCX & Windows 11 Pro
Hello Elroy,
It looks like the minimal height it 375 for the control. Is there a way to shrink it so it looks good in 255?
Dave
-
Sep 25th, 2022, 06:47 PM
#80
Re: LED.OCX & Windows 11 Pro
Hi Dave,
Just set the LedSize property to whatever size you want while in design-mode.
Here it is at 100:
You can also change it at run-time, but you probably want to take care of all this sizing while designing.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|