Tutorials Forums
     Tutorials Videos
        Sign Up Now For FREE

How-To-Main

26
June
2010

How To Create Custom Control Step by Step(C#)
5.0/5 rating (2 votes)

This is a short and simple demonstration of .NET framework's capability of creating custom controls.

Here I'm going to make a custom control and then, test my control in a Windows application. I have implemented some custom properties for my control, so you can learn how it is done in C#.

CustomControlStepbyStep

24
June
2010

How to Add or Remove References in Visual Studio(C#,VB)
4.0/5 rating (2 votes)

In order to use a component in your application, you must first add a reference to it. Visual Studio provides five options in the Add Reference dialog box:

  • .NET lists all .NET Framework components available for referencing.

  • COM lists all COM components available for referencing.

  • Projects lists all reusable components created from local projects.

  • Browse enables you to browse for a component in the file system.

  • Recent contains a list of components recently added to projects on your computer.

The number of tabs available at the top of the Add Reference dialog box can vary, depending on the type of project open and the resources it is using. C++ native projects contain only aProjects tab.

Some components in the list may not be shown, depending on the .NET Framework version of your project. This can occur under the following conditions:

  • A component that uses a recent version of the .NET Framework is incompatible with a project that targets an earlier version of the .NET Framework.

    For information about how to change the target .NET Framework version for a project.

  • A component that uses .NET Framework 4 is incompatible with a project that targets the .NET Framework 4 Client Profile.

    When you create a new application, some projects target the .NET Framework 4 Client Profile by default. For more information.

You cannot add references from the global assembly cache because it is strictly part of the run-time environment.

vsAddOrRemoveReference

22
June
2010

How To Add References Faster with Productivity Power Tool
5.0/5 rating (2 votes)

Two weeks ago, we launched the Productivity Power Tools at TechEd North America and the response has been great with over 37000 downloads so far!  Many of you also may have noticed that an updated version of the Power Tools was released last week.  This update fixed an issue where the extension update check would fail on machines that required proxy credentials and cause Visual Studio to crash.

One of my favorite extensions in the set has to be the new Add Reference extension because it saves me time every day. When you first open the Add Reference Dialog, you'll notice a small window that pops up to indicate that it is "Refreshing References".  While this window is up, the dialog is generating a cache of your references for the current framework. It's a little slow to cache the references but once that's done, the dialog should open almost instantly. You will only see this window when a cache update is needed: when you first use a new framework, after installing a new SDK, or when you get an updated build of the Pro Power Tools.

AddReferencesFaster01

20
June
2010

How to Create a Diagram in a Modeling Project
5.0/5 rating (2 votes)

To create a diagram and add it to a project

  1. On the Architecture menu, click New Diagram.

  2. In the Add New Diagram dialog box, click the type of modeling diagram that you want.

    vsDiagram01

    1. Type a name for the new diagram.

    2. In the Add to modeling project box:

      • Select a modeling project that already exists in your solution, and then click OK.

      - or -

18
June
2010

How to Change Image Extension
5.0/5 rating (2 votes)

The extension is freely available on the Visual Studio Gallery and has the following awesome features:

  1. Allows users to change the image associated with any piece of command UI (toolbar buttons & menu items) in Visual Studio. 

  2. Contains all images that are used in the Ultimate edition of Visual Studio indexed with search text to make locating an icon easier. 

  3. Allows copy/paste (keyboard and context menu) as well as drag & drop within the tool window to change the images on command UI. 

  4. Allows pasting from the Windows Clipboard and automatically performs low color conversion (Near Green and Magenta are mapped to Transparent) and size conversion (to 16x16). 

  5. Allows users to load an image off their disk (supported formats:  jpg, png, gif, tiff, bmp) and use it in their Visual Studio command UI.

The interaction model with the extension is slightly different than command image customization in Visual Studio 2008 since I couldn’t change already shipped assemblies in an out of band extension.  This article aims to be a walk-through of the extension and how it works.

Getting Started

First off, you can get the extension here.

After installing the extension there is a new item on the Tools menu with the text Customize Command Images (as shown below)

vs2010changeimage01