Design with Users In Mind

We all spend lots of time delving into the technical aspects of our work, but don't forget who we are creating all these wonderful apps for. You need to design your apps to work for the users, not create apps that the users need to work to use.

Required Reading: Four Modes of Seeking Information and How to Design for Them

Posted: Wednesday, January 31, 2007 11:09:29 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
ASP.NET | Programming | Winforms

WSOD - White Screen of Death in Winforms Designer

I've seen it many times in the past, now it has a name
Posted: Wednesday, January 17, 2007 6:38:07 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Visual Studio | Winforms

CopySourceAsHTML Clipboard Access Error (Blame the VPC)

I kept getting an error when trying to use CopySourceAsHTML in Visual Studio 2005. The error was that CopySourceAsHTML was unable to access the clipboard. Turns out the problem is when using it in a VPC, and the answer is here.
Posted: Monday, January 15, 2007 10:11:51 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Strange Problems | Visual Studio

Casting Text Data to Members in a Business Object via Reflection

I have a pipe-delimited text file that I am parsing and using to fill a collection of custom business objects. Instead of hard-coding the bits of each pipe-delimited line, I am using an XML file to map data items in the file to object members, like this XML fragment:

<Field>
    <Name>NAMID</Name>
    <Location>0</Location>
    <MapsTo>MemberId</MapsTo>
    <IsRole>false</IsRole>
</Field>

After parsing and matching the data element to the proper member name, I call this function:

public void SetDataMemberValue(string memberName, Member member, string data)
{    // get an instance      
     // of that object's type.
     Type objectType = member.GetType();
     PropertyInfo[] properties = objectType.GetProperties();
     foreach (PropertyInfo property in properties)
    {         if (string.Equals(property.Name, memberName, StringComparison.OrdinalIgnoreCase))
        {
            object[] args = new object[1];
            args[0] = data;
            object result = null;
 
            if (property.PropertyType == data.GetType())
            {
                //The type of the property matches the data's type
                result = data;
            }
            else
            {
               result = property.PropertyType.InvokeMember("Parse", BindingFlags.InvokeMethod, null, result, args);
            }
 
            if (result != null)
            {
                property.SetValue(member, result, null);
            }
        }
    }
}

The tricky bit is the InvokeMember call, which is casting my string to the appropriate type for the property. Of course this is they stylized version of the function, I removed the try-catch bits to make it smaller and readable for the acutal function. You should wrap the InvokeMember call with a try-catch as Parse methods can fail quite hard.

Posted: Monday, January 15, 2007 9:27:13 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
.Net 2.0

Vista and Visual Studio 2003 - Not Supported

Now that Vista has gone RTM, lots of us are trying to decide when to upgrade. Here is something I have not seen much mention of:

Visual Studio 2003 is not supported in Vista.

This is going to hold back adoption on my work machine. I'm a consultant, I have to do work on whatever platform the client is using, which unfortunately is VS 2003 sometimes. Is VS 2003 going to be relegated to life in a virtual machine from now on?

Posted: Thursday, November 09, 2006 7:42:56 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Visual Studio

Vista and Visual Studio 2003 - Not Supported

Now that Vista has gone RTM, lots of us are trying to decide when to upgrade. Here is something I have not seen much mention of:

Visual Studio 2003 is not supported in Vista.

This is going to hold back adoption on my work machine. I'm a consultant, I have to do work on whatever platform the client is using, which unfortunately is VS 2003 sometimes. Is VS 2003 going to be relegated to life in a virtual machine from now on?

Posted: Thursday, November 09, 2006 7:42:52 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Visual Studio

Method for Installing WSS 3.0 Beta2 TR as Slipstream

From JOPX on SharePoint 2007.

Also, the WSS-only install for WSS 3.0 is available here.

Posted: Monday, October 23, 2006 7:44:43 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
SharePoint

Method for Installing WSS 3.0 Beta2 TR as Slipstream

From JOPX on SharePoint 2007.

Also, the WSS-only install for WSS 3.0 is available here.

Posted: Monday, October 23, 2006 7:44:14 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
SharePoint

ASP.Net Single Sign On - Same Domain

This post in the ASP.Net forums has been the best method for me to make a single-sign on work across different sites in the same domain.

You have to set the machine key in the web.config of all sites even on the same physical box.

Posted: Wednesday, October 11, 2006 6:11:18 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
ASP.NET | Security

A List of Visual Studio 2005 Hotfixes

A Google search of hotfixes.
Posted: Thursday, August 24, 2006 8:33:33 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Visual Studio