You can develop code faster

You can make your Visual Studio experience faster.   Often you write some code in Visual Studio, hit F5 to test the code. Repeat.   Here’s a simple way to make this experience faster. (works with managed, native, mixed code).   When a process is started from the debugger, it is started with some special…

4

Look at some hdden code in your VB project

Some code is always added to your VB project. Try this:   Start VS (2008 or 2010 beta: the numbers below are for 2008)   File->New->Project->VB->Console App. Build->Build Solution.   (I like to use temporary projects: see Use temporary projects in Visual Studio. I’m also using the General Profile (Tools->Import/Export Settings->Reset All Settings)   The…

4

What is your computer doing with all that memory? Write your own memory browser

  What is your computer doing with all that memory? There are various kinds of memory allocated and used in each process. These include: ·         Managed memory (VB.Net, C#, managed C++) ·         Heap memory ·         Stacks ·         Images (files loaded into a process)   VirtualAlloc is the basis of these allocations. If a process needs…

1

Its easy to create a graph of memory use in Excel

In this post Examine .Net Memory Leaks I showed how to find a .Net managed memory leak.   Now let’s create a graph of memory and resource use over time.     Start Visual Studio 2008, File->New->Visual Basic (or C#) Windows, WPF application. Dbl click the WPF form to get to the Xaml.cs or Xaml.vb…

0

Make your Task Switcher Window bigger

One of the best features of Windows is the ability to Cut and Paste data within an application or from one application to another.     You can alt-tab or click on the task bar to switch between actively running applications, like Word and Visual Studio. When you hit Alt-Tab, a window comes up.  …

0

Process Explorer and Process Monitor can help you understand a program

Process Explorer and Process Monitor are must-have free utilities that you can download from http://technet.microsoft.com/en-us/sysinternals/bb795533.aspx   For example you can use ProcExp to examine a particular behavior of Visual Studio.   Start Visual Studio (any version). I was using VS 2008.  Start Process Explorer (as Administrator) Click on the Devenv.exe process (the main VS process)…

0

You can use Visual Studio to debug itself!

How do you find out why your computer or a running program is so slow? Here’s one way.   Let’s attach the VS debugger to VS itself. The main executable for VS is devenv.exe.   Start Visual Studio 2008. This will be the “debugger”   Choose File->Open Project    C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe   (You…

2

Stack overflow, expand your stack? Change your algorithm!

In the last post, Area fill algorithm: crayons and coloring book, I showed a program that emulates a kid drawing in a coloring book.   However, the algorithm wasn’t very efficient, and would explode even if you had a simple drawing: it was using the stack to store where to go.   The heart of…

1

Area fill algorithm: crayons and coloring book

Kids know how to use crayons and a  coloring book. How do you write such a program?   In my last post (Which pixels do you turn on when you draw a line?) I showed how to draw a line. Now suppose you have some lines or shapes already drawn. How would you write code…

4

Which pixels do you turn on when you draw a line?

When I wrote my cartoon animation program almost 30 years ago (see Cartoon animation program) I needed to know how to draw a line.   Of course, nowadays, we just call a library function that will draw a line given two points.   If you think about it, the problem is quite complex. Imagine a…

3