The Book s Audience

only for RuBoard - do not distribute or recompile

The Book's Audience

You should already be somewhat knowledgeable in Visual Basic. You don't need a black belt in VB kung fu, but you should have already done a few projects in the language. Again, I really need to emphasize that this is not a book for beginners . If you are a beginner, there are many books (big, fat, heavy books) waiting for you. If you know VB but are not really up to speed on COM, that's okay. There is a crash course on COM in Chapter 2. We'll take it step by step from there on out.

only for RuBoard - do not distribute or recompile
only for RuBoard - do not distribute or recompile

Developing Your Own Shell Extensions

Have you ever looked at some of the standard features of the Windows family of operating systems and wished that you could take advantage of them in the software that you're developing with Visual Basic? Once you've finished Visual Basic Shell Programming , you'll be able to add those standard features successfully to your software as long as they're implemented using shell extensions. Consider the following three examples:

Context-sensitive icons

Have you ever looked at the Recycle Bin icon and thought that you'd like your application icons to behave similarly? For instance, perhaps you'd like one icon to appear if an application data file was backed up successfully and another if it was modified but not backed up. Or perhaps you'd like an icon that reflects the template from which a document was created. For these purposes, you can develop an icon handler. The icon handler developed in this book reads a file and displays an icon based on its content. You can easily extend this to base the displayed icon not only on some aspect of the file's content, but also on some characteristic of the file, such as its creation date and time, its size , or its file attributes.

Browsing namespaces

You've probably noticed that the Windows Explorer, unlike the File Manager of Windows 3.x, does not just display classic filesystem objects. Instead, you can browse such things as printers, Control Panel applets, and computers on the network. Perhaps you'd like to make your application data browsable in the Explorer. By writing a namespace extension, you can do just that. Visual Basic shell programming shows you how to browse namespaces by developing three sample namespace extensions, including one that allows you to browse and navigate the system registry within Explorer.

Customized context menu items

One of the most popular features introduced in Windows 95 was the pop-up menu, the context-sensitive menu that appears when the user right-clicks an item in the list pane of Explorer. In fact, pop-up menus are so popular that users have come to look for them in all applications, and Visual Basic Shell Programming will show you how to build them. The context menu handler developed in this book displays particular menu items based on the contents of the selected file. However, the example can be easily extended to display a menu item based on such things as the file's attributes or its creation date. For example, if you were to develop a namespace extension that made your application's database browsable in the Explorer, you'd also want to allow the user to edit the selected record by selecting an option from the context menu if the record was not locked. After reading the chapter on context menu handlers, you'll find building such a shell extension surprisingly easy.

only for RuBoard - do not distribute or recompile