TAILIEUCHUNG - Manning Windows Forms Programming (phần 7)

Tham khảo tài liệu 'manning windows forms programming (phần 7)', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | This ensures that any new objects added to the project will be created with this namespace. With this change in place we can create our base form. Here we will just create the form and its controls. Later in this section we will create some infrastructure that will be useful in our derived forms later in the chapter. Create the BaseEditDlg form Action Result 2 Add a new Form to the MyPhotoAlbum project called BaseEditDlg 3 Add the three buttons to the form. Assign their settings and position as shown. Settings Button OK Reset Cancel Property Name DialogResult Text Name Text Name DialogResult Text Value btnOk OK OK btnReset Reset btnCancel Cancel Cancel The new class appears in the Solution Explorer window and the Design window is displayed. 4 Add a Panel to the top of the form. Settings Property BorderStyle Modifiers Value FixedSingle Protected Note The Modifiers property used here establishes the accessibility level of the control. The three buttons use the default setting of Private. The Protected setting creates a protected control so that it can be modified in subclasses. 266 chapter 9 Basic controls 5 Create the BaseEditDlg form continued Action Result Set the properties for the BaseEditDlg form to make it a dialog box. Settings Property AcceptButton CancelButton FormBorderStyle MaximizeBox MinimizeBox ShowInTaskBar Size Value btnOk btnCancel FixedDialog False False False 300 320 The code generated here is similar to code we have seen for other forms in our application. The one exception is the panell control. The three buttons are defined as private controls as have all the controls we created in earlier chapters. The panell object is a protected control. As we shall see this will allow our child forms to modify the settings of this panel and in particular change its size to accommodate the desired collection of controls. namespace summary Base form window. summary public class BaseEditDlg private

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.