Visual Basic Tip Tricks and Other Advanced Topics Bill McCarthy Nick Randolph DEV313.

Slides:



Advertisements
Similar presentations
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Advertisements

Developing an Excel Application
Tutorial 8: Developing an Excel Application
Tutorial 12: Enhancing Excel with Visual Basic for Applications
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
The Microsoft View: Module 1: Getting Started. Copyright Course 2559B, Introduction to Visual Basic®.NET Programming with Microsoft®.NET. Lecture 1 Microsoft.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Eclipse Introduction Dwight Deugo Nesa Matic
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation. All.
Visual Studio 2005 C# IDE Enhancements Luca Bolognese C# Program Manager Microsoft Corporation.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Creating a Console Application with Visual Studio
Future Directions for Leveraging Advanced XML Tools and Building Custom XML Solutions Denise Draper DAT321 Microsoft Corporation.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
A First Program Using C#
Microsoft Visual Basic 2005: Reloaded Second Edition
Using Visual Studio 2013 An Integrated Development Environment (IDE)
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Word Lesson 17 Customizing Settings Microsoft Office 2010 Advanced Cable / Morrison 1.
Workbench Overview Dwight Deugo Nesa Matic
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
© BJSS Limited 2005 Commercial in Confidence Visual Studio 2008 Productivity Enhancing Tips and Resources Jeff Watkins – 25 September 2008.
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
DEV339 Best Practices for Debugging Visual Studio.NET Applications Keith Pleas Architect, Guided Design
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
Chapter Two Creating a First Project in Visual Basic.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
DEV330 Visual Studio.NET IDE Tips and Tricks Billy Hollis Author / consultant.
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
LANDESK SOFTWARE CONFIDENTIAL Tips and Tricks with Filters Jenny Lardh.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
1 Visual Basic “Whidbey”: RAD for the Visual Basic Developer Jay Schmelzer and Shamez Rajan Program Manager Microsoft Corporation Jay Schmelzer and Shamez.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
IE Developer Tools Jonathan Seitel Program Manager.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Tips and Tricks for Debugging ASP.NET Web Applications and Services Habib Heydarian TLNL05 Program Manager Microsoft Corporation.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
M E L B O U R N E S Y D N E Y C A N B E R R A B R I S B A N EW W W. R E A D I F Y. N E T DEV315: Visual C# Under the Covers An In-Depth Look at C# 2.0.
 2007 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2005 IDE.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Dive Into® Visual Basic 2010 Express
Chapter 2: The Visual Studio .NET Development Environment
Visual C# 2005: IDE Enhancements
7/2/2018 3:48 AM BRK3394: Visual Studio Code The most useful (and underused!) tips and tricks Chris Dias Principal Program Manager VS Code © Microsoft.
Microsoft Visual Studio Tips and Tricks
Using Visual Studio and VS Code for Embedded C/C++ Development
Visual Studio 2010 SharePoint Development Tools Overview
DEV354 Visual Studio 2005: New Enhancements For Debugging Applications
Tutorial 7 – Integrating Access With the Web and With Other Programs
Chapter 4 Enhancing the Graphical User Interface
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

Visual Basic Tip Tricks and Other Advanced Topics Bill McCarthy Nick Randolph DEV313

What we’ll cover.. Getting started Profiles & Settings, Options, and Templates Writing Code (or not) My, data sources, snippets, VB Snippet Editor, generics, custom events, operator overloading, error correction Debugging Code Edit and Continue, Object work bench, Immediate window, Debugging enhancements

Profile and Settings Profiles set all the customisations Window layout Keyboard shortcuts Preferred language templates Start page URLs Choosing the right profile General Developer Visual Basic Developer

Settings Options Turn Off Animation Do Show the Start Page Word wrap, with line numbers and visual glyphs Turn ON: Option Strict Option Strict Show Advanced Build Configuration Show Advanced Build Configuration Always Show Solution Always Show Solution Show OutPut Window when build starts Show OutPut Window when build starts Prompt for Symbolic Rename Prompt for Symbolic Rename Show Misc. Files in Solution Explorer (20) Show Misc. Files in Solution Explorer (20)

Customize Your Layout Customize your window layout for code editing Do this for Debug mode as well 1. Create a simple console application. 2. Set a break point, then run the app. 3. Now set your debug window layout When happy, save your settings

Command Bars and Menus You can now customize Short Cut menus !! “Solution Platform” and “Solution Configuration” command bar combo box are not in the Commands list Import the General Development toolbar and menus, and customize from there.

Take It With You Now you have customized your environment, save it to disk. Also put it on a USB thumb-drive and take it with you

Project and Item Templates Per machine AND per user The user path is customizable Tools… Options.. Projects And Solutions New.vstemplate file format VStemplate schema C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas Easy Export Wrapped using zip files

Creating templates First create your default project then select File  Export Template Customize further using standard replacements in the code files new IWizard Interface

IWizard references to add Microsoft.VisualStudio.CommonIDE.dll C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\microsoft.visualstudio.c ommonide.dll EnvDTE.dll C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\EnvD TE.dll

Project and Item Templates

Quick Tip To stop the default designer of a base class from being opened, add the following attribute to the derived class: To assign a property to a category in the Property grid, add attribute to property:

The My application framework SettingsResources Application Instancing More…

Snippets Code reuse for commonly used patterns VB ships with around 500 Extensible XML document: snippetformat.xsd Has “replacements” that can be specified when snippet is used No editor within VS2005 SnippetEditor built by the community, available from:

Operator Overloading + + (unary) - - (unary) * \ / ^ & Like Mod And Or Xor Not << >> = (comparison only) <> < <= > >= CType IsTrue IsFalse + - * / ….. CtypeWideningNarrowing

Custom Events Ability to specify what happens when you: Add event listeners Remove event listeners Raise events Using snippets to remember all the “base” code

Why use custom events ? Binary serialization EventHandler storage optimizations Delay hooking expensive resources Async invocation Error handling

Generic Constraints Interface Public Class thisClass(Of t As IComparable) Class/Structure Public Class thisClass(Of t As Class) New Public Class thisClass(Of t As New) Multiple Public Class thisClass(Of t As {IComparable, New})

Generic Collections List(Of T) ObjectModel.Collection(Of T) ComponentModel.BindingList(Of T)

Generic Delegates Action(Of T) Comparison(Of T) Compares an object to the current object (similar to compareTo) Converter(Of TInput, TOutput) Converts type 1 to type 2 EventHandler(Of TEventargs) Predicate(Of T) Indicates if a particular condition is true for the object argument

Debugging Support Immediate Window Object Work Bench Edit & Continue

Debugger Debugger.IsAttached Determine if a debugger is attached Debugger.Launch Launches a debugger (if not attached) Debugger.Break Equivalent to a breakpoint Will launch the debugger if not attached

Debugging DebuggerDisplay Single line representation Hover over object Can add property values {} DebuggerBrowsable Broken in Beta2 Missing Enum value Doesn’t function Determines whether the variable/property is collapsed, never displayed, root hidden or expanded

Debugging DebuggerHidden Debugger won’t stop in method, property or constructor Can’t set breakpoints in there either DebuggerNonUserCode Class/Structure, Method, Constructor, Property Prevents stepping into and appearance in UserCode section of call stack

Debugging DebuggerStepThrough Debugger won’t step into method Will stop for breakpoints (although DebuggerTypeProxy Shows alternative type instead of type being debugged Must have a constructor with single argument of the type being debugged DebuggerVisualizer Allows user code to run when magnifier is selected Must inherit from DialogDebuggerVisualizer

We invite you to participate in our online evaluation on CommNet, accessible Friday only If you choose to complete the evaluation online, there is no need to complete the paper evaluation Your Feedback is Important!

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.