|
 |
|
|
|
Visual Studio Productivity
|
 |
|
 |
|
Power Toys for Visual Studio are small tools that provide aid to developer pain-points or assist in diagnosing development-related issues. In addition to providing support, the power toys are released as Microsoft Shared Source to provide sample code to real-world solutions and allow for collaborative-development.

Visual Basic Starter Kits & Power Packs A Starter Kit is essentially an enhanced project template that can be shared with other members of the community. This page contains links to the currently available Starter Kits with more to come in the future. Here are some example starter kits that can create instant applications for use.
|
|
|
|
|
|
|
|
 |
|
|
|
VB.NET naming conventions
|
 |
|
 |
|
| VB.NET Object naming conventions Objects should be named with a consistent prefix that makes it easy to identify the type of object. Recommended conventions for some of the objects supported by Visual Basic are listed below. |
|
|
|
|
|
|
|
|
 |
|
|
|
VB.NET Code libraries
|
 |
|
 |
|
| Visual basic accelerator Welcome to vbAccelerator.com, a site devoted to providing free, advanced source code to Visual Basic programmers since June 1998 and now also to the .NET and C# community.
Specialities here are user interface, controls, the Windows API, XML and no-compromise code. Everything is edited, comes with full source code and is available under a relaxed open source licence.
|
| DevX Portal with lot's of background documents about programming |
| Visual Basic .NET articles |
| Embed bitmap, text, and other resource files in a compiled application and use them in VB .NET This example shows how to embed bitmap and text files in a compiled Visual Basic .NET application. At run time, the program extracts these files and displays their contents. |
|
|
|
|
|
|
|
|
 |
|
|
|
Printing in VB.NET
|
 |
|
 |
|
| Printing in VB.NET Providing support for Printing is one of the common tasks during application development. The .NET Framework provides excellent support for Printing documents |
| Printing in VB.NET This article explains about Printing in VB.NET.Printing is all carried out through components included in the toolbox. The main component that talks to the printer is the PrintDocument component. |
|
|
|
|
|
|
|
|
 |
|
|
|
Scripting support for your applications
|
|
|
 |
|
| Make your .Net application support scripting - a practical approach Adding scripting support to your application is one of the most valuable things you can do for your client, letting them add value to your software, and keep it current over time with little or no overhead from the developers. Your users will be able to modify behavior at runtime, change business rules as the market changes and fix subtle bugs as they appear until better fixes come along in the form of compiled code. It is one of the most powerful techniques today employed my many varied business applications. But guess what? Its not very easy to do in .Net. In this article Ill show you how you can use some of the techniques of the past mixed with the .Net framework to add that scripting ability to managed applications, with a touch on a subject that was never considered for scripting: WebServices , including asynchronous calls to them.
|
| Microsoft.Vsa Namespace The Microsoft.Vsa namespace contains interfaces that allow you to integrate Script for the.NET Framework script engines into applications, and to compile and execute code at run time. |
| Use VSA to let the user execute scripts in Visual Basic .NET Remember the Microsoft Script Control? It lets you execute script code within a Visual Basic 6 application relatively easily. You pass the control any objects that you want to expose to the script, give it the script code, and call its Run method.
You can still use the Microsoft Script Control in Visual Basic .NET but it seems a bit wrong using VBScript to manipulate a Visual Basic .NET application. There should be a .NET version of the control that executes VB .NET code instead of VBScript.
Unfortunately Microsoft didn't build that control. Instead they gave us VSA (Visual Studio for Applications). Like many other tools in Visual Basic .NET, it provides more (possibly unnecessary) flexibility than the VB 6 version but at least it's a lot more complicated. So grab your preferred caffeinated beverage, take a deep breath, and read on.
|
| Visual Studio for Applications Provides Customized Scripting Facilities for Your .NET Project In the past, the Microsoft Active Scripting architecture has allowed you to make your applications extensible. But it came with some drawbacks. You couldn't call into DLLs; you had to use COM interfaces. The scripts were not compiled, so they ran more slowly than they otherwise might, and a number of objects had to ride along with the script. To solve these problems and make extensibility easier to attain, Visual Studio for Applications was introduced. Presented here is an introduction to VSA that covers language support, types, events, and much more. |
| Compiling code during runtime In some cases it is very useful to compile the source code during execution. For this situation you can use the namespace Microsoft.CSharp. This namespace contains the class CSharpCodeProvider. Using the CSharpCodeProvider you can have access to the C#-compiler. Please note that you can use the compiler with VB.NET also, just use the namespace Microsoft.VisualBasic and the class VBCodeProvider. In Addition to be able to compile your code on the fly you have to add the System.CodeDom and the System.CodeDom.Compiler namespaces |
|
|
|
|
|
|
|
|
 |
|
|
|
Working with Assemblies
|
 |
|
 |
|
| Reading Assembly attributes in VB.NET This article allows you to read the assembly attributes information using .NET. The information store in AssemblyInfo files like Title, Description, copyright, Trade mark can be read using reflection and assembly namespace.
|
|
|
|
|
|
|
|
|
 |
|
|
|
Development Patterns
|
 |
|
 |
|
| Logging Application Block This page provides an overview of the Enterprise Library Logging Application Block. An application block is reusable and extensible source code-based guidance that simplifies development of common logging functionality in .NET Framework applications.
|
| Writing your own XSD.exe If you spend any time working with Web Services or even just XML, you'll inevitably come into contact with XSD.exe and WSDL.exe, they both generate .net code from XSD type definitions. With XSD.exe, you simply give it the path to an xsd document and it will spit out a .cs file. That file defines types that will serialize to an XML document instance that validates against the xsd. De-serializing your XML to a strongly typed object model is almost always better than fiddling with the XML DOM, but what if you don't like the code that XSD.exe generates? Well, you can easily spin your own XSD.exe since it simply uses the public framework types System.Xml.Serialization.XmlSchemaImporter, System.Xml.Serialization.XmlCodeExporter and CodeDom. For some reason the MSDN documentation on these classes says, "This class supports the .NET Framework infrastructure and is not intended to be used directly from your code.", but don't let that put you off, they're public types and work fine.
|
| XmlGridControl Editing XML Data in the PropertyGrid I've been using the XSD.exe for quite a while to generate classes from XML Schema Definition (XSD) files. These classes are uniquely suited for serializing/deserializing XML data into an object model that a programmer can use to manipulate data. When paired with a middleware product that generates XML from database queries or stored procedures, this provides a powerful programming model where the programmer only needs to work in the object data space, while the middleware layer takes care of the object-relational mapping |
|
|
|
|
|
|
|
|
 |
|
|
|
Treeview
|
 |
|
 |
|
| Introduction to TreeView Drag and Drop (VB.NET) TreeView controls are extremely common in applications where it is necessary to present any sort of hierarchy to a user. Usually, the nature of such a hierarchy requires that users have the ability to reorganize it; drag and drop operations providing a natural solution. This article provides an introduction to implementing drag and drop functionality to a TreeView control.
|
|
|
|
|
|
|
|
|
 |
|
|
|
Code signing
|
 |
|
 |
|
| From Richard’s blog…Good post about Code signing, strong names and authenticode At a high level, code signing allows you to generate a digital signature for the application binary and then provides a mechanism to carry the signature right to the end user. When the end user invokes the application, the digital signature is verified by the user and the user is able to make an informed decision whether the executable must be executed on his/her machine. Code signing uses digital signatures to provide identity and integrity for the code of software applications. It is important to understand that code signing merely asserts the identity of the software publisher and confirms that the software has not changed since it was signed. Code signing does not make a judgement of the quality of the software or its performance. |
| ClickOnce Manifest Signing and Strong-Name Assembly Signing Using Visual Studio Project Designer's S This article discusses how to sign assemblies and ClickOnce manifests using Visual Studio 2005 |
| What is Code Signing? How to check if a file is signed? Code signing is a mechanism whereby publishers of software and content can use a certificate-based digital signature to verify their identities to users of the code, thus allowing users to decide whether or not to install it based on whether they trust the publisher. Code signing has been touted as a major security feature. But how to use it as an end user?
|
| How to: Sign an Assembly (Visual Studio) Assembly signing (also called strong-name signing) gives an application or component a unique identity that other software can use to identify and refer explicitly to it. A strong name consists of its simple text name, version number, culture information (if provided), plus a public/private key pair. This information is stored in a key file; this can be a Personal Information Exchange (PFX) file or a certificate from the current user's Windows certificate store |
|
|
|
|
|
|
|
|
 |
|
|
|
Treads
|
 |
|
 |
|
| How To Update Controls Using BackgroundWorker in VB.NET The .NET Framework 2.0 BackgroundWorker class makes it easy to code simple threading into your applications. However, a common question that gets asked in VB related forums is, “How do I update a control, or controls, from the worker thread?”. Many people seem to be in search of a simple explanation of how to do this. In this article we’ll create a quick and easy example program that will walk you through the steps.
|
|
|
|
|
|
|
|
|
 |
|
|
|
Localize
|
 |
|
 |
|
| Globalizing and Localizing Windows Application In my last article, I talked about how to localize your Windows application using the CurrentCulture property. In this article, we will continue to work on localizing our Windows application so that it can now display different languages, according to the culture selected |
| Localizing your .NET Application Localization or Internationalization (I18N as it is sometimes called) is the process of
blending an application to the local culture of the end user. An application needs to
accommodate differences in language, currency, calendar, time and culture sensitive
color and messages. Further this needs to be accomplished without having to change the
code. In this article we address the capabilities of and facilities provided in .NET for
localization. |
|
|
|
|
|
|
|
|
 |
|
|
|
PropertyGrid
|
 |
|
 |
|
| Add Custom Properties to a PropertyGrid Extend a PropertyGrid with an Item collection; easy customization of properties with custom editor, custom converter and databinding. |
| XmlGridControl Editing XML Data in the PropertyGrid While developing the middleware product described above, I had a need to dynamically generate a simple GUI from the XSD which specified the structure of the XML data. The data would then be deserialized into the object model, and presented on the screen using data binding. While thinking about this, I realized that the .NET Framework ships with a control that already takes an object and displays its properties in an editable format: the PropertyGrid.
Unlike other CodeProject articles that have used the PropertyGrid for this purpose, this control displays the grid using the schema for formatting, loads the data using XML serialization, and edits the data using standard .NET methods that we're all familiar with from using VS2003/VS2005. The resulting control is very simple, and has very little code. All complexity and overhead is in generating the class structure; performance concerns can be addressed by an appropriate caching scheme, if so desired |
|
|
|
|
|
|
|
|
 |
|
|
|
Visio
|
 |
|
 |
|
| Connecting Visio to a database This post outlines how to connect your Visio diagram to a database to reduce manual entry of data and improve consistency. I’m sure there are plenty of ways to improve on this, but this is a low-tech method that works reasonably well.
Note: I am using my personal site for the examples, Visio Professional 2003 and Microsoft Access 2002. I haven’t tested on anything else - hopefully the instructions will help you to trouble-shoot other combinations |
|
|
|
|
|
|
|
|
 |
|
|
|
Resources
|
 |
|
 |
|
| RESX to XLS conversion for multi-language support This tool should help you to just point and click at your project and obtain an Excel file filled with all of the strings of ALL of your resource files. After compiling the XLS with the translations, I wanted to convert all of the keys back into localized RESX files. I hope this helps! |
| Multi-lingual Resource file generator using the Google Translation API This utility is developed to generate Japanese and French resource files from default resource files of an ASP.NET web page or user control. This utility is for translating resource files using the Google translation API. |
| Creating and Using Resource Files Resource files are used in .NET to store culture-specific data all in one place, separate from the code. For example, suppose you are developing a multi-language Web site and you have a form on a page with a label beside a text field and the label in English says "First Name." Instead of having code like this |
|
|
|
|
|
|
|
|
|
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
|
|
|
|
VB.NET Sites
|
 |
|
|
|
|
|