Before You Begin

This section contains information you should review before using this book and instructions to ensure that your computer is set up properly for use with this book. We’ll post updates to this Before You Begin section (if any) on the book’s website:

www.deitel.com/books/vcsharp2010htp/

Font and Naming Conventions

We use fonts to distinguish between features, such as menu names, menu items, and other elements that appear in the program-development environment. Our convention is to emphasize IDE features in a sans-serif bold Helvetica font (for example, Properties window) and to emphasize program text in a sans-serif Lucida font (for example, bool x = true).

A Note Regarding Software for the Book

This textbook includes a DVD which contains the Microsoft® Visual Studio® 2010 Express Edition integrated development environments for Visual C# 2010, Visual Basic 2010, Visual C++ 2010, Visual Web Developer 2010 and SQL Server 2008. The latest versions of these tools are also downloadable from www.microsoft.com/express. The Express Editions are fully functional, and there’s no time limit for using the software. We discuss the setup of this software shortly. You do not need Visual Basic or Visual C++ for use with this book.

Hardware and Software Requirements for the Visual Studio 2010 Express Editions

To install and run the Visual Studio 2010 Express Editions, ensure that your system meets the minimum requirements specified at:

http://www.microsoft.com/express/support/default.aspx

Desktop Theme Settings for Windows 7 Users

If you are using Windows 7, we assume that your theme is set to Windows 7. Follow these steps to set Windows 7 as your desktop theme:

  1. Right click the desktop, then click Personalize.

  2. Select the Windows 7 theme.

Desktop Theme Settings for Windows Vista Users

If you are using Windows Vista, we assume that your theme is set to Windows Vista. Follow these steps to set Windows Vista as your desktop theme:

  1. Right click the desktop, then click Personalize.

  2. Click the Theme item. Select Windows Vista from the Theme: drop-down list.

  3. Click Apply to save the settings.

Desktop Theme Settings for Windows XP Users

If you are using Windows XP, the windows you see on the screen will look slightly different from the screen captures in the book. We assume that your theme is set to Windows XP. Follow these steps to set Windows XP as your desktop theme:

  1. Right click the desktop, then click Properties.

  2. Click the Themes tab. Select Windows XP from the Theme: drop-down list.

  3. Click OK to save the settings.

Viewing File Extensions

Several screenshots in Visual C# 2010 How to Program, 4/e display file names with filename extensions (e.g., .txt, .cs or .png). Your system’s settings may need to be adjusted to display file-name extensions. Follow these steps to configure your computer:

  1. In the Start menu, select All Programs, then Accessories, then Windows Explorer.

  2. In Windows 7 and Windows Vista, press Alt to display the menu bar, then select Folder Options... from Windows Explorer’s Tools menu. In Windows XP, simply select Folder Options... from Windows Explorer’s Tools menu.

  3. In the dialog that appears, select the View tab.

  4. In the Advanced settings: pane, uncheck the box to the left of the text Hide extensions for known file types. [Note: If this item is already unchecked, no action needs to be taken.]

  5. Click OK to apply the setting and close the dialog.

Notes to Windows XP Users Regarding the Segoe UI Font Used in Many Applications

To make user interfaces more readable, Microsoft recommends using the Segoe UI font in Windows 7 and Windows Vista. This font is not available by default on Windows XP, but it is installed with the following software products: Windows Live Messenger, Windows Live Mail, Microsoft Office 2007 and Microsoft Office 2010. You can download Windows Live Messenger from explore.live.com/windows-live-messenger. You can downloadS Windows Live Mail from explore.live.com/windows-live-mail.

You must also enable ClearType on your system; otherwise, the font will not display correctly. ClearType is a technology for smoothing the edges of fonts displayed on the screen. To enable ClearType, perform the following steps:

  1. Right click your desktop and select Properties... from the popup menu to view the Display Properties dialog.

  2. In the dialog, click the Appearance tab, then click the Effects... button to display the Effects dialog.

  3. In the Effects dialog, ensure that the Use the following method to smooth edges of screen fonts checkbox is checked, then select ClearType from the combobox below the checkbox.

  4. Click OK to close the Effects dialog. Click OK to close the Display Properties dialog.

Obtaining the Code Examples

The examples for Visual C# 2010 How to Program, 4/e are available for download at

www.deitel.com/books/vcsharp2010htp/

If you’re not already registered at our website, go to www.deitel.com and click the Register link below our logo in the upper-left corner of the page. Fill in your information. There’s no charge to register, and we do not share your information with anyone. We send you only account-management e-mails unless you register separately for our free e-mail newsletter at www.deitel.com/newsletter/subscribe.html. You must enter a valid email address. After registering, you’ll receive a confirmation e-mail with your verification code. Click the link in the confirmation email to go to www.deitel.com and sign in.

Next, go to www.deitel.com/books/vcsharp2010htp/. Click the Examples link to download the Examples.zip file to your computer. Write down the location where you choose to save the file on your computer.

We assume the examples are located at C:Examples on your computer. Extract the contents of Examples.zip using a tool such as WinZip (www.winzip.com) or the built-in capabilities of Windows.

Installing the Software

Before you can run the applications in Visual C# 2010 How to Program, 4/e or build your own applications, you must install a development environment. We used Microsoft’s free Visual C# 2010 Express Edition in the examples for most chapters and Visual Web Developer 2010 Express Edition for Chapters 19 and 27–29. Chapters 18, 27 and 28 also require SQL Server Express Edition. To install the Visual C# 2010 and Visual Web Developer 2010 Express Editions:

  1. Insert the DVD that accompanies this book into your computer’s DVD drive to launch the software installer. If the Visual Studio 2010 Express Setup window does not appear, use Windows Explorer to view the contents of the DVD drive and double click Setup.hta to launch the installer

  2. In the Visual Studio 2010 Express Setup window, click Visual C# 2010 Express to display the Visual C# 2010 Express Setup window, then click Next >.

  3. Carefully read the license agreement. Click the I have read and accept the license terms radio button to agree to the terms, then click Next >. [Note: If you do not accept the license agreement, the software will not install and you will not be able to create or execute Visual C# applications.]

  4. Select the MSDN Express Library for Visual Studio 2010, Microsoft SQL Server 2008 Express Edition (x86) and Microsoft Silverlight Runtime options to install. Click Next >. [Note: Installing the MSDN documentation is not required but is highly recommended.]

  5. Click Next >, then click Finish > to continue with the installation. The installer will now begin copying the files required by Visual C# 2010 Express Edition and SQL Server 2008 Express Edition. Wait for the installation to complete before proceeding—the installation process can be quite lengthy and might require you to reboot your computer. When the installation completes, click Exit.

  6. In the Visual Studio 2010 Express Setup window, click Visual Web Developer 2010 Express to display the Visual Web Developer 2010 Express Setup window, then click Next >.

  7. Carefully read the license agreement. Click the I have read and accept the license terms radio button to agree to the terms, then click Next >. [Note: If you do not accept the license agreement, the software will not install and you will not be able to create or execute web applications with Visual Web Developer.]

  8. Click Install > to continue with the installation. The installer will now begin copying the files required by Visual Web Developer 2010 Express Edition. This portion of the install process should be much faster, since you’ve already installed most of the supporting software and files required by Visual Web Developer. When the installation completes, click Exit.

Miscellaneous Notes

  • Some people like to change the workspace layout in the development tools. You can return the tools to their default layouts by selecting Window > Reset Window Layout.

  • There are differences between the full Visual Studio 2010 products and the Express Edition products we use in this book, such as additional menu items. One key difference is that the Database Explorer we refer to in Chapters 18, 27 and 28 is called the Server Explorer in the full Visual Studio 2010 products.

  • Many of the menu items we use in the book have corresponding icons shown with each menu item in the menus. Many of the icons also appear on one of the toolbars at the top of the development environment. As you become familiar with these icons, you can use the toolbars to help speed up your development time. Similarly, many of the menu items have keyboard shortcuts (also shown with each menu item in the menus) for accessing commands quickly.

You are now ready to begin your Visual C# studies with Visual C# 2010 How to Program, 4/e. We hope you enjoy the book!

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

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