Category: WinForms
Dictionaries of HTML Codes
I wrote this class to help me do some screen scraping programs. It has two Dictionary objects. One contains the HTML codes and their text equivalents and the other contains the numeric HTML codes and their text equivalents.
Capturing Outlook 2007′s New Mail and Reminder Events
Visual Studio 2008′s Outlook Add-in projects allows you to create add-ins that can customize almost any feature of Ms Outlook. Two useful events that can be captured are ReminderFire and NewMailEx. The first occurs before a reminder of a calendar item is executed. And the second occurs when a new email is received in the [...]
Reading Excel 2003 and 2007 Files Using OLEDB
One of the feature of the application I’m working on these days is allowing the user to import data from Excel 2003 and 2007 files. After some research I found out that OLEDB is the only way to read both Excel formats without any problems.
Lock, Sleep or Hibernate Windows using C#
I don’t think there is a Windows developer who has not done this with his or her favorite programming language. So here is the C# version. Putting Windows in Sleep or Hibernate mode can be done with one line of code using the Windows.Forms.Application object’s SetSuspendState method, and locking can be done using Win32′s LockWorkStation [...]
Reading and Writing Text Files in C#
With all the DBMSs out there, text files are still widely used when developing applications. They are small, fast and do not require any library or application to be installed in the client machine. The System.IO.StreamReader and System.IO.StreamWriter are used to read and write text files to disk.
Saving User and Application Settings in WinForms
Before the .NET Framework application settings were saved in INI files and the Windows Registry. But the .NET Framework introduced a much easier way using an XML file. The file has the name of the Assembly and a .exe.config extension, and is placed inside the application’s folder. This way is cleaner because when an application [...]
How to Download a Web Page in WinForms
Sometimes a desktop application might need to download a web page to be displayed to the user or screen scrapped. I did this in my MoviePlay application to get the IMDb (The Internet Movie Database) page of the movie.



Connect