Chapter 22. More on Windows Forms Applications

You already know quite a lot about the process of creating Windows Forms applications from CLR Sketcher. In this chapter, you will explore some more controls that you can use in the GUI for a Windows Forms application. You'll do this by assembling a single application incrementally throughout the chapter, so by the end of the chapter you'll have another Windows Forms program of a reasonable size.

In this chapter, you'll learn:

  • How to use a wider variety of controls to build an application GUI

  • How to display a Web page in an application

  • How to work with control containers

  • How to create and display message boxes

Creating the Application GUI

Create a new CLR project using the Windows Forms Application template and assign the name Ex22_01 to the project. You are going to develop Ex22_01 into a program to generate lottery entries. The program won't be an ideal design because it includes controls that duplicate some functions perhaps unnecessarily, but the benefit is that you get to try out various possibilities in a working application. I have chosen two lotteries with which I am familiar and for which the program generates entries; if these don't match the lottery that you favor, you should be able to adjust the example quite easily.

Note

Let me make one point against entering a lottery—you would probably not choose the numbers 1 to 6 as your entry because it is extremely unlikely that such an entry would win. Of course, the truth is that it's just ...

Get Ivor Horton's Beginning Visual C++®2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.