F9 Group Marketing and Technology Blog

Marketing, Technology, and current news at http://www.f9group.com/

Entries for July, 2008

Check Valid File Path in C#

It’s not a trivial exercise to validate a file path on a Windows PC.  There are a few special cases depending on the file system and operating subsystem ( source ): (more…) ShareThis

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Display an RTF File that’s a C# Embedded Resource

It’s easy to display an RTF file — that was embedded as a resource in a C# program — in a Windows Form RichTextControl. (more…) ShareThis

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Add Shaded Rows to ListView Details View

Sometimes it can be challenging to read the Details view in a ListView , especially if the rows are long.  This article shows how to add shading to every second row to make a ListView easier to read. (more…) ShareThis

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Extract Application’s Own Icon in C#

It’s easy to extract an application’s own icon in C#: form.Icon = Icon .ExtractAssociatedIcon( Application .ExecutablePath ); The ExtractAssociatedIcon static method on the Icon class (in System.Drawing) extracts the associated icon from any file.  By supplying the Application. ExecutablePath (in System.Windows.Forms), you extract the application’s own icon. ShareThis

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

C# Copy Folder Recursively

Sadly there is no built-in function in System.IO that will copy a folder and its contents.  Following is a simple recursive algorithm that copies a folder, its sub-folders and files, creating the destination folder if needed.  For simplicity, there is no error handling; an exception will throw if anything goes wrong, such as null or invalid paths or if the destination files already exist. (more…) ShareThis

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Pro PHP Review

Kevin McArthur has contributed several articles to this site, so in this blog post I review his recently published book, Pro PHP.

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz