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

Lập trình trên Windows  
với Microsoft® .NET  
Giảng viên : Hồ Hoàn Kiếm  
SDI Application  
SDI (1)  
N
Document  
An SDI  
application can  
have only one  
active window  
at a time  
MDI Application  
MDI (2)  
Outer Window  
(or)  
Parent  
Window  
Inner Window  
(or)  
Child Window  
MDI Application  
Designing an MDI application  
IsMdiContainer = true  
MDI Application  
Activating and Deactivating Windows  
Deactivate  
child  
window  
Active  
child  
window  
MDI Application  
As with the control  
at runtime  
As in MDI form  
during design  
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  
MenuItems  
METHODS  
PROPERTIES  
Index  
ShowShortCut  
EVENTS  
Context 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 control  
ToolBar  
◼ It is situated immediately below the menu bar  
◼ 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  
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  
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  
Logic Error  
Occurs when a command attempts to perform an invalid  
action.  
Occurs when an application executes without syntax  
errors or run-time errors, but the results are not which  
were intended.  
ErrorProvider Control  
ErrorProvider control can be used to  
display an error icon when the user enters  
invalid data.  
Properties  
BlinkRate  
Methods  
GetError  
SetError  
BlinkStyle  
ContainerControl  
Icon  
Exception Handling  
Exceptions can be handled with the help of :  
ppt 14 trang Thùy Anh 18760 Free
Bạn đang xem tài liệu "Bài giảng Lập trình trên Windows với Microsoft.NET - Bài 8: SDI application - Hồ Hoàn Kiếm", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pptbai_giang_lap_trinh_tren_windows_voi_microsoft_net_bai_8_sdi.ppt