Archive for the ‘c#’ Category

Annoying Coding Practices

Tuesday, April 10th, 2007

I am right now in the middle of transferring a piece of functionality from one project (ASP.net 1.1 web application) to a second project (Windows Forms desktop application). Although it is a significant feature, most of the work should be straight copy-paste. It is a large chunk of code written ...

WYSIWYG Editing of HTML in a Windows Forms Control

Monday, March 19th, 2007

In a WinForms project that I am working on right now, I have text stored in HTML format in the database. I need a way for novice users to be able to edit this text using a WYSIWYG interface. The most obvious choice for this in the Windows.Forms control library that ...

Global Application Error Handling in Windows Forms Applications

Friday, March 2nd, 2007

In my current project, I would like to log all Windows Forms errors, including those that are not caught explicitly. Lacking a built-in method (like Application_Error in the Global.asax file of an ASP.net application), I needed another way to easily catch all errors. After a bit of searching, I ...

Cannot Access a Disposed Object

Sunday, January 28th, 2007

In a Windows Forms application that I am working on, I had the following scenario: while the main form (Main.cs) is loading, I prompt the user to prove their credentials. If they are unable to do so, the form is closed (using this.close) and application execution is halted. The problem is, ...

Visual Studio 2005 Add-Ins and Tools That I Use

Tuesday, December 19th, 2006

I am right now in the middle (about 20% and 18K lines of code through) a pretty substantial Windows Forms project using Visual Studio 2005 (C#). Here are some of the add-ins that I have been using (ranked in order of essential to useful):

Porting .Net Assemblies to Mono using MoMA

Tuesday, November 28th, 2006

For those who have not heard about it, Mono is a platform designed to allow porting of .Net-based applications to nearly every computing platform available (including Linux and Mac). It is open-source (sponsored by Novell) and is an essential tool for any developer who wishes to run .Net code on ...