tailieunhanh - Ivor Horton’s BeginningVisual C++ 2008 phần 10
nó giả định rằng các đối số thông qua tọa độ hợp lý. Chức năng là một thành viên của lớp CDC xác định một bối cảnh thiết bị, và bối cảnh thiết bị có hệ thống riêng của mình trong những tọa độ hợp lý. Chế độ lập bản đồ, mà là một tài sản của bối cảnh thiết bị, xác định những gì các đơn vị đo lường là tọa độ khi bạn vẽ một cái gì đó | 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. Chapter 22 More on Windows Forms Applications 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 as likely as any other more random-looking set of numbers you might choose but the numbers 1 to 6 have never come up as the winning entry in any lottery anywhere. So you can conclude that whatever you choose you lose. First display the Properties window for the form and change the value of its Text property to A Winning Application. To display the controls that are available for use with the form press Ctrl Alt X or select the View Toolbox menu item. Add
đang nạp các trang xem trước