9 March 2010 0 Comments

Saving window size and location in WPF and WinForms

A common user interface tweak is to save the size and location of a window and restore that state when the program starts up again. That way, the users don’t need to re-do their work of resizing and moving the windows to where they want them. However I’ve found that there isn’t really a convenient way to do with in C#.

27 July 2009 0 Comments

Visual Basic Power Packs also included with Visual Studio 2010

If you’re like me and used to having line & shape controls , PrintForm and a handy DataRepeater as part of your toolbox then you’ll be excited to know that these controls are also going to be installed with Visual Studio 2010.

27 April 2009 0 Comments

Tally Rows in a DataSet that Match a Condition

Today I got a question that comes up often in data application programming about how to count rows in a DataSet that matched a condition. The DataSet may be bound to a DataGridView or other list control and it’s tempting to start looking at the control to see if you can coax it into returning what you need but usually there is a much better way. For instance, say we have a table in our database called “Inbox” that has varchar fields Subject, From, and Status and we’d like to tally all the rows where the Status = “Unread”

24 April 2009 0 Comments

TestApi v.0.2 Released!

I am excited to announce that we have just released the second preliminary version of TestApi – the testing API library – on http://codeplex.com/testapi ! The v.0.2 package includes the following additions and modifications: Improved command-line parsing APIs Improved visual verification APIs A new tolerance map visual verifier in SnapshotToleranceMapVerifier New operations on snapshot (And and Or) allowing you to mask A new Snapshot.FromWindow(…) constructor with ability to include and exclude the window chrome in snapshots. Improved visual verification internals New application control APIs, enabling in-proc and out-of-proc automation of client applications Expanded conceptual documentation CHM API documents (in addition to the HTML documents) Addition of NUnit and xUnit usage samples (for all of the non-VS crowd out there) Check out the package and let us know of any feedback.

29 January 2009 0 Comments

DataGridView with RTL Columns

I had an interesting customer scenario, which is common among developers that deal with more than language. Basically you have an English WinForm application that uses the DataGridView , but you have the Names field in Arabic. So, you want to keep the DataGridView in English , but change one column only to right-to-left