C# for Java Programmers

Chapter 12: Creating User Interfaces with Windows Forms

Introduction

In this book so far, all the example codes you have seen are console-based applications. This might have been great in the good old days of DOS, but for today s programs you might like a richer user interface. In this chapter you will broaden your C# arsenal by learning how to implement a graphical user interface (GUI) using Windows Forms.

Java provided us with the Abstract Windowing Tool (AWT), and then later, with Swing for creating platform-independent GUIs. The .NET Framework followed Java s lead by providing a more unified programming model similar to Swing. However, unlike Swing it is not platform independent. A Windows Form is a tool for building Windows applications, and is built specifically for the Windows platform.

In this chapter we will look at some of the classes found in the System.Windows.Forms namespace. You will learn how to create Windows applications by looking at some of the basic controls and event handling. To wrap up the chapter you will learn about rapid application development using Visual Studio.NET.

Windows Form Classes

Direct, integrated support in Windows classes makes it very easy to create forms in the .NET environment. In Java, GUI forms are often developed using AWT/Swing. In the .NET environment, GUI forms are a part of the Windows.Forms class. Thus creating forms in the .NET environment is much more convenient than doing so in Java. In addition, just as What You See Is What You Get (WYSIWYG) Integrated Development Environments (IDEs) (like SUN s Forte)...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Integrated Development Environment (IDE)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.