Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1537

Krool's CommonControls cut out for Onesie-Twosie use

$
0
0
Ok, this is Krool's work, not mine. And this is done "with his permission".

I just downloaded his most recent copy (on November 14, 2021), and I'll probably stick with this copy, as I do feel that his work is quite mature at this point. If you want a more recent version of his code, you're on your own.

What I've done (and will build upon) is to "cut out" the individual controls from his "controls package". I'm also cutting out any/all of his custom property pages, so, if you wish to have Unicode text, captions, etc, you must set them at runtime. I cut out these property pages because leaving them makes this all much more complex, as his property pages also use his controls, which makes everything quite "interwoven". Without these property pages, it's much easier to isolate individual controls.

I'm just going to post small "demo" projects that have the individual "cut out" controls. In all cases, it'll just be a Project1.vbp and a Form1.frm (with Krool's single control on it). There are no sub-folders in the attached zip files. Everything you need is just all together.

In almost all cases, Krool also requires use of his OLEGuids.tlb typelib. And, this must be registered (with RegTLib.exe) on your computer. It's simple to do this, just run RegTLib from a command line, followed by OLEGuids.tlb on that command line. Then, you'll probably need to refresh the reference in my Project1.vbp (from project references in the VB6 IDE). Hopefully, people are familiar with this process. Once this typelib is registered with the reference refreshed, my projects with Krool's control should execute.

This should make it easy to add a single (or a couple) of Krool's controls to your own project. Just drag all the necessary files to your project (and also reference the OLEGuids.tlb in your project), and then you can use the control from your toolbox.

Anytime I've made any change to Krool's code, I will make notes on that in these posts. I hope to not make any changes at all.

Also, as a note, if you intend to use two or three of Krool's controls in a single project (getting them from this CodeBank thread), you'll run into module redundancy. For instance, Krool's Common.bas module is used by pretty much all of his controls. However, I've included a copy of it in each of the "cut out" controls in this thread. But, since I haven't made any changes to his source code, just ignore that redundancy, and just include a single copy in your project.

Also, you can individually compile these as OCXs, but you're on your own regarding that one. If you're going to do that, I don't see why you don't just use Krool's complete OCX.

That's about it. I'll start with his TextBoxW control, and add more as I get them done. Only five attachments per post, so see subsequent posts.
Attached Files

Viewing all articles
Browse latest Browse all 1537

Trending Articles