Create Windows ® Applications with.NET Allan Knudsen.NET Developer Evangelist Microsoft.
-
date post
21-Dec-2015 -
Category
Documents
-
view
218 -
download
0
Transcript of Create Windows ® Applications with.NET Allan Knudsen.NET Developer Evangelist Microsoft.
Create WindowsCreate Windows®® Applications with .NETApplications with .NET
Allan KnudsenAllan Knudsen
.NET Developer Evangelist.NET Developer Evangelist
MicrosoftMicrosoft
AgendaAgenda
Windows Forms OverviewWindows Forms Overview Graphical EnhancementsGraphical Enhancements Browser IntegrationBrowser Integration Auto-Deployment Auto-Deployment
Session PrerequisitesSession Prerequisites Experience with Visual BasicExperience with Visual Basic®® 6.0, 6.0,
Visual Basic .NET, Visual C#Visual Basic .NET, Visual C#™™ or or Visual C++Visual C++®®
Experience developing Desktop Experience developing Desktop ApplicationsApplications
AgendaAgenda Windows Forms OverviewWindows Forms Overview Graphical EnhancementsGraphical Enhancements Browser IntegrationBrowser Integration Auto-Deployment Auto-Deployment
Windows FormsWindows FormsIntroductionIntroduction
A framework for building Windows applications A framework for building Windows applications that takes advantage of all the power of .NET that takes advantage of all the power of .NET Framework and the Win32Framework and the Win32®® API API
An architecture for controls and containersAn architecture for controls and containers RAD design time experience - integrated RAD design time experience - integrated
designer supportdesigner support .NET Framework built with design-time in mind.NET Framework built with design-time in mind Design-time built using .NET Framework: Design-time built using .NET Framework:
Visual StudioVisual Studio®® .NET Property Browser, .NET Property Browser, Server Explorer, Windows Forms DesignerServer Explorer, Windows Forms Designer
No more hiding of Form Designer CodeNo more hiding of Form Designer Code
Windows FormsWindows FormsDocking and AnchoringDocking and AnchoringAnchoringAnchoring
When a Form is resized the controls on the When a Form is resized the controls on the form automatically resize and maintain form automatically resize and maintain positionposition
Allows you to anchor againstAllows you to anchor against Top and Left, Top and Right, All Corners, Etc.Top and Left, Top and Right, All Corners, Etc.
DockingDocking Allows you to set the side of it’s container a Allows you to set the side of it’s container a
control is attached tocontrol is attached to
Windows FormsWindows FormsInheritanceInheritance
Allows you to create one form based on Allows you to create one form based on the properties, etc of anotherthe properties, etc of another
Ability to Ability to Add InheritedAdd Inherited forms within the forms within the designerdesigner Allows you to pick the form from which you Allows you to pick the form from which you
want to inheritwant to inherit
Can specify a form in codeCan specify a form in code public class Form2 : winapp2.Form1public class Form2 : winapp2.Form1
Building Windows Building Windows Forms Applications Forms Applications Demonstration #1Demonstration #1
AgendaAgenda Windows Forms OverviewWindows Forms Overview Graphical EnhancementsGraphical Enhancements Browser IntegrationBrowser Integration Auto-Deployment Auto-Deployment
Graphical EnhancementsGraphical EnhancementsFeaturesFeatures
Rich set of controlsRich set of controls Advanced graphics support – GDI+Advanced graphics support – GDI+
TransparencyTransparency Non-Rectangular WindowsNon-Rectangular Windows
Supports both Flat (Office XP) and 3D style Supports both Flat (Office XP) and 3D style control stylescontrol styles
Advanced layout Advanced layout Printing supportPrinting support Extensible:Extensible:
Extend and enhance controls and frameworkExtend and enhance controls and framework Easy to add design time behaviorEasy to add design time behavior Drop into Win32Drop into Win32
Using GDI+ from Using GDI+ from Visual Basic .NETVisual Basic .NETDemonstration #2Demonstration #2
AgendaAgenda Windows Forms OverviewWindows Forms Overview Graphical EnhancementsGraphical Enhancements Browser IntegrationBrowser Integration Auto-Deployment Auto-Deployment
Browser IntegrationBrowser IntegrationBasicsBasics
Create the Windows Forms ControlsCreate the Windows Forms Controls Create an HTML document with an Create an HTML document with an
<object> tag<object> tag <object id=“SimpleControl” <object id=“SimpleControl”
classid=“http://localhost/myControls/classid=“http://localhost/myControls/myControl.dll#MyControlNamespace.myControl.dll#MyControlNamespace.MyControlClass>MyControlClass>
Create the Virtual Directory and Set Create the Virtual Directory and Set PermissionsPermissions
Browser IntegrationBrowser IntegrationSmart ClientSmart Client
““No Touch” deploymentNo Touch” deployment Application isolation is the defaultApplication isolation is the default No registration requiredNo registration required Versioning – no side effectsVersioning – no side effects Web-based deploymentWeb-based deployment
SecureSecure Safe to run downloaded codeSafe to run downloaded code
Browser IntegrationBrowser IntegrationSecuritySecurity Code access security makes Code access security makes
Windows Forms controls safeWindows Forms controls safe Execution controlled by:Execution controlled by:
PermissionsPermissions Permission Sets Permission Sets Code Groups (Zones)Code Groups (Zones) Code groups have permission setsCode groups have permission sets
Browser IntegrationBrowser IntegrationHosting ControlsHosting Controls
Controls can be hosted Internet Explorer 5.5 Controls can be hosted Internet Explorer 5.5 or aboveor above
Low impact Low impact No installation, registration or GUIDsNo installation, registration or GUIDs
Secure Secure Code access security prevents harmCode access security prevents harm No Internet Explorer security dialogs!No Internet Explorer security dialogs!
Lightweight Lightweight “ “Hello World” ~ 3.5KHello World” ~ 3.5K
Easily deployedEasily deployed Dependent components download automaticallyDependent components download automatically
Browser IntegrationBrowser IntegrationControls in the BrowserControls in the Browser
Web ServerWeb Server
Web Web ServerServer
Assembly Assembly CacheCache
HTTPHTTP
Chart.htmlChart.html
ChartEngine.DLLChartEngine.DLLCustomizer.DLLCustomizer.DLL
ClientClient
HTTPHTTP
Internet Explorer 5.5Internet Explorer 5.5
Charting.DLLCharting.DLL
Controls in the Controls in the BrowserBrowserDemonstration #3Demonstration #3
AgendaAgenda Windows Forms OverviewWindows Forms Overview Graphical EnhancementsGraphical Enhancements Browser IntegrationBrowser Integration Auto-DeploymentAuto-Deployment
Auto-DeploymentAuto-Deployment Smart ClientSmart Client
Dependent components download Dependent components download automaticallyautomatically Application “trickles” onto the clientApplication “trickles” onto the client
No installation No installation Use Assembly.LoadFromUse Assembly.LoadFrom
Stored in the Download cacheStored in the Download cache Only downloaded when updatedOnly downloaded when updated
Auto DeploymentAuto Deployment
Web ServerWeb Server
Web Web ServerServer
Assembly Assembly CacheCache
HTTPHTTP
Smart ClientSmart Client
Windows Forms AppWindows Forms App
Form1Form1
Form2Form2
Auto-DeploymentAuto-DeploymentDemonstration #4Demonstration #4
Session SummarySession Summary
Windows Forms controls are secure, Windows Forms controls are secure, lightweight, and support hosting lightweight, and support hosting on Web pageson Web pages
Windows Forms applications are easy Windows Forms applications are easy to write and deployto write and deploy