Lập trình trên windows với microsoft®. net - SDI Application

Displays a menu at runtime  MainMenu can be created in two ways: Using the MainMenu control, and menu designer at design time

pdf14 trang | Chia sẻ: nguyenlam99 | Lượt xem: 863 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Lập trình trên windows với microsoft®. net - SDI Application, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
Lập trình trên Windows với Microsoft® .NET Giảng viên: ThS. Trần Bá Nhiệm SDI Application SDI (1) New Document An SDI application can have only one active window at a time MDI Application MDI (2) Inner Window (or) Child Window Outer Window (or) Parent Window MDI Application Designing an MDI application IsMdiContainer = true MDI Application Activating and Deactivating Windows Deactivate child window Active child window MDI Application As in MDI form during design As with the control at runtime Main 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 PROPERTIES EVENTS METHODS Index ShowShortCut MenuItems Context Menu  Các Context menu cho phép người dùng truy cập vào các lệnh thường dùng bằng cách click chuột phải  Các Context menu được tạo ra với help của ContextMenu control ToolBar  Thường nằm ngay bên dưới thanh menu  Các nút lệnh trong ToolBar tương đương với các item trong menu Các tùy chọn xuất hiện khác: • DropDownButton • Separator • ToggleButton ToolBar control icon as in ToolBox Form Level & Control Level Validations Kiểm tra dữ liệu trong tất cả các fields trên form Enable và Disable các controls dựa trên dữ liệu người dùng nhập KeyPress KeyDown KeyUp Lỗi Mô tả Syntax Error Xảy ra khi nhập vào các dòng mã lệnh bị sai từ khóa, thiếu dấu chấm câu, sai tên biến Run-time Error Xảy ra khi một lệnh thử thực hiện một hành động không hợp lệ Logic Error Xảy ra khi một ứng dụng thực thi không có lỗi cú pháp syntax errors hoặc run-time error nhưng kết quả không như mong muốn Các kiểu thông báo lỗi ErrorProvider Control Properties Methods BlinkRate GetError BlinkStyle SetError ContainerControl Icon ErrorProvider control có thể được dùng để hiển thị một error icon khi người dùng nhập vào giá trị không hợp lệ. Exception Handling Exceptions có thể được quản lý với sự hỗ trợ của:

Các file đính kèm theo tài liệu này:

  • pdfc_co_ban_8_0053.pdf
Tài liệu liên quan