This is an electronic version of my book Developing Visual Basic Add-ins, originally published by O'Reilly and Associates. I am distributing it as a compiled HTML (CHM) help file, with a table of contents (see below) and full-text search capability.
View a sample chapter.I am offering Developing Visual Basic Addins for $9.95. To purchase by credit card through PayPal, click the PayPal image below. I will email the book to you (the file is about 600KB) as soon as I am able, which is generally within 24 hours of purchase.
Preface 1 Introduction The Add-In Creation Process The VB Extensibility Object Model Accessing an Object Model Connecting an Add-In Controlling the User Interface Controlling VB Projects Controlling VB Forms Responding to Events in the VB IDE Controlling VB Code Controlling Add-Ins The Visual Basic Add-In Template I Add-In Basics 2 The Basic Components of an Add-In The Add-In Project Itself Adding the Connect Class Registering an Add-In Referencing the VBIDE Object Library How the Registry is Used The Add-In Manager and the Add-In Toolbar The Add-In Manager The Add-In Manager Add-In Name The Add-In Toolbar Connecting an Add-In The OnConnection Method The BeginShutdown Method The OnStartupComplete Method The OnAddInsUpdate Method Try It Out 3 Object Models Collection Objects Object Model Hierarchies Object Model Syntax Object Variables The Set Statement The Is Operator Using Object Variables The With Statement An Object Variable is a Pointer Freeing an Object Variable-The Nothing Keyword Default Members 4 Menus and Toolbars Menus and Toolbars: An Overview Menu Terminology The CommandBar Object Command Bar Controls Popup Controls Button Controls Adding a Menu Menus and Toolbars: The Object Model The CommandBars Collection Creating a New Menu Bar or Toolbar Command Bar Controls Creating a New Command Bar Control Built-In Command Bar Control IDs Example: Creating a Menu Hooking the Menu's Click Event The Add-In Code Shell Example: A More Elaborate Menu Example: Creating a Toolbar Built-In Face IDs 5 Debugging Add-Ins Setting Break Points in an Add-In What To Do From Break Mode Getting Information From a Running Add-In Beep Codes Printing to the Client's Immediate Window ToolWindows II The Extensibility Model 6 Overview of the Object Model The VBE and Parent Properties Properties and Methods of the VBE Object VB IDE Objects 7 User Interface Objects The Window Object The Type Property The Windows Collection Window Size, Position, and State Linked and Docked Windows The CodePane Object The CodePanes Collection CodePane Properties and Methods The CodeModule Property The CodePaneView Property The CountOfVisibleLines Property The TopLine Property The Show Method The GetSelection and SetSelection Methods Example: Clearing the Debug Window Example: Scrolling a Code Pane 8 Project-Related Objects VB Projects The VBProjects Collection The FileName Property The StartProject Property The SaveAs Method The Add and Remove Methods The VBNewProjects Collection The AddFromFile Method The AddFromTemplate Method The VBProject Object The AddToolboxProgID Method The BuildFileName Property and the MakeCompiledFile Method The Name, FileName and Description Properties The IsDirty and the Saved Properties The ReadProperty and WriteProperty Methods The StartMode Property The VBComponents Property The References Property and Reference Objects The BuiltIn Property The FullPath Property The IsBroken Property The Major and Minor Properties The Name and Description Properties The References Collection The VBComponent Object The Activate Method The CodeModule Property The Description Property The FileCount and FileNames Properties The IsDirty Property The Name Property The Properties Collection The Reload Method The SaveAs Method The Type Property Designers The VBComponents Collection The Add and Remove Methods The AddFile Method The AddFromTemplate Method The StartupObject Property Example: Setting the Start Project 9 Form and Control Objects The VBForm Object The SelectAll Method The Paste Method and the CanPaste Property VBControls Collections The Add Method The VBControl Object The ProgId and ClassName Properties The ContainedVBControls Property The Container Property The ControlType Property The InSelection Property The Properties Property The ZOrder Method Example: Setting Tab Stops 10 Event-Related Objects The CommandBarEvents Object FileControlEvents The AfterAddFile Event The AfterChangeFileName Event The AfterCloseFile Event The AfterRemoveFile Event The AfterWriteFile Event The BeforeLoadFile Event The Other Events ReferencesEvents The ItemAdded Event The ItemRemoved Event SelectedVBControlsEvents The ItemAdded Event The ItemRemoved Event VBComponentsEvents The ItemActivated Event The ItemAdded Event The Reloaded Event The ItemRemoved Event The ItemRenamed Event The ItemSelected Event VBControlsEvents The ItemAdded Event The ItemRemoved Event The ItemRenamed Event VBProjectsEvents The ItemActivated Event The ItemAdded Event The Reloaded Event The ItemRemoved Event The ItemRenamed Event Experimenting with Events 11 Code-Related Objects The CodeModule Object Properties and Methods of the CodeModule Object Inserting, Deleting or Changing Code Code Statistics Locating Code Individual Members of the CodeModule Object The AddFromFile Method The AddFromString Method The CodePane Property The CountOfDeclarationLines Property The CountOfLines Property The CreateEventProc Method The DeleteLines Method The Find Method The InsertLines Method The Lines Property The Members Property The ProcBodyLine Method The ProcCountLines Method The ProcOfLine Method The ProcStartLine Method The ReplaceLine Method The Member Object Example: Pushing/Popping Prefixes 12 Add-In Related Objects The AddIns Collection The AddIn Object The Description Property The Guid and Progid Properties The Connect Property Appendix Built-In Command Bar Controls