Lesson 1: Adding and configuring Windows Forms Adding Forms to the project Properties of Windows Forms Creating non-rectangular Windows Forms Lesson 2: Managing control layout with container controls | Week 1 Chapter 1: Windows Forms and the User Interface Chapter 2: Configuring Controls Chapter 1: Windows Forms and the User Interface Lesson 1: Adding and configuring Windows Forms Adding Forms to the project Properties of Windows Forms Creating non-rectangular Windows Forms Lesson 2: Managing control layout with container controls Slide Adding Forms to the project At design time To add a new Form: right-click to the project shown in Solution Explorer, select Add\Windows Form To add a existing Form: right-click to the project shown in Solution Explorer, select Add\Existing Item (choose file .cs) At run time Form1 myForm; myForm = new Form1(); (); Chapter 1 - Lesson 1: Adding and configuring Windows Forms Slide Properties of Windows Forms Note: Chapter 1 - Lesson 1: Adding and configuring Windows Forms Slide Opacity /ou'pæsiti/ tính mờ đục Properties of Windows Forms (cont.) AcceptButton property CancelButton Property Chapter 1 - Lesson 1: Adding and configuring Windows Forms Slide Create a non-rectangular form () For advanced visual effects To create a non-rectangular form: In Form_Load event, change the Region property Create a new instance of the GraphicsPath class (in namespace) Create the new Region from it Chapter 1 - Lesson 1: Adding and configuring Windows Forms A GraphicsPath represents a series of connected lines and curves A GraphicsPath may be composed of any number of figures, like ellipse Slide set the FormBorderStyle to None. Example: Create a non-rectangular form GraphicsPath myPath = new GraphicsPath(); // Adds an ellipse to the graphics path that inscribes // the rectangle defined by the form's width and height (0, 0, , ); // Creates a new Region from the GraphicsPath Region myRegion = new Region(myPath); // Sets the form's Region property to the new region = myRegion; Chapter 1 - Lesson 1: Adding and . | Week 1 Chapter 1: Windows Forms and the User Interface Chapter 2: Configuring Controls Chapter 1: Windows Forms and the User Interface Lesson 1: Adding and configuring Windows Forms Adding Forms to the project Properties of Windows Forms Creating non-rectangular Windows Forms Lesson 2: Managing control layout with container controls Slide Adding Forms to the project At design time To add a new Form: right-click to the project shown in Solution Explorer, select Add\Windows Form To add a existing Form: right-click to the project shown in Solution Explorer, select Add\Existing Item (choose file .cs) At run time Form1 myForm; myForm = new Form1(); (); Chapter 1 - Lesson 1: Adding and configuring Windows Forms Slide Properties of Windows Forms Note: Chapter 1 - Lesson 1: Adding and configuring Windows Forms Slide Opacity /ou'pæsiti/ tính mờ đục Properties of Windows Forms (cont.) AcceptButton property CancelButton Property Chapter 1 - .