Recently the question of how to compare files and folders came up. TFS version 1 doesn't have the project difference type of functionality that was available in VSS. So if you want to write your own, this code sample will help you with the calls to get the information you'll want to display.
The code shows two different approaches to getting the information. The first approach is to use the GetExtendedItem() method that Source Control Explorer uses to get much of its information (SCE also uses QueryPendingSets() to be able show the other users with pending changes on an item, but I didn't put that in here). Using GetExtendedItem(), you can determine what is different between what's in your workspace and the latest in the repository.
The second approach uses a pair of calls to GetItems(). While it won't show you whether you or others have pending changes, it will show you the differences between two arbitrary versions of the tree. If you want pending change information, you can use GetPendingChanges() and connect the information with what GetItems() returns. You can connect the two sets of data using the item ID in the PendingChange and Item objects, as I have done in the code in order to tell which items are common between the two versions.
This code also shows how to diff two items. The code below uses the Item object to construct a DiffItemVersionedFile, but there are also DiffItemLocalFile, DiffItemPendingChangeBase, and DiffItemShelvedChange classes. While the code produces a text diff, the comments contain details on how to launch an external diff viewer, which is actually simpler than producing a text diff.
If you are just getting started with the version control API, you'll want to start with the basic example. You may also want to look at the example showing how to display sizes and dates of files in the server and how to display the labels on a file.
I've also attached a zip file containing the VS solution for this example. You may need to adjust the project references in order to build the solution. If you haven't already done so, you can add the TFS assemblies to the .NET tab in the VS Add Reference dialog.
You can find the current documentation of the TFS API in the Visual Studio SDK as mentioned here (the current release is Visual Studio 2005 SDK – March 2006 CTP for v2).