Exercise
Building on what you started yesterday with the code snippet macro, you're going to create an add-in that retrieves the data from SQL Server where the code snippets exist.
To do this, work through the following steps:
Create a new add-in project.
Add a new form to the add-in.
Add a ListView control to the form.
Add a Button control to the form.
On the Form_Load event, fill the ListView control with the data from the Utilities database in SQL Server where you're saving the code snippets from the macro you created yesterday.
When a user selects a code snippet from the ListView, add code to the Button that asks if the user wants to add the code to a tab in the Toolbox or a directory into the Code Editor.
Write code that inserts the code into either the Toolbox or into the Code Editor.
This form actually has only two methods with code: the Form_Load event and the Button_Click event that handle the interaction. You can get help while you're doing this by using what you learned today about the Toolbox object and by looking up the TextWindow object in Dynamic Help.
• Table of Contents
• Index
Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days
By
Jason Beres
Publisher
: Sams Publishing
Pub Date
: January 14, 2003
ISBN
: 0-672-32421-0
Pages
: 696
Sams Teach Yourself Visual Studio .NET in 21 Days will help developers that are new to application development and experienced developers understand how to use the .NET Framework and Visual Studio .NET to rapidly develop any type of computer application. The Visual Studio .NET development environment is the most comprehensive developer tool ever created, putting that together with the .NET Frameworks' Class Libraries, the developer has everything he or she needs to get up-to-speed on Microsoft's latest revolution in application development. This book will guide the developer through using the VS .NET IDE, the Visual Basic .NET and C# language, and the supporting tools available from Microsoft to create Windows and Web-based applications. The market is full of books that pretty much say the same thing, which is already available in the help files, the author of this book has written and deployed over a dozen successful applications using Visual Studio .NET and the .NET Framework. All of his expertise and experience is used to give you the most comprehensive title on using Visual Studio .NET.