|
Common
Controls Replacement Project (CCRP) |
Free
enhanced replacements for Microsoft's Common Controls. |
|
Have
you ever tried to use one of Visual Basic's common
controls, only to discover that it could almost�but
not quite�do what you wanted? The VB and C++
programmers who make up the Common Controls
Replacement Project (CCRP) have. This group of
talented Windows developers aims to provide smaller,
faster, and�most important�free replacements to
Microsoft's common controls and common dialogs. The
CCRP controls provide roughly the same functionality
as Microsoft's versions, with a ton of extra features.
For example, Microsoft's ProgressBar allows an
application to display its progress graphically by
filling a rectangle with bars or with a solid color.
The CCRP version of the ProgressBar does this as well,
but it can also fill itself with a picture. It can
automatically display a caption indicating progress
textually, as in "16 of 20 files copied" or
"70% complete."
Prime-Time Controls
Other controls available in the project include
Animation, BrowseDialog, Extended FileDialogs,
High-Performance Timer Objects, HotKey, and Pager
controls. I particularly like how the Animation
control allows a program to easily display standard
system animations such as the copy file, delete file,
or empty wastebasket animations. For instance, to
display the move file animation, the program simply
sets the control's OpenStandardAVIResource property to
161 and enables it.
In addition to these prime-time controls, the CCRP
also has beta versions of several controls. You can
download the DragList, IP Address, Date/Time Picker,
and FolderTreeview controls and test them now. The
Extended FileDialogs DLL, ListView, MonthCal, Slider,
Splitter, Status Bar, Tab, and ToolBar controls are
also in the works, but they're not ready for beta. The
Splitter control is one Microsoft should have provided
long ago.
Reduced Size
The CCRP controls not only provide extra features, but
they can also reduce a program's size. If a program
uses a single Microsoft common control, it must
include all the controls in the OCX, paying a total
price of about 1 MB of disk space. On the other hand,
if the program needs a single CCRP control, it can
include only that control and save the space. The
savings can be substantial, but you need to exercise
some caution. If you build a VB6 program using a CCRP
control written in VB5, the deployment package must
include both the VB5 and VB6 runtime libraries,
eliminating any space savings.
In addition to its controls, the CCRP Web site
includes a Cool Tools section that deserves special
mention. This section contains a half dozen tools to
simplify VB programming chores. For example, the
CoolTabs Visual Tabstop Designer lets you graphically
specify locations for tabs in a listbox or textbox.
The RegSvr Context Menu tool adds register and
unregister commands to the context menu that appear
when you right-click on an OCX or DLL file in Windows
Explorer. You can use the Registration Utility tool to
provide a simple, interactive interface to register
and unregister DLL, OCX, and TLB files.
No Source Code
The CCRP controls provide a lot of useful features,
but they have a few shortcomings. For example, the
CCRP controls don't come with source code. That means
if they don't provide the features you need, you're
stuck. You can't modify the controls and you can't fix
them if you find a bug (I found a couple). The CCRP
team doesn't include the code to prevent people from
creating dozens of different versions of the controls.
This is an admirable goal, and the control authors say
the code isn't really a secret. If you contact them,
they'll tell you generally how the controls work. This
isn't a perfect solution, but I can't think of a
better answer to this sticky problem.
The CCRP controls are impressive. They provide a lot
of features omitted by Microsoft's custom controls,
and their price (free) is unbeatable. Perhaps most
important, these controls can inspire us all. They
clearly demonstrate that you can build sophisticated
controls using Visual Basic and not some "more
powerful" language such as C++.
Rod Stephens is the author of several Visual Basic
books, including Ready-to-Run Visual Basic
Algorithms and Custom Controls Library.
Reach Rod at RodStephens@vb-helper.com,
or learn more about his books and download example
programs at www.vb-helper.com.
|
|