Date post: | 03-Jan-2016 |
Category: |
Documents |
Upload: | brent-rodgers |
View: | 223 times |
Download: | 0 times |
Create WindowsCreate Windows®® Applications with .NETApplications with .NET
Carlotta Eaton (www.nr.vccs.edu/eaton)Carlotta Eaton (www.nr.vccs.edu/eaton)
Associate Professor of ISTAssociate Professor of IST
New River Community CollegeNew River Community College
Slides by MicrosoftSlides by Microsoft
Modified by Carlotta EatonModified by Carlotta Eaton
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
Level 200Level 200
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
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
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
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
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
For More Information…For More Information…
MSDN Web site at MSDN Web site at msdn.microsoft.commsdn.microsoft.com
MicrosoftMicrosoft®® Official Curricula (MOC) Official Curricula (MOC) Course 2350Course 2350
Securing and Deploying .NET AssembliesSecuring and Deploying .NET Assemblies Course 2145Course 2145
Programming the .NET Framework with Programming the .NET Framework with Visual Basic .NETVisual Basic .NET
Microsoft PressMicrosoft Press®®
Introduction to the .NET FrameworkIntroduction to the .NET Framework
MSDNMSDNEssential Resources for DevelopersEssential Resources for Developers
Training & Training & EventsEvents
MSDN Training, Tech-Ed, PDC, MSDN Training, Tech-Ed, PDC, Developer Days, MSDN/Onsite EventsDeveloper Days, MSDN/Onsite Events
Subscription Subscription ServicesServices
OnlineOnlineInformationInformation
MembershipMembershipProgramsPrograms
Print Print PublicationsPublications
Library, Professional, UniversalLibrary, Professional, UniversalDelivered via CD-ROM, DVD, WebDelivered via CD-ROM, DVD, Web
MSDN Online, MSDN FlashMSDN Online, MSDN Flash
MSDN User GroupsMSDN User Groups
MSDN MagazineMSDN MagazineMSDN NewsMSDN News
Building Windows Building Windows Forms ApplicationsForms Applications
Questions And AnswersQuestions And Answers