windows应用程序开发入门到精通 creat top notch user

上传人:xzh****18 文档编号:50468678 上传时间:2018-08-08 格式:PPT 页数:26 大小:172KB
返回 下载 相关 举报
windows应用程序开发入门到精通 creat top notch user_第1页
第1页 / 共26页
windows应用程序开发入门到精通 creat top notch user_第2页
第2页 / 共26页
windows应用程序开发入门到精通 creat top notch user_第3页
第3页 / 共26页
windows应用程序开发入门到精通 creat top notch user_第4页
第4页 / 共26页
windows应用程序开发入门到精通 creat top notch user_第5页
第5页 / 共26页
点击查看更多>>
资源描述

《windows应用程序开发入门到精通 creat top notch user》由会员分享,可在线阅读,更多相关《windows应用程序开发入门到精通 creat top notch user(26页珍藏版)》请在金锄头文库上搜索。

1、Creating Top-Notch User Experiences With Windows Forms in Visual Studio .NET孙巍北京中达金桥科技开发有限公司What we will cover:In this webcast you will see how Microsoft Visual Studio helps you to design and create first-class GUIs.Session PrerequisitesnFamiliarity with the Microsoft Visual Studio .NET integrated d

2、evelopment environment (IDE)nFamiliarity with Microsoft Windows User Interfacesn(Optionally) Session OneAgendanVisually Designing Microsoft Windows FormsnUsing ControlsnDialog FormsnMDI FormsnMenus and Context MenusnCode: Event and DelegatesnValidationVisually Designing Microsoft Windows FormsnRecei

3、ve Requirements from usernAnalyze application flownIdentify Major Functionality ItemsnIdentify DatanCreate Windows Forms ProjectnCreate Main FormnCreate Functionality Forms/Dialog FormsnVisually Drag/Drop appropriate ControlsnWrite Code to Provide FunctionalityDemonstration OnenVisually Designing Mi

4、crosoft Windows FormsUsing ControlsnControls represent items on a form that allow user to manipulate datanThe forms designer allows you to drag and drop controlsnCan set control properties at design time to visually create the GUInCommon controls: TextBox Label ComboBox ListBox Button CheckBox Radio

5、ButtonnOther powerful controls: TreeView ListView TabControl OpenFileDialog SaveDialogUsing Controls to Indicate Common User InteractionsnTrue/False Flag: CheckBoxnSingle Choice: RadioButtons contained in a GroupBoxnSelect from a list: CheckBox, ListBox, ComboBoxnAccept/Cancel: ButtonsDemonstration

6、TwonUsing ControlsDialog FormsnDialog Forms will be shown modally using Form.ShowDialog();nSynchronous block until form is closednClicking OK or Cancel should return different DialogResultDialog FormsnForm.ShowDialog() Method returns a DialogResult enumeration valuenSet forms DialogResult value insi

7、de button click event handlerDemonstration ThreenCreating Dialog FormsMDI FormsnMultiple Document Interface (MDI) forms contain children forms (document/view concept)nNamesake multiple documents (child documents) loaded at one time; one activenChildren can be arranged tiled or stacked with Window me

8、nunAll functionality is provided by Microsoft .NET formsMDI FormsnParent: Form.IsMdiContainer propertynChild: Form.MdiParent propertyDemonstration FournCreating MDI FormsMenus and Context MenusnUse menus to organize functionsnMenu designernAdd code to event hanlersnStandard menus: File Edit HelpnCon

9、text menuMenus and Context MenusnMainMenu controlnContextMenu control and Form.ContextMenu propertyDemonstration FivenMenus and Context MenusEvent-Driven Code: Events and DelegatesnUser clicks buttonnButton invokes delegate for the eventnDelegate calls the bound eventnClick event firesnYour code wri

10、tten in Click event handler runsnDelegates allow multiple events (all matching signatures) to be handled by one methodnDelegates can be multicast: call multiple event handlersEvent Handlers with VBPrivate Sub btGetCustomer_Click( _ ByVal sender As System.Object _ , ByVal e As System.EventArgs) _ Han

11、dles btGetCustomer.ClickYour code goes hereEnd SubEvent Handlers with C#Private void InitializeComponent() . this.btGetCustomer.Click += new System.EventHandler( this.btGetCustomer_Click); . Private void btGetCustomer_Click( object sender, System.EventArgs e) /your code goes here . Demonstration Six

12、nCodeValidationnValidation needs to be performed at the Control and the Form levelnErrorProvider controlnControl.CausesValidation propertynValidating eventnForm level validation done in accept button click eventDemonstration SevennValidationUse Whichever Language You Feel Most Productive WithnThe CL

13、R equalizes functionality of languagesnThere are subtle differences between Microsoft Visual C# and Visual Basic (VB) but theyre really negligible: C# has operator overloading, unsafe code, XML Comments; VB can be more verbosenEditors have slightly different featuresnEnd the disagreement; accept and

14、 embrace other languages for what they arenThe CLR and the framework class libraries are really what you need to learnSession SummarynUsing .NET forms provides for an excellent way to visually create a GUInControls allow you to model a UI using visual elements that are familiar to Windows usersnWriting code is easy with the event- programming model of .NETnValidation is easy to attain with the FrameworknCLR Makes all languages equal

展开阅读全文
相关资源
相关搜索

当前位置:首页 > IT计算机/网络 > 多媒体应用

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号