Figuring Out This Shell Game
This book is clearly for advanced shell programmers only.
- By Paul G. Brown
- March 01, 2001
When you fly an airplane you learn one fact quickly - you're judged by
the quality of your landing. No matter how perfect the flight, one little
bump on landing will often lower your passenger's perception of your skills.
Application development suffers from the same fate in that we're often
judged by the feature from another application that is missing in ours.
Until now, the realm of the Windows shell was reserved for the hardcore
C++ developer with time to wade through the limited documentation available.
Visual Basic Shell Programming from O'Reilly & Associates gathers
all the required knowledge and presents it in a concise and focused manner
that will have you integrating these features fairly quickly. The book
presents ways to make your application behave in a Windows standard manner
using the same techniques and calls as the Microsoft folks.
feature in this context is really describing extensions to the Windows
shell. In other words, ways of making it do more than was originally programmed
but in a manner that is consistent with the way other features are implemented.
One of the key tools is a handler, an object that performs an action when
an event occurs. This can be a right-click, double-click or deletion.
The main idea is to make Windows behave the way you want. Let's start
with a handler that we see in action all the time.
allow the developer to change a desktop icon based on a specified criteria.
Say you had a module of your application that allowed the manager to approve
purchase orders. You could place a link on the desktop for starting that
module. For an icon you use an empty inbox tray. When there are purchase
orders that need approval, the tray can appear full. Now, the manager
simply looks at the icon and knows if they need to approve anything. Sound
familiar? It should, it's the same as the Recycle Bin. This is one of
the many tricks available and is called an Icon Handler.
include InfoTip, which controls the ToolTip text displayed in Explorer
for a file. A CopyHook can prevent the copying or deletion of a file or
printer. How about custom drag-and-drop handling in Explorer - Data Handlers.
Expose data in Windows Explorer as if it were folders and directories
using Windows Namespace Extensions. All of these options allow you to
customize the user's environment, improving their experience. Application
developers will find their users are more satisfied because their custom
client tracking system behaves exactly the way they expect. Network administrators
will find that they get fewer support calls for the same reason - things
do what the user expects. Because we're extending the Windows, rather
than coding everything ourselves, the cost of implementing these features
can be very low.
rush out and buy this book, be aware that it's not targeted at beginners.
The book assumes you're a proficient programmer and will be able to understand
the topics presented. In the preface, the author states that audience
is for developers who have done just a few projects. This may be rather
optimistic but the required information is there for the taking; the reader
just needs to spend sometime working with the tools. At a minimum you
should have a solid understanding of event handling with some exposure
to the Windows Registry and C.
My only real
complaint with the book was the binding. I hadn't opened it twice and
the spine was loose. While this makes it lay flat I can see this being
a frequently used volume where you don't want to lose any pages. There
should also be something on the back that identifies it as an advanced
concepts book. The only real comment is a quote that recommends everyone
from novice to expert that is misleading.
if you're a developer looking to take the next step with your apps then
this is the book for you.
Paul G. Brown, MCSD, a developer, speaker, and a frequent contributor to MCPmag.com, lives in New Berlin, Illinois. When not in front of the computer, he can be found chasing Jerry, Wesley, Jordan and Dillon for Mom.