Introduction

 

This book, titled 'Visual Studio.Net - Controls and Add-ins', picks up from where our earlier book named 'Visual Studio.Net - The Basics', left off.

 

The preceding book encompassed the following three primary aspects:-

     It elucidated the design of the framework by creating unpretentious and simple applications

     It laid abundant emphasis on the use of the C# language.

     It discoursed about the internal mechanism of the Framework.

 

This book is a sequel in which, the sophisticated subject of User-Controls and the Extensibility features offered by Add-ins are probed in detail.

 

The first section of the book evinces the creation of Windows Forms Controls. It swathes the basics of creating a Control, exposing its properties and events. It also explores the process of adding design-time behavior to the Control.

 

The second section of the book undertakes a voyage of discovery of the Extensibility option. Microsoft has invested heavily in incorporating extensibility in Visual Studio.Net. This facilitates customization and extension of Visual Studio.Net by third-party developers, by means of exploiting the Add-in options.

 

In order to extract and absorb the essence of this book in full measure, your sound familiarity with the C# language is an absolute inevitability. Further, you should be at considerable ease with the User Interface aspects of the Framework. If it is any other way, then a word to the wise is to become conversant with the basic fundamentals from our preceding book, before venturing forth to grapple with the contents of this one.

 

Controls insulate the user from the complexity of the underlying software infrastructure. A control could either inherit directly from the base class or it could differ substantially from its parent class. The provision to construct one's own controls bestows the greatest measure of flexibility possible on a programmer. However, while germinating such controls, certain fundamental guidelines have to be conformed to. These guidelines are delineated  in a 'step-by-step' approach in the ensuing chapters, with the aid of sample programs.

 

The first chapter lays the basal foundation and gets you acquainted with the fundamental structure and the methodology of a User Control. It also characterizes and expounds the attributes, properties and events associated with a Control. All the Controls are emplaced in an Editor as a matter of course. Here, we have made a deviation by way of creating our own User Interface Type Editor, instead of using the Editor provided by Microsoft.

 

The second chapter assiduously explicates, in minute detail, the creation and mechanism of the User Interface Type Editor. We look upon it as obligatory, since we have exploited this Editor extensively, throughout the book.

 

The issue of Type Conversion, which rears its head while we essay at analyzing the fundamental concepts of the User Interface Type Editor, has been addressed in the third chapter.

 

The very quintessence of the fourth chapter is the exposition of how Controls work in consort with the Design Time environment of Visual Studio.Net. Extender Providers and Advanced Designers, the other concepts of considerable consequence, have also been canvassed here. 

 

The fifth chapter espies us formulating user-defined controls, whose foremost mission is to generate C# code in the Code Editor. In other words, the chief intent of this chapter is to assimilate Controls, which in turn, slot in additional code to the already existent code generated by the Designer.

So far, the book discourses about Controls that work in consonance with Windows Forms. The sixth chapter deviates from the trodden path and plumbs into the arena of Web Controls, which are controls in a Web Form. They are discernible in a browser and work on the Internet.

 

On specific occasions, it is desirable to integrate auxiliary functionality directly into the environment.  Add-ins are a potent and effective way of doing so. They fit into Visual Studio.Net seamlessly, thus rendering it extremely easy for the end-users to tailor the tool as per their working style.

 

Almost everything about Visual Studio.Net can be altered or customized by the programmer. For a prolonged spell of time, Visual Studio.Net is destined to rule as the most extensible product in the world. This product can be extended using the principles of Automation.

 

Add-ins are the starting point for any programmer who wishes to extend Visual Studio.Net in any desired manner. These Add-ins must capture the events to implement smooth integration. The last two chapters in the book weigh up these aspects, where the events that get triggered off at distinct levels, have been adeptly explained.

 

Thus, this book serves as a springboard for any programmer who wishes to learn the innards of the sterling features of User Controls and Add-ins of Visual Studio.Net. It provides  stimulus apropos to an inquiring mind. It teems up with abundant sample programs and captivating text. It will play an ameliorating role in assisting you to acquire ample knowledge of these vital features of Visual Studio.Net. Therefore, we beseech you to explore with this book with unremitting attention, without further ado.

 

 

Software Requirements

 

The software requirements to successfully run all the programs in this book are

 

     Operating System - Windows 2000

     Microsoft IIS ver 5.0

     SQLServer 2000 (Evaluation Edition)

     Internet Explorer 6

     Visual Studio.Net

 

SQLServer 2000

While installing the evaluation edition of SQLServer 2000, we have chosen the default selected settings. The only modification made is in the Authentication Dialog Box.

 

You see two options

     Windows Authentication mode

     Mixed mode (Windows Authentication and SQL Server Mode)

 

The default option selected is Windows Authentication mode. We have instead selected Mixed mode (Windows Authentication and SQL Server Mode). Once this option is selected, the password text boxes for the 'sa' user gets activated. As we would prefer using a blank password in our programs, we select Blank Password. On selecting this option, the text boxes get disabled again.

 

 

Acknowledgements

 

The many individuals who have worked together to produce this great work of art and motivated me all the way need a mention here. Their bright ideas, inspiration, support has made me a lot more stronger and wiser.

 

First and foremost, thanks to Manish Jain, BPB Publications for publishing the book.

To my co-authors, Sonal and Manish who have put in a lot of hard work to complete the work assigned to them.

 

To Tanuja Sodhi, an ex-Naval Officer from the first batch of lady officers and an MBA from Jamnalal Bajaj, for editing the book. She is presently freelancing as a creative writer.

 

To Altaf Hemani and Kishore Rohra, for their creativity in designing the cover in a given short time.

 

To Shivanand Shetty, who has always been there, as a source of inspiration and encouragement.

 

A long list of friends need a mention here for their patience and cooperation on this book while it was being written.

 

 

 

 

 -Vijay Mukhi