Moving to Microsoft ®  Visual Basic ®  .NET Patrick McGowen Developer Evangelist Microsoft ®  Corporation
What we will cover <ul><li>Microsoft ®  Visual Basic ®  .NET </li></ul><ul><li>Windows Forms </li></ul><ul><li>Upgrading f...
Session Prerequisites <ul><li>Experience with Visual Basic </li></ul><ul><li>Experience building Microsoft ®  Windows ®  a...
Why Do This Presentation? <ul><li>.NET changes everything </li></ul><ul><li>Upgrading is an involved process </li></ul>
Demonstrations <ul><li>Overview of Key Visual Basic .NET Changes </li></ul><ul><li>Using the Upgrade Wizard </li></ul>
Demonstrations <ul><li>Overview of Key Visual Basic .NET Changes </li></ul><ul><li>Implementing Drag-and-Drop Operations <...
Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrad...
An Overview of Visual Basic .NET Not just Visual Basic 6 + 1 <ul><li>Designed for the .NET Framework </li></ul><ul><ul><li...
An Overview of Visual Basic .NET   CLR: Key features <ul><li>Cross-language interoperability </li></ul><ul><li>Shared type...
An Overview of Visual Basic .NET   Updated language: New features <ul><li>Fully object-oriented </li></ul><ul><ul><li>Impl...
An Overview of Visual Basic .NET   Updated language: Key changes <ul><li>MessageBox.Show(“Hello World”) </li></ul><ul><li>...
An Overview of Visual Basic .NET  Updated language: Cleaned up <ul><li>Handled by the Upgrade Wizard, but don’t use </li><...
An Overview of Visual Basic .NET  Updated language: Data type changes <ul><li>Currency replaced by Decimal data type </li>...
An Overview of Visual Basic .NET   New IDE: Microsoft ®  Visual Studio ®  .NET <ul><li>All languages share Devenv.exe </li...
<ul><li>Bottom Line: It’s still Visual Basic </li></ul><ul><li>Only executes within the CLR </li></ul><ul><li>RAD for both...
Demonstration 1 Key Visual Basic .NET Changes  Form Layout Structured Exception Handling Inheritance
Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrad...
Developing Windows Apps The New World of Windows Forms <ul><li>Windows Forms as .NET classes </li></ul><ul><li>Dim frm As ...
Developing Windows Apps New RAD features in Visual Studio .NET <ul><li>Property changes reflected directly in the code </l...
Developing Windows Apps   Some new or greatly improved controls <ul><li>LinkLabel, NotifyIcon </li></ul><ul><li>MainMenu, ...
Developing Windows Apps   Retired or Replaced Controls <ul><li>Spinner </li></ul><ul><li>Line and Shape </li></ul><ul><li>...
Developing Windows Apps Changes to Mouse Events <ul><li>New mouse events: </li></ul><ul><ul><li>MouseEnter, MouseHover, Mo...
Developing Windows Apps Working with Drag-and-Drop <ul><li>Between controls same as between applications </li></ul><ul><li...
Developing Windows Apps Implementing Drag-and-Drop DoDragDrop() MouseDown DragEnter DragDrop e.Effect e.Data.GetData() Tar...
Demonstration 2 Drag-and-Drop Between TextBox Controls Between TreeView Controls Between PictureBox Controls
Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrad...
Upgrade Considerations Upgrade options <ul><li>Don’t upgrade </li></ul><ul><li>Partial upgrade, use COM interop </li></ul>...
Upgrade Considerations Evaluating the Benefits <ul><li>Truly add value? </li></ul><ul><li>Top 3 reasons to upgrade </li></...
Upgrade Considerations Evaluating the cost <ul><li>Can I use the Upgrade Wizard? </li></ul><ul><li>Size and Complexity </l...
Upgrade Considerations Evaluating the cost (ctd) <ul><li>Non-upgradeable technologies </li></ul>Leave; can work with .NET ...
Prepare for the upgrade Suggested Upgrade Plan <ul><li>Break app into separate projects </li></ul><ul><li>Determine depend...
Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrad...
Using the Upgrade Wizard No Side-by-Side Issues <ul><li>IDEs can be installed on same machine </li></ul><ul><li>Separate d...
Using the Upgrade Wizard Wizard Philosophy <ul><li>It’s your code </li></ul><ul><ul><li>Should be recognizable </li></ul><...
Using the Upgrade Wizard Wizard Methodology
Using the Upgrade Wizard Wizard Methodology - NOTES
Using the Upgrade Wizard _UpgradeReport.htm
Using the Upgrade Wizard EWI Comments <ul><li>Appear In </li></ul><ul><ul><li>Upgrade Report </li></ul></ul><ul><ul><li>Co...
Using the Upgrade Wizard EWI Comments - NOTES <ul><li>Appear In </li></ul><ul><ul><li>Upgrade Report </li></ul></ul><ul><u...
Using the Upgrade Wizard Upgrade Issue Help Files
Using the Upgrade Wizard Errors not caught <ul><li>Dim x As New y </li></ul><ul><li>Some type conversions </li></ul><ul><l...
Demonstration 2 Using the  Upgrade Wizard View the Project in the Visual Basic 6 IDE Upgrade the Project Fix build errors ...
Session Summary <ul><li>Visual Basic .NET is not just  Visual Basic 6 + 1 </li></ul><ul><li>Use the Upgrade Wizard to Asse...
For More Information… <ul><li>Preparing Your Visual Basic 6.0 Applications for the Upgrade to Visual Basic .NET </li></ul>...
For More Information… <ul><li>Introduction to Visual Basic .NET for Visual Basic Veterans </li></ul><ul><li>Upgrading Appl...
MSDN Essential Resources for Developers Training & Events MSDN Webcasts, MSDN Online Seminars, Tech-Ed, PDC, Developer Day...
How-To Resources Simple, Step-By-Step Procedures <ul><li>Embedded Development How-to Resources </li></ul><ul><li>General H...
MSDN Webcasts Interactive, Live Online Event <ul><li>Interactive, Synchronous, Live Online Event </li></ul><ul><li>Discuss...
MSDN Subscriptions  THE way to get Visual Studio .NET Visual Studio .NET MSDN Subscriptions NEW <ul><li>Professional </li>...
Where Can I Get MSDN? <ul><li>Visit MSDN Online at msdn.microsoft.com </li></ul><ul><li>Register for the MSDN Flash Email ...
MS Press Essential Resources for Developers <ul><li>Upgrading Microsoft Visual Basic 6 to Microsoft Visual Basic .NET </li...
Become A Microsoft Certified Solution Developer <ul><li>What Is MCSD? </li></ul><ul><ul><li>Premium certification for prof...
Training Training Resources for Developers <ul><li>Course Title:   </li></ul><ul><ul><li>Course Number: </li></ul></ul><ul...
 
Session Credits <ul><li>Author: Sean Campbell </li></ul><ul><li>Producer/Editor: Field Content Team </li></ul><ul><li>Revi...
An Overview of Visual Basic .NET  Updated language: Key changes (ctd) <ul><li>Single Property declarations: </li></ul><ul>...
An Overview of Visual Basic .NET  Updated language: Key changes (ctd) <ul><li>Block-level scoping </li></ul><ul><li>Dim Is...
Developing Windows Apps   The Form Object Hierarchy Object MarshalByRefObject Component Control ScrollableControl Containe...
Developing Windows Apps   The Form Object Hierarchy - NOTES Object MarshalByRefObject Component Control ScrollableControl ...
Developing Windows Apps   Visual Basic .NET Controls: Some Changes <ul><li>Control arrays replaced by controls collections...
Upgrade Considerations Evaluating the cost (ctd) <ul><li>Other time-consuming upgrade items </li></ul><ul><ul><li>Games </...
Upgrade Considerations Decision making process (ctd) Are there benefits to upgrading? Don’t upgrade No Yes Is it worth the...
Prepare for the upgrade Code cleanup suggestions <ul><li>Obsolete language elements </li></ul><ul><li>DAO/RDO data binding...
Prepare for the upgrade Code cleanup suggestions - NOTES <ul><li>Obsolete language elements </li></ul><ul><li>DAO/RDO data...
Using the Upgrade Wizard Starting the upgrade <ul><li>Break Project Group into Projects </li></ul><ul><li>Open a valid Vis...
Upcoming SlideShare
Loading in...5
×

Moving to Microsoft Visual Basic .NET

6,666

Published on

Moving to Microsoft Visual Basic .NET

Published in: Technology
1 Comment
7 Likes
Statistics
Notes
No Downloads
Views
Total Views
6,666
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
1
Likes
7
Embeds 0
No embeds

No notes for slide
  • KEY MESSAGE: Opening slide. SLIDE BUILDS: None SLIDE SCRIPT: Hello and Welcome to this MSDN session on Moving to Visual Basic .NET. My name is {insert name} [Do not use the term FIELDCONTENT] SLIDE TRANSITION: This session will cover the following topics. ADDITIONAL INFORMATION FOR PRESENTER:
  • Transcript of "Moving to Microsoft Visual Basic .NET"

    1. 1. Moving to Microsoft ® Visual Basic ® .NET Patrick McGowen Developer Evangelist Microsoft ® Corporation
    2. 2. What we will cover <ul><li>Microsoft ® Visual Basic ® .NET </li></ul><ul><li>Windows Forms </li></ul><ul><li>Upgrading from Visual Basic 6 </li></ul>
    3. 3. Session Prerequisites <ul><li>Experience with Visual Basic </li></ul><ul><li>Experience building Microsoft ® Windows ® applications </li></ul>Level 200
    4. 4. Why Do This Presentation? <ul><li>.NET changes everything </li></ul><ul><li>Upgrading is an involved process </li></ul>
    5. 5. Demonstrations <ul><li>Overview of Key Visual Basic .NET Changes </li></ul><ul><li>Using the Upgrade Wizard </li></ul>
    6. 6. Demonstrations <ul><li>Overview of Key Visual Basic .NET Changes </li></ul><ul><li>Implementing Drag-and-Drop Operations </li></ul><ul><li>Using the Upgrade Wizard </li></ul>
    7. 7. Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrade Considerations </li></ul><ul><li>Upgrade Wizard </li></ul>
    8. 8. An Overview of Visual Basic .NET Not just Visual Basic 6 + 1 <ul><li>Designed for the .NET Framework </li></ul><ul><ul><li>Common Language Runtime (mscoree.dll) </li></ul></ul><ul><ul><li>Base Class Library (mscorlib.dll + others) </li></ul></ul><ul><li>Syntax modernized and cleaned up </li></ul><ul><li>New IDE </li></ul>
    9. 9. An Overview of Visual Basic .NET CLR: Key features <ul><li>Cross-language interoperability </li></ul><ul><li>Shared types (Common Type System) </li></ul><ul><li>Replaces COM runtime layers </li></ul><ul><li>Uses garbage collection </li></ul><ul><li>Supports multithreading </li></ul><ul><li>Built-in security </li></ul>
    10. 10. An Overview of Visual Basic .NET Updated language: New features <ul><li>Fully object-oriented </li></ul><ul><ul><li>Implementation inheritance (“IsA”, “HasA”) </li></ul></ul><ul><ul><li>Improved interface inheritance </li></ul></ul><ul><ul><li>Overriding and Overloading </li></ul></ul><ul><ul><li>Parameterized constructers </li></ul></ul><ul><li>SEH ( Try…Catch…Finally…End Try ) </li></ul><ul><li>Shortcuts </li></ul><ul><ul><li>Dim cnSql As New SqlConnection(strConn) </li></ul></ul><ul><ul><li>Private i,x,y As Int32 </li></ul></ul><ul><ul><li>i+=1 , strName&=“Bob” , etc. </li></ul></ul>
    11. 11. An Overview of Visual Basic .NET Updated language: Key changes <ul><li>MessageBox.Show(“Hello World”) </li></ul><ul><li>ByRef or ByVal required </li></ul><ul><li>Event handlers use a Handles clause </li></ul><ul><li>Handles Button1.Click, Button2.Click </li></ul><ul><li>Event handlers have same signature </li></ul><ul><ul><li>(sender As Object, e As xxx EventArgs) </li></ul></ul><ul><li>Arrays must have 0-bound lower dimension </li></ul><ul><li>Property…End Property </li></ul>
    12. 12. An Overview of Visual Basic .NET Updated language: Cleaned up <ul><li>Handled by the Upgrade Wizard, but don’t use </li></ul><ul><ul><li>DefInt , DefStr , DefObj , DefDbl , DefLng </li></ul></ul><ul><ul><li>DefBool , DefCur , DefSng , DefDec , DefByte </li></ul></ul><ul><ul><li>Imp, Eqv </li></ul></ul><ul><li>Handled, but use very sparingly </li></ul><ul><ul><li>GoTo [Line no.] </li></ul></ul><ul><li>Not handled by the Upgrade Wizard, so remove </li></ul><ul><ul><li>GoSub…Return </li></ul></ul><ul><ul><li>LSet (for user-defined types) </li></ul></ul><ul><ul><li>VarPtr , ObjPtr , StrPtr </li></ul></ul><ul><ul><li>Null and Empty nonzero-lower-bound arrays </li></ul></ul>
    13. 13. An Overview of Visual Basic .NET Updated language: Data type changes <ul><li>Currency replaced by Decimal data type </li></ul>Long or Int64 64-bit Integer or Int32 Long 32-bit Short or Int16 Integer 16-bit Byte Byte 8-bit Visual Basic .NET Visual Basic 6.0 Integer Type
    14. 14. An Overview of Visual Basic .NET New IDE: Microsoft ® Visual Studio ® .NET <ul><li>All languages share Devenv.exe </li></ul><ul><li>Includes Web development </li></ul><ul><li>Server Explorer </li></ul><ul><li>Dynamic Help </li></ul><ul><li>Greatly enhanced… </li></ul><ul><ul><li>Task List ( ‘TODO: Use DataSet instead. ) </li></ul></ul><ul><ul><li>IntelliSense </li></ul></ul><ul><ul><li>ToolBox </li></ul></ul><ul><ul><li>Debugger </li></ul></ul>
    15. 15. <ul><li>Bottom Line: It’s still Visual Basic </li></ul><ul><li>Only executes within the CLR </li></ul><ul><li>RAD for both Windows and the Web </li></ul><ul><li>< 100% Backward compatibility </li></ul><ul><li>Visual Basic no longer unified with VBA </li></ul><ul><li>Ceases its focus as a COM “glue language” </li></ul>An Overview of Visual Basic .NET Final Comments
    16. 16. Demonstration 1 Key Visual Basic .NET Changes Form Layout Structured Exception Handling Inheritance
    17. 17. Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrade Considerations </li></ul><ul><li>Upgrade Wizard </li></ul>
    18. 18. Developing Windows Apps The New World of Windows Forms <ul><li>Windows Forms as .NET classes </li></ul><ul><li>Dim frm As New Form1 </li></ul><ul><li>frm.Show() ‘Or frm.ShowDialog() </li></ul><ul><li>Better Graphics with GDI+ </li></ul><ul><li>Sweeping changes to: </li></ul><ul><ul><li>Visual Studio .NET </li></ul></ul><ul><ul><li>Controls and Events </li></ul></ul><ul><li>Internationalization </li></ul>
    19. 19. Developing Windows Apps New RAD features in Visual Studio .NET <ul><li>Property changes reflected directly in the code </li></ul><ul><li>Non-UI controls placed in separate tray </li></ul><ul><li>Visual inheritance </li></ul><ul><li>In-place menu editing </li></ul><ul><li>Visual tab order editing </li></ul><ul><li>Anchor, Dock, AutoScroll, Locked properties </li></ul><ul><li>Resize multiple controls </li></ul>
    20. 20. Developing Windows Apps Some new or greatly improved controls <ul><li>LinkLabel, NotifyIcon </li></ul><ul><li>MainMenu, ContextMenu </li></ul><ul><li>Provider controls </li></ul><ul><ul><li>ToolTip </li></ul></ul><ul><ul><li>ErrorProvider </li></ul></ul><ul><ul><li>HelpProvider </li></ul></ul><ul><li>ToolBar </li></ul><ul><li>Splitter </li></ul>
    21. 21. Developing Windows Apps Retired or Replaced Controls <ul><li>Spinner </li></ul><ul><li>Line and Shape </li></ul><ul><li>DirListBox, FileListBox, DriveListBox </li></ul><ul><li>CommonDialog </li></ul><ul><li>Image </li></ul><ul><li>Frame </li></ul>
    22. 22. Developing Windows Apps Changes to Mouse Events <ul><li>New mouse events: </li></ul><ul><ul><li>MouseEnter, MouseHover, MouseLeave </li></ul></ul><ul><ul><li>MouseWheel </li></ul></ul><ul><li>MouseEventArgs object: </li></ul><ul><ul><li>Button </li></ul></ul><ul><ul><li>X, Y </li></ul></ul><ul><ul><li>Clicks </li></ul></ul><ul><ul><li>Delta </li></ul></ul><ul><li>Controls also provide access </li></ul>
    23. 23. Developing Windows Apps Working with Drag-and-Drop <ul><li>Between controls same as between applications </li></ul><ul><li>Concepts are similar to Visual Basic 6 </li></ul><ul><li>No support for automatic drag-and-drop </li></ul><ul><li>AllowDrop = True </li></ul><ul><li>All but DragLeave receive DragEventArgs: </li></ul><ul><ul><li>AllowedEffect </li></ul></ul><ul><ul><li>Data </li></ul></ul><ul><ul><li>Effect </li></ul></ul><ul><ul><li>KeyState </li></ul></ul><ul><ul><li>X, Y </li></ul></ul>
    24. 24. Developing Windows Apps Implementing Drag-and-Drop DoDragDrop() MouseDown DragEnter DragDrop e.Effect e.Data.GetData() Target Control Source Control DragDropResult
    25. 25. Demonstration 2 Drag-and-Drop Between TextBox Controls Between TreeView Controls Between PictureBox Controls
    26. 26. Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrade Considerations </li></ul><ul><li>Upgrade Wizard </li></ul>
    27. 27. Upgrade Considerations Upgrade options <ul><li>Don’t upgrade </li></ul><ul><li>Partial upgrade, use COM interop </li></ul><ul><li>Complete upgrade </li></ul>
    28. 28. Upgrade Considerations Evaluating the Benefits <ul><li>Truly add value? </li></ul><ul><li>Top 3 reasons to upgrade </li></ul><ul><ul><li>Increase performance and scalability </li></ul></ul><ul><ul><li>Take advantage of the .NET Framework </li></ul></ul><ul><ul><li>New language features and architecture </li></ul></ul>
    29. 29. Upgrade Considerations Evaluating the cost <ul><li>Can I use the Upgrade Wizard? </li></ul><ul><li>Size and Complexity </li></ul><ul><li>Code quality </li></ul>
    30. 30. Upgrade Considerations Evaluating the cost (ctd) <ul><li>Non-upgradeable technologies </li></ul>Leave; can work with .NET WebClasses Leave; can work with .NET UserControls Leave Property pages Leave and use COM interop ActiveX ________ Leave; can work with .NET DHTML Applications Upgrade to VB 6 or VB .NET Visual Basic 5 controls Leave OLE Container Control Leave or use alternate inter- application communication Dynamic Data Exchange (DDE) Update to ADO or ADO .NET DAO and RDO data binding Leave or rewrite in GDI+ Visual Basic 6 drawing model Recommendation Technology
    31. 31. Prepare for the upgrade Suggested Upgrade Plan <ul><li>Break app into separate projects </li></ul><ul><li>Determine dependency hierarchy </li></ul><ul><li>Run it through Upgrade Wizard </li></ul><ul><li>Determine extent of each upgrade </li></ul><ul><li>Prepare, upgrade, fix </li></ul><ul><li>Refactor and retest </li></ul>
    32. 32. Agenda <ul><li>An Overview of Visual Basic .NET </li></ul><ul><li>Developing Windows Applications </li></ul><ul><li>Upgrade Considerations </li></ul><ul><li>Upgrade Wizard </li></ul>
    33. 33. Using the Upgrade Wizard No Side-by-Side Issues <ul><li>IDEs can be installed on same machine </li></ul><ul><li>Separate directories </li></ul><ul><li>Install order is irrelevant </li></ul><ul><li>Doesn’t affect Microsoft ® ActiveX ® </li></ul><ul><li>Can run Visual Basic 6 while upgrading </li></ul>
    34. 34. Using the Upgrade Wizard Wizard Philosophy <ul><li>It’s your code </li></ul><ul><ul><li>Should be recognizable </li></ul></ul><ul><ul><li>Comments preserved </li></ul></ul><ul><li>Make it viable </li></ul><ul><ul><li>Enough to get it to run </li></ul></ul><ul><ul><li>Closest match </li></ul></ul><ul><ul><li>Microsoft.VisualBasic.Compatibility.Visual Basic6 </li></ul></ul>
    35. 35. Using the Upgrade Wizard Wizard Methodology
    36. 36. Using the Upgrade Wizard Wizard Methodology - NOTES
    37. 37. Using the Upgrade Wizard _UpgradeReport.htm
    38. 38. Using the Upgrade Wizard EWI Comments <ul><li>Appear In </li></ul><ul><ul><li>Upgrade Report </li></ul></ul><ul><ul><li>Code </li></ul></ul><ul><li>Types </li></ul><ul><ul><li>UPGRADE_ISSUE </li></ul></ul><ul><ul><li>UPGRADE_TODO </li></ul></ul><ul><ul><li>UPGRADE_WARNING </li></ul></ul><ul><ul><li>Design Issues </li></ul></ul><ul><ul><li>UPGRADE_NOTE </li></ul></ul><ul><ul><li>Global Warnings </li></ul></ul>
    39. 39. Using the Upgrade Wizard EWI Comments - NOTES <ul><li>Appear In </li></ul><ul><ul><li>Upgrade Report </li></ul></ul><ul><ul><li>Code </li></ul></ul><ul><li>Types </li></ul><ul><ul><li>UPGRADE_ISSUE </li></ul></ul><ul><ul><li>UPGRADE_TODO </li></ul></ul><ul><ul><li>UPGRADE_WARNING </li></ul></ul><ul><ul><li>Design Issues </li></ul></ul><ul><ul><li>UPGRADE_NOTE </li></ul></ul><ul><ul><li>Global Warnings </li></ul></ul>
    40. 40. Using the Upgrade Wizard Upgrade Issue Help Files
    41. 41. Using the Upgrade Wizard Errors not caught <ul><li>Dim x As New y </li></ul><ul><li>Some type conversions </li></ul><ul><li>Passing properties ByRef </li></ul><ul><li>Dim x() ReDim x(5,5) </li></ul><ul><li>Some ActiveX control behaviors </li></ul>
    42. 42. Demonstration 2 Using the Upgrade Wizard View the Project in the Visual Basic 6 IDE Upgrade the Project Fix build errors Run the Upgraded App
    43. 43. Session Summary <ul><li>Visual Basic .NET is not just Visual Basic 6 + 1 </li></ul><ul><li>Use the Upgrade Wizard to Assess Cost </li></ul><ul><li>Not “all or nothing” </li></ul>
    44. 44. For More Information… <ul><li>Preparing Your Visual Basic 6.0 Applications for the Upgrade to Visual Basic .NET </li></ul><ul><li>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvb600/html/vb6tovbdotnet.asp </li></ul><ul><li>Visual Basic .NET: New Programming Model and Language Enhancements Boost Development Power </li></ul><ul><li>http://msdn.microsoft.com/msdnmag/issues/01/02/vbnet/vbnet.asp </li></ul><ul><li>Visual Basic Language Changes </li></ul><ul><li>http://msdn.microsoft.com/vbasic/techinfo/articles/upgrade/transition/language.asp </li></ul>Specific articles on the MSDN Web site
    45. 45. For More Information… <ul><li>Introduction to Visual Basic .NET for Visual Basic Veterans </li></ul><ul><li>Upgrading Applications Created in Previous Versions of Visual Basic </li></ul><ul><li>Visual Basic 6.0 Upgrading Reference </li></ul><ul><ul><li>Expand Visual Studio .NET > Visual Basic and Visual C# > Reference </li></ul></ul>.NET Framework SDK
    46. 46. MSDN Essential Resources for Developers Training & Events MSDN Webcasts, MSDN Online Seminars, Tech-Ed, PDC, Developer Days Subscription Services Online Information Membership Programs Print Publications Library, OS, Professional, Enterprise, Universal Delivered via CD-ROM, DVD, Web MSDN Online, MSDN Flash, How-To Resources, Download Center MSDN User Groups MSDN Magazine MSDN News
    47. 47. How-To Resources Simple, Step-By-Step Procedures <ul><li>Embedded Development How-to Resources </li></ul><ul><li>General How-to Resources </li></ul><ul><li>Integration How-to Resources </li></ul><ul><li>JScript .NET How-to Resources </li></ul><ul><li>.NET Development How-to Resources </li></ul><ul><li>Office Development Resources </li></ul><ul><li>Security How-to Resources </li></ul><ul><li>Visual Basic ® .NET How-to Resources </li></ul><ul><li>Visual C# ™ .NET How-to Resources </li></ul><ul><li>Visual Studio ® .NET How-to Resources </li></ul><ul><li>Web Development How-to Resources (ASP, IIS, XML) </li></ul><ul><li>Web Services How-to Resources </li></ul><ul><li>Windows Development How-to Resources </li></ul><ul><li>http://msdn.microsoft.com/howto </li></ul>
    48. 48. MSDN Webcasts Interactive, Live Online Event <ul><li>Interactive, Synchronous, Live Online Event </li></ul><ul><li>Discuss the Hottest Topics from Microsoft </li></ul><ul><li>Open and Free For The General Public </li></ul><ul><li>Takes Place Every Tuesdays </li></ul><ul><li>http://www.microsoft.com/usa/webcasts </li></ul>
    49. 49. MSDN Subscriptions THE way to get Visual Studio .NET Visual Studio .NET MSDN Subscriptions NEW <ul><li>Professional </li></ul><ul><li>Tools to build applications and XML Web services for Windows and the Web </li></ul>MSDN Professional $1199 new $899 renewal/upgrade MSDN Enterprise $2199 new $1599 renewal/upgrade MSDN Universal $2799 new $2299 renewal/upgrade <ul><li>Enterprise Developer </li></ul><ul><li>Enterprise lifecycle tools </li></ul><ul><li>Team development support </li></ul><ul><li>Core .NET Enterprise Servers </li></ul><ul><li>Enterprise Architect </li></ul><ul><li>Software and data modeling </li></ul><ul><li>Enterprise templates </li></ul><ul><li>Architectural guidance </li></ul>
    50. 50. Where Can I Get MSDN? <ul><li>Visit MSDN Online at msdn.microsoft.com </li></ul><ul><li>Register for the MSDN Flash Email Newsletter at </li></ul><ul><ul><li>msdn.microsoft.com/flash </li></ul></ul><ul><li>Become an MSDN CD Subscriber at msdn.microsoft.com/subscriptions </li></ul><ul><li>MSDN online seminars </li></ul><ul><ul><li>msdn.microsoft.com/training/seminars </li></ul></ul><ul><li>Attend More MSDN Events </li></ul>
    51. 51. MS Press Essential Resources for Developers <ul><li>Upgrading Microsoft Visual Basic 6 to Microsoft Visual Basic .NET </li></ul><ul><li>Programming Microsoft Visual Basic .NET (Core Reference) </li></ul><ul><li>Applied Microsoft .NET Framework Programming in Visual Basic .NET </li></ul><ul><li>Introducing Microsoft .NET, Second Edition </li></ul><ul><li>Microsoft ADO.NET (Core Reference) </li></ul>www.microsoft.com/mspress
    52. 52. Become A Microsoft Certified Solution Developer <ul><li>What Is MCSD? </li></ul><ul><ul><li>Premium certification for professionals who design and develop custom business solutions </li></ul></ul><ul><li>How Do I attain MCSD Certification? </li></ul><ul><ul><li>It requires passing four exams to prove competency with Microsoft solution architecture, desktop applications, distributed application development, and development tools </li></ul></ul><ul><li>Where Do I Get More Information? </li></ul><ul><ul><li>For more information about certification requirements, exams, and training options, visit www.microsoft.com/mcp </li></ul></ul>
    53. 53. Training Training Resources for Developers <ul><li>Course Title: </li></ul><ul><ul><li>Course Number: </li></ul></ul><ul><ul><li>Availability: </li></ul></ul><ul><ul><li>Detailed Syllabus: www.microsoft.com/ traincert </li></ul></ul><ul><li>Course Title: </li></ul><ul><ul><li>Course Number: </li></ul></ul><ul><ul><li>Availability: </li></ul></ul><ul><ul><li>Detailed Syllabus: www.microsoft.com/ traincert </li></ul></ul>To locate a training provider for this course, please access www.microsoft.com/traincert Microsoft Certified Technical Education Centers are Microsoft’s premier partners for training services
    54. 55. Session Credits <ul><li>Author: Sean Campbell </li></ul><ul><li>Producer/Editor: Field Content Team </li></ul><ul><li>Reviewers </li></ul><ul><ul><li>Field Content Council </li></ul></ul>
    55. 56. An Overview of Visual Basic .NET Updated language: Key changes (ctd) <ul><li>Single Property declarations: </li></ul><ul><li>Dim m_sName As String </li></ul><ul><li>Public Property Name() As String </li></ul><ul><ul><li>Get </li></ul></ul><ul><ul><li>Return m_sName </li></ul></ul><ul><ul><li>End Get </li></ul></ul><ul><ul><li>Set(ByVal Value As String) </li></ul></ul><ul><ul><li>m_sName = Value </li></ul></ul><ul><ul><li>End Set </li></ul></ul><ul><ul><li>End Property </li></ul></ul>
    56. 57. An Overview of Visual Basic .NET Updated language: Key changes (ctd) <ul><li>Block-level scoping </li></ul><ul><li>Dim IsNum As Boolean = True </li></ul><ul><li>If IsNum Then </li></ul><ul><li>Dim i As Int32 </li></ul><ul><li>i = 50 </li></ul><ul><li>End If </li></ul><ul><li>i = 100 ‘ Compiler error here! </li></ul><ul><li>File I/O statements only via class libraries </li></ul>
    57. 58. Developing Windows Apps The Form Object Hierarchy Object MarshalByRefObject Component Control ScrollableControl ContainerControl Form YourForm
    58. 59. Developing Windows Apps The Form Object Hierarchy - NOTES Object MarshalByRefObject Component Control ScrollableControl ContainerControl Form YourForm
    59. 60. Developing Windows Apps Visual Basic .NET Controls: Some Changes <ul><li>Control arrays replaced by controls collections </li></ul><ul><ul><li>Dim btnFoo As New Button </li></ul></ul><ul><ul><li>pnlBar.Controls.Add(btnFoo) </li></ul></ul><ul><li>Properties set in InitializeControl() </li></ul>
    60. 61. Upgrade Considerations Evaluating the cost (ctd) <ul><li>Other time-consuming upgrade items </li></ul><ul><ul><li>Games </li></ul></ul><ul><ul><li>Drag-and-Drop </li></ul></ul><ul><ul><li>Windows APIs </li></ul></ul><ul><ul><li>Form.PrintForm </li></ul></ul>
    61. 62. Upgrade Considerations Decision making process (ctd) Are there benefits to upgrading? Don’t upgrade No Yes Is it worth the effort? No Develop upgrade plan Yes
    62. 63. Prepare for the upgrade Code cleanup suggestions <ul><li>Obsolete language elements </li></ul><ul><li>DAO/RDO data binding </li></ul><ul><li>Variants and Variables </li></ul><ul><li>Constants </li></ul><ul><ul><li>Screen.MousePointer = adCmdStoredProc </li></ul></ul><ul><li>Underlying data types </li></ul><ul><ul><li>Dates as Doubles </li></ul></ul><ul><li>“ As New” and implicit object creation </li></ul>
    63. 64. Prepare for the upgrade Code cleanup suggestions - NOTES <ul><li>Obsolete language elements </li></ul><ul><li>DAO/RDO data binding </li></ul><ul><li>Variants and Variables </li></ul><ul><li>Constants </li></ul><ul><ul><li>Screen.MousePointer = adCmdStoredProc </li></ul></ul><ul><li>Underlying data types </li></ul><ul><ul><li>Dates as Doubles </li></ul></ul><ul><li>“ As New” and implicit object creation </li></ul>
    64. 65. Using the Upgrade Wizard Starting the upgrade <ul><li>Break Project Group into Projects </li></ul><ul><li>Open a valid Visual Basic 6 Project in Visual Studio .NET </li></ul><ul><li>Select a Project Type (EXE or DLL) </li></ul><ul><li>Select a Location </li></ul><ul><li>Click Finish </li></ul><ul><li>View the upgrade report </li></ul>

    ×