ToolStrip controls can host a wide range of functionality. ToolStripItems duplicate the functionality of several other Windows Forms controls as well as combine some Windows Forms functionality with menu functionality.000-297 ex0-103 190-801
Tool strips support rafting, merging, rearrangement of controls, and overflow of controls.
MenuStrip controls are used to create menus for forms and host ToolStripMenu-Item controls, which represent menu entries and commands.
The ContextMenuStrip control is used for creating context menus. You can associate a context menu with a control by setting the ContextMenuStrip property.
The Properties window can be used to create default event handlers or to assign preexisting methods to handle events.
A variety of mouse and keyboard events are raised in response to user actions. The MouseEventArgs parameter in many of the mouse events provides detailed information regarding the state of the mouse, and the KeyEventArgs and KeyPressEvent-Args parameters provide information regarding the state of the keyboard.
Event handlers can be created at run time and used to dynamically associate events with methods.
Typically, most real-world applications use databases as a store for the data in that application. For example, inventory systems, contact management systems, and airline reservation systems store data in a database and then retrieve the necessary records into the application as needed. In other words, the data used by an application is stored in a database external to the actual application, and it is retrieved into the application as required by the program.
When creating applications that work with data, the Microsoft .NET Framework provides many classes that aid in the process. The classes that you use for common data tasks such as communicating, storing, fetching, and updating data are all located in the System.Data namespace. The classes in the System.Data namespace make up the core data access objects in the .NET Framework. These data access classes are collectively known as ADO.NET.
Before you can begin working with data in an application, you must first establish and open a connection and communicate with the desired data source. This chapter describes how to create the various connection objects that are used to connect applications to different data sources and sets the basis for working with data in the following chapters. After learning to establish connections to databases in this chapter, we will move on to Chapter 6, “Working with Data in a Connected Environment,” which provides instructions for running queries, saving data, and creating database objects directly between your application and a database. Chapter 7, “Create, Add, Delete, and Edit Data in a Disconnected Environment,” describes how to create DataSet and DataTable objects that allow you to temporarily store data while it is being used in a running application. Finally, Chapter 8, “Implementing Data-Bound Controls,” provides information on binding data to be displayed and worked with in Windows Forms controls.
Typically, data sources are relational databases such as Microsoft SQL Server and Oracle, but, additionally, you can connect to data in files such as Microsoft Office Access (.mdb) and SQL Server (.mdf) database files. The connection object you use is based on the type of data source your application needs to communicate with. 190-712 640-553 190-623