Danh mục

Bài giảng Lập trình trên Windows với Microsoft® .NET: Bài 8 - Hồ Hoàn Kiếm

Số trang: 14      Loại file: ppt      Dung lượng: 1.59 MB      Lượt xem: 10      Lượt tải: 0    
Jamona

Hỗ trợ phí lưu trữ khi tải xuống: 5,000 VND Tải xuống file đầy đủ (14 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Bài giảng Lập trình trên Windows với Microsoft® .NET: Bài 8 của Hồ Hoàn Kiếm sau đây giới thiệu tới các bạn những nội dung về SDI Application; MDI Application; Main Menu; Context Menu; ToolBar; Form Level and Control Level Validations; Types of Errors; Exception Handling.
Nội dung trích xuất từ tài liệu:
Bài giảng Lập trình trên Windows với Microsoft® .NET: Bài 8 - Hồ Hoàn KiếmLậptrìnhtrênWindows vớiMicrosoft® .NET Giảng viên : Hồ Hoàn KiếmSDI Application SDI (1) New Document An SDI application can have only one active window at a timeMDI Application MDI (2) OuterWindow (or) ParentWindow InnerWindow (or) ChildWindowMDI Application Designing an MDI application IsMdiContainer = trueMDI Application Activating and Deactivating Windows Deactivate child window Active child windowMDI Application As with the control at runtime As in MDI form during designMain Menu Displays a menu at runtime MainMenu can be created in two ways: Using the MainMenu control, and menu designer at design time Creating an instance of the MainMenu class at runtime MainMenu myMainMenu = new MainMenu(); this.Menu = myMainMenu;Main Menu MenuItems PROPERTIES METHODS Parent PerformClickShortCut Text PerformSelectIndexShowShortCut EVENTS Select Click PopupContext Menu Context menus give users access to frequently used commands by clicking the right mouse button Context menus are created with the help of the ContextMenu controlToolBar It is situated immediately below the menu bar The buttons in a ToolBar are analogous to the items in a menu ToolBarcontroliconas inToolBox Different button appearance options: • DropDownButton • Separator • ToggleButtonForm Level and Control Level Validations Validatedatainallthefieldsintheform EnableandDisablecontrolsbasedon userinput KeyPress KeyDown KeyUpTypes of Errors Errors DescriptionSyntax Error Occurs when we enter an incorrect line of code such as a mistake in typing a keyword, missing punctuation, or an incorrectly specified variable.Run-time Error Occurs when a command attempts to perform an invalid action.Logic Error Occurs when an application executes without syntax errors or run-time errors, but the results are not which were intended.ErrorProvider ControlErrorProvider control can be used todisplay an error icon when the user entersinvalid data. Properties Methods BlinkRate GetError BlinkStyle SetError ContainerControl IconException HandlingExceptions can be handled with the help of :

Tài liệu được xem nhiều: