October 2004 - Posts
While working on my project yesterday, I unvolentarily tested another Visual Assist (VA) feature, Crash recovery. I was amazed, and thrilled, to see it work.
The Visual Studio IDE stopped responding when I tried to pin the toolbox (which I normally set to Auto Hide). There was no way I could get the IDE to work. So after about 5 minutes, I closed the application using Task Manager. When I re-opened my .Net project and returned to the source file I was working on, VA told me that it found the changes to my source that hadn't been saved yet. Would I like to recover those changes. YES, I would, and it worked. All the changes to my source code that I did not yet save were recovered. I did not loose my work.
Last weekend I recieved my weekly newsletter from The Code Project. It featured a link to a product showcase which described Visual Assist (VA) from Whole Tomato Software. The article made me curious so I downloaded the trial version.
It took me about 5 minutes to start liking the product. I've decided to install the trail version on my project computer to see if it's worth the $99 they ask for it. But sofar I'm impressed. I really like this product. So what do I like about this product?
You're already used to seeing a listbox once you type a '.' after your object variable or class name. But when you use Visual Assist, you get a list box with nearly everything you type! For example, when you type an L, you get a listbox of every variable and object in your code starting with an L.
VA will automatically correct the casing of everything you type! This never was the case in C#. C# purists will probably start nagging about this, but coming from a VB environment I have to admit I like this feature.
Searching for the right property or method in the listbox that shows once the '.' was placed is a lot easier. Typing a character will automatically filter any property or method that does not have this character. Making your list of possibilities a lot shorter.
VA also constantly shows you where your start and end brackets or braces are! The standard IDE only does this when you type the bracket or brace.
In the oldern days, when working in DOS, I used editors like Brief and MultiEdit. One of the things I missed were the autocomplete templates these editors featured. But now, thanks to Visual Assist, they're back! Simply type 'if' and a listbox shows giving you a choice of how to complete the code. Select it and hit the Tab key and everythings there. All that's left is typing your code.
VA extends the way Visual Studio uses color schemes for your code. The first thing you will notice once you started the IDE is that everything will have a color. And even more, you can have VA apply the color schemes to tooltips and listboxes as well.
When you re-assign a datasource to your DataGrid, the selected row becomes the first row in the grid again. That can be very annoying when you just made changes to the last row and want to see if that's OK. So here's a solution. Pass in the DataGrid, the KeyValue for the row you want to set focus to and the name of the KeyColumn.
The code also handles any filters you may have set to the dataview.
/// Finds the value in the grid and sets the current row to the first row that
/// matches the specified column value
public void SelectRow(DataGrid dgGrid, string columnValue, string columnName)
if (columnValue.Trim().Length > 0)
BindingManagerBase bm = dgGrid.BindingContext[dgGrid.DataSource, dgGrid.DataMember];
if (bm.Count > 0)
int row = 0;
DataView dv = ((DataRowView)bm.Current).DataView;
foreach (DataRow dr in dv.Table.Select(dv.RowFilter))
dgGrid.CurrentRowIndex = row;
As I told earlier, I have to build C# components for a BizTalk 2004 project. One of the prerequisites of BizTalk 2004 was to install MDAC 2.8. So I did and from that moment on, I could not access my SQL server anymore. Some of the problems I had:
- I could not view the information in my tables in SQL Enterprise manager
- In Visual Studio, I was no longer able to add a new data connection in the server explorer.
- In Visual Studio, I was also not able to browse to my SQL server.
- And last, but definitely not least, when I tried to check-in/out sources from Visual Source Safe, I got an error message about a procedure that could not be found!
This really pissed me off. Eventually I traced it to one DLL, MSDART.DLL. This DLL comes with MDAC. The version on my machine was 2.7.????, which was odd since I had installed MDAC 2.8. I then asked a colleague to send me his version of MSDART.DLL. All the above problems disappeared after installing that DLL on my machine.
Still wonder why re-installing MDAC didn't fix it.
The new project I work on now involves using Biztalk 2004. And although I will only be building C# components for that project, I decided to install BizTalk 2004 anyway. That way I can at least run the integration tests myself.
But after installing BT2K4, Visual Studio completely messed up. I tried adding a dataset to my project and Biztalk intervened and tried to edit the Dataset. That obviously failed since it was a new, and empty, dataset. Robert Rijsdijk sent me this link which solved my problem.