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

ppt 14 trang huongle 7370
Bạn đang xem tài liệu "Bài giảng Lập trình trên Windows với Microsoft® .NET - MDI Application - Hồ Hoàn Kiếm", để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên

Tài liệu đính kèm:

  • pptbai_giang_lap_trinh_tren_windows_voi_microsoft_net_mdi_appli.ppt

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

  1. Lập trỡnh trờn Windows với Microsoftđ .NET Giảng viờn : Hồ Hoàn Kiếm
  2. SDI Application SDI (1) New Document An SDI application can have only one active window at a time
  3. MDI Application MDI (2) Outer Window (or) Parent Window Inner Window (or) Child Window
  4. MDI Application Designing an MDI application IsMdiContainer = true
  5. MDI Application Activating and Deactivating Windows Deactivate child window Active child window
  6. MDI Application As with the control at runtime As in MDI form during design
  7. Main Menu n Displays a menu at runtime n 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;
  8. Main Menu MenuItems PROPERTIES METHODS Parent PerformClick ShortCut Text PerformSelect Index ShowShortCut EVENTS Select Click Popup
  9. Context Menu n Context menus give users access to frequently used commands by clicking the right mouse button n Context menus are created with the help of the ContextMenu control
  10. ToolBar n It is situated immediately below the menu bar n The buttons in a ToolBar are analogous to the items in a menu ToolBar control icon as in ToolBox Đ Different button appearance options: • DropDownButton • Separator • ToggleButton
  11. Form Level and Control Level Validations ĐValidate data in all the fields in the form ĐEnable and Disable controls based on user input ĐKeyPress ĐKeyDown ĐKeyUp
  12. Types of Errors Errors Description Syntax 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.
  13. ErrorProvider Control ErrorProvider control can be used to display an error icon when the user enters invalid data. Properties Methods BlinkRate GetError BlinkStyle SetError ContainerControl Icon
  14. Exception Handling Exceptions can be handled with the help of :