Monday, February 7, 2011

Developing Visual Studio .NET Macros and Add-Ins







Acknowledgments xiii
About the Author xv
Introduction xvii
Part 1 Automating Your Work 1
Chapter 1 All about Macros and Add-ins 3
What Are Macros and Add-ins? 4
Why Use Macros and Add-ins? 4
Automating Your Work with Macros 5
Enhancing the IDE with Add-ins 7
Online Help for Macros and Add-ins 8
Other Ways to Customize Visual Studio .NET 9
Manipulating the Windows 10
Managing the Toolbars and Commands 17
Customizing the Menus 22
Moving Forward 26
Chapter 2 Just Enough VB.NET 27
VB.NET Subroutines and Functions 29
VB.NET Variables 30
Arrays in VB.NET 34
Strings in VB.NET 36
VB.NET Control Structures 40
Conditional Statements 40
Loop Statements 41
Exceptions 43
Classes in VB.NET 44
Other VB.NET Topics 46
Moving Forward 48
Chapter 3 Introducing the Visual Studio Macro IDE 49
The Macro System and the Main IDE 49
Macro Development Divisions 51
Projects and Modules 51
Class Files and Code Files 53
Scoping 53
Working with the Macros IDE 54
The Parts of the Macros IDE 55
Managing Projects and Modules 56
Creating a New Project 57
Loading and Unloading Projects 57
Saving Your Project 58
Default Macro Location 59
Creating a New Module 59
Renaming Projects and Modules 59
Deleting a Module 60
Running a Macro 60
Stopping a Macro 61
Using the Code Editor in the Macros IDE 62
Collapsible Code 62
Working with Blocks of Code 63
Debugging a Macro 63
Working with the Macro Explorer 64
Quickly Recording a Temporary Macro 66
Selecting the Recording Project 67
Recording a Macro 67
Editing the Temporary Macro 68
Assigning Shortcut Keys to Your Macros 70
Moving Forward 71
Chapter 4 Macros That Interact with the User 73
Referencing Assemblies and Macro Projects 73
Referencing External Assemblies 74
Referencing Items in Other Macro Projects 75
Referencing One of Your Own Assemblies 77
Creating Windows and Forms 83
Getting Input from a User 83
Creating a Form 84
Displaying Standard Dialog Boxes 85
Working with System Event Handlers 87
Categories of Events 88
Moving Forward 93
Chapter 5 Just Enough .NET Architecture 95
Getting to Know Microsoft .NET 95
Common Language Runtime 96
.NET Class Library 97
Packaging Your Software: Assemblies and Manifests 98
Looking at an Assembly 99
Organizing Multiple Versions of an Assembly 100
.NET and OLE/COM 101
Globally Unique Identifiers 102
Building an Assembly from a COM Component 102
Macro and Add-in Models 103
Visual Studio Packages 104
Visual Studio Project Types 104
Accessing Project Types Not Supported by the Macros IDE 106
Accessing the Project Object 107
Accessing Visual Basic and C# Projects 108
Accessing C++ Projects 109
Macro IDE Automation Model 112
Moving Forward 113
Part 2 Enhancing Visual Studio 115
Chapter 6 Introducing Add-ins 117
About Add-ins 117
Startup and Shutdown 119
Invoking Your Add-in 120
Interacting with the IDE 121
Creating Custom Options Pages 123
Creating Tool Windows 124
Add-ins and the Command System 124
Wizards 125
Add-ins Are COM Components 126
Creating an Add-in 129
Using the Wizard 130
Building and Running the Add-in 136
Managing Add-ins 137
Moving Forward 138
Chapter 7 Creating Add-ins for the IDE 139
Building an Add-in in C++ 139
Including a GUI with Your Add-in 140
Working with Commands 141
Using the Forms Library 141
Building a Tool Window 145
Using the Form Designer with a Tool Window 153
Moving Forward 159
Chapter 8 Life Cycles, Debugging, and Satellite DLLs 161
The Life Cycle of an Add-in 161
Debugging an Add-in 162
Keeping the Registry Clean 163
Debugging the Command-Line Version 163
Debugging the Command-Line Add-in 164
Setting Up Multiple Debug Configurations 165
Creating a Satellite DLL for Resources 167
About Culture-Specific Information 168
Valid Culture Identifiers 169
Adding Culture-Specific Resources in .NET 170
Forms and Multiple Languages 170
Adding Cultural Assemblies in General 171
Making Your Add-ins Multilingual 175
Moving Forward 184
Chapter 9 Manipulating Solutions and Projects 185
Determining the Currently Selected Project 186
Manipulating a Project’s Items 188
Manipulating a Project’s Settings 193
Accessing and Setting Configuration Properties 195
Adding Configurations 198
Configuring Projects at the Solution Level 200
Configuring Individual Files 201
Manipulating Language-Specific Information 205
Moving Forward 206
Chapter 10 Programming the Document and User Interface Objects 207
Managing Documents with the Document Classes 207
The Form Editor and Documents 209
Opening or Creating a Document 210
Processing Text 212
The EditPoint, TextPoint, and VirtualPoint Objects 218
Working with Multiple Windows and Panes 221
Navigating the User Interface Hierarchy 223
Finding a Hierarchy Item 226
Finding an Item Using Regular Expressions 226
Selecting a Hierarchy Item 228
Collapsing Nodes 230
Moving Forward 231
Chapter 11 The CodeModel and Build Objects 233
Manipulating Code with the CodeModel 234
A FileCodeModel Add-in 237
Working with Build Objects 248
Spawning a Build Process 250
Building with the SolutionBuild Object 252
More on the SolutionBuild Object 252
Moving Forward 254
Chapter 12 Creating Project Wizards 255
Dissecting the Wizard Directory Structure 256
Wizard File Interactions and Symbols 259
Rendering the Template Files 263
Wizard Properties 267
A Script Wizard Tutorial 269
The common.js File 276
Viewing Your HTML Files 279
Moving Forward 281
Part 3 VS.NET and Other Products 283
Chapter 13 Writing .NET Add-ins for Microsoft Office 285
Introducing Office Add-ins 285
Writing Add-ins for Other Products 287
Preparing the Office Application 287
Creating the Add-in 288
Adding References to Office Products 291
Writing the Add-in 295
Debugging for Multiple Products 301
Responding to Office Events 303
Moving Forward 311
Chapter 14 Integrating Visual Studio .NET with Microsoft Office 313
Adding a Spelling Checker 314
Integrating an Excel Spreadsheet 322
Automating from Macros 326
Moving Forward 333
Chapter 15 Integrating with Other Products 335
Windows Script Host 335
Delphi 338
Python 340
Script Explorer Add-in 343
Moving Forward 352
Part 4 Deploying and Supercharging 353
Chapter 16 Deploying Your Macros and Add-ins 355
All about Security and Add-ins 355
.NET Security 356
Valid and Verified .NET Code 357
Security Permissions 357
Security Administration for .NET 358
Security in Action 359
COM Security 362
Deploying Macros 364
Setting Up the Deployment Project 365
Adding a Shortcut to the .vsmacros File 370
Creating the Custom Action Project 371
Moving Forward 375
Chapter 17 Supercharging Visual Studio .NET 377
Creating an Options Page for Your Add-in 377
Another Useful Add-in 388
Third-Party Add-ins 392
Exploring the CLI 393
Understanding the CLI 394
Other Languages and the CLI 394
Wrap-up 395
Appendix A Class and Object Quick Reference 397
Root DTE Object 397
DTE Properties 397
DTE Methods 400
Other EnvDTE Objects 401
Enumerations 402
Index 409

Another Visual Basic Books
Another .NET Books
Download

No comments:

Post a Comment

Related Posts with Thumbnails

Put Your Ads Here!