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:

1.
Create a new add-in project.

2.
Add a new form to the add-in.

3.
Add a ListView control to the form.

4.
Add a Button control to the form.

5.
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.

6.
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.

7.
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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.107.31