Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Bạn có thể vị trí của hình thức của bạn trong mã nếu nó là thuận tiện hơn cho bạn để làm như vậy. Bạn vị trí hình thức của bạn trong mã bằng cách nhập vào các đối số this.Location bao gồm các cấu trúc điểm được xây dựng trong. | BUILDING FORMS 10 IDDA I You can position your form in code if it is more convenient for you to do so. You position your form in code by entering the this.Location argument that includes the built-in Point structure. The Point structure identifies the x and y values of the upper corner of your form. Type the following code within the public class Form System.Windows.Forms.Form class. TYPE THIS private void InitializeComponent this.components new System.ComponentModel.Container this.Size new System.Drawing.Size 100 100 this.Text MyForm this.Location new System.Drawing.Point 15 15 RESULT The upper-left corner of the form is placed at 15 pixels from the left and 15 pixels from the top of the screen respectively. L-Q Click to select CenterScreen from the drop-down list. The StartPosition property now displays CenterScreen for its value. 211 C CHANGE FORM PROPERTIES When you create a new form the Properties window contains a list of properties in a table that you can use to change the form properties. Changing form properties let you customize the form to your liking. If you add a control or other feature to a form and click that control or feature then the Properties window will display the properties for that control or feature. The Properties window displays all sorts of information that you can either change or view depending on the property. The Properties window organizes the information into various categories such as Appearance for different appearance attributes such as background color. Those category names can open and close if you click the small expansion retraction button to the left of the category name just as you do when you open directory information in Windows Explorer. Some attributes contain expansion buttons that indicate that you can set attributes within that attribute. When you click the expansion button the subattributes will appear in the table. When you click one of the attributes you can select from a drop-down menu list or enter the value .