 |
A macro to protect a code section with a Try...Catch block
|
Total Hit (3202) |
When you're working with the Visual Studio .NET code editor, typing a Try keyword plus the Enter key automatically creates the End Try statement. The following simple macro does something more interesting: it lets you select a portion of code and protect it with a Try...Catch...Finally...End Try blo
....Read More |
Rating
 |
|
 |
A macro to protect a code section with a Try...Catch block
|
Total Hit (3174) |
When you're working with the Visual Studio .NET code editor, typing a Try keyword plus the Enter key automatically creates the End Try statement. The following simple macro does something more interesting: it lets you select a portion of code and protect it with a Try...Catch...Finally...End Try blo
....Read More |
Rating
 |
|
 |
Adding external commands to VS.NET's Tools menu
|
Total Hit (2885) |
The VS.NET's Tools menu can be customized with your own commands, to launch external programs. For example, you may want to have a command that opens the current project's folder in a Windows Explorer window, to easily manage the project's files. To add such a new command, click Tools | External Too
....Read More |
Rating
 |
|
 |
Changing the project's output type
|
Total Hit (3450) |
When you start developing an application, the first thing you do in VS.NET is creating a new project and selecting its type: Windows Forms application, Class Library etc. However, it may happen that later in the development you want to change the project's output type. For example, you could have de
....Read More |
Rating
 |
|
 |
Creating a project into an existing folder
|
Total Hit (2734) |
When you create a new project, VS.NET automatically creates a folder with the project's name under the selected directory. If you name your project MyTestProject, and select an existing folder named c:\My Project\MyTestProject as destination directory, in reality the final project's folder will be c
....Read More |
Rating
 |
|
|
 |
Creating applications that target .NET Framework v. 1.0 and/or 1.1
|
Total Hit (2842) |
As explained in this article, the applications you create with one version of the framework, can target only that version or both, according to the settings you put in the appname.config file. (Where appname is the full name of your executable file including the extension, such as myapp.exe, so the
....Read More |
Rating
 |
|
 |
Creating custom help filters
|
Total Hit (2917) |
If you open the VS.NET documentation (either from within the IDE or by clicking the respective icon under the Start | Programs| Microsoft Visual Studio 2003 folder) you can use the Filtered by dropdown box to select a filter, and load in the list/tree control below only the subset of topics you're i
....Read More |
Rating
 |
|
 |
Exception debugging in Visual Studio .NET
|
Total Hit (2741) |
The Visual Studio debugger offers complete control on what happens when an application throws an exception, or calls a .NET method that throws an exception. You set all the relevant options from inside the Exceptions dialog box, which you bring up with the Debug | Exceptions menu command. This dialo
....Read More |
Rating
 |
|
 |
Exception debugging in Visual Studio .NET
|
Total Hit (3297) |
The Visual Studio debugger offers complete control on what happens when an application throws an exception, or calls a .NET method that throws an exception. You set all the relevant options from inside the Exceptions dialog box, which you bring up with the Debug | Exceptions menu command. This dialo
....Read More |
Rating
 |
|
 |
Including/excluding files in Visual Studio .NET
|
Total Hit (2742) |
Say that that you have an existing Visual Studio .NET project, and that you copy a lot of new source code files, images and other stuff from another project (maybe you're merging two projects, or a colleague wrote and passed those files to you). One approach to include the new files is to use the Pr
....Read More |
Rating
 |
|
 |
Linking a file in Visual Studio .NET
|
Total Hit (2824) |
If in VS.NET you add to the current project an existing file that's located outside the current project's directory, the file is first copied in the project's directory, and then it's added to the project. However, you may want to share the same source file among multiple projects, so that if you mo
....Read More |
Rating
 |
|
 |
Marking strings with a different color in source code documents
|
Total Hit (2696) |
When you build strings by concatenating hardcoded constant strings and variable strings, it's easy to forget a closing double quote, and thus receive a compile time error when you launch or compile the program (actually, you see that there is a syntax error even before, because the statement gets un
....Read More |
Rating
 |
|
 |
Quickly swap assignment operands
|
Total Hit (2863) |
It often happens that you need to swap the operands of an assignment. For example, say that you have this set of assignments:
«Code LangId=2»
p1.FirstName = m_FirstName
p1.LastName = m_LastName
«/Code»
and later in your source code you want to add a similar set of assignments, but with rever
....Read More |
Rating
 |
|
 |
Running ILDASM from inside Visual Studio .NET
|
Total Hit (3293) |
Nothing beats ILDASM when it's time to understand what your VB.NET or C# compiler actually emits. In this case you should prepare a desktop shortcut to ILDASM so that you can run it quickly, and then open a Windows Explorer window on the Bin directory of your project, so that you can easily drag you
....Read More |
Rating
 |
|
 |
Setting up multiple start-up projects
|
Total Hit (2625) |
By default, a solution has a single start-up project, namely the project that is automatically launched when you click Debug | Start or press F5. However, you have the option to start multiple projects of the solution when you call Start, something that is very useful to automatically start, in debu
....Read More |
Rating
 |
|
 |
Settings pre and post-build actions in VS.NET 2003
|
Total Hit (2718) |
VS.NET 2003 comes with a nice feature that allows you to automatically run an external executable file before or after a build. For example, you may want that after a build a Windows Explorer window is automatically opened on the output folder, so that you can easily run the compiled program. Or you
....Read More |
Rating
 |
|
 |
Shortcuts to useful VS.NET's commands
|
Total Hit (2818) |
Visual Studio .NET has a number of useful features that are often underused by developers, because they are hidden under several menus and not easily accessible. Here is a list of keyboard shortcuts to some of these commands:
Ctrl + - : moves the caret to its previous position.
Ctrl + Shift +
....Read More |
Rating
 |
|
|
 |
Transform a variable into a Property
|
Total Hit (2786) |
Thanks to Visual Studio.NET macros, it is quite simple to automate the task of transforming a Public field into a Property with the same name that accesses a private field of the same type.
Press Alt-F11 (or invoke the Macro IDE from the Tools|Macros submenu, select one macro module in the left-m
....Read More |
Rating
 |
|
 |
Understanding VS.NET public and private assemblies
|
Total Hit (3043) |
As you might have noticed, the Add Reference dialog in Visual Studio displays all the assemblies in the GAC, which brings up the following question: is there a way to have this list display assemblies that aren't in the GAC? The answer is yes, and the technique couldn't be easier.
Use the REGEDIT
....Read More |
Rating
 |
|
 |
Visually browsing hierarchical files
|
Total Hit (2840) |
VS.NET has a nice feature that allows you to visually navigate through the content of hierarchical files, and quickly jump to a particular section. Hierarchical files are all those files written in XML-like syntax, such as .HTML, .ASPX and .Config files. To use this feature, click the View | Other W
....Read More |
Rating
 |
|
|
 |
Tutorial - Getting familiar with Visual Studio.net IDE
|
Total Hit (13162) |
In this article we will look at the new exciting features of Visual Studio.net 2003 IDE.
«a name=#L1»«/a»
«big»Main window«/big»
Visual Studio.net IDE provides several layout options to provide simulated environment from previous versions. You can select different profile for keyboard or window
....Read More |
Rating
 |
|
|