Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

System File Association

, 16 Mar 2007
This article describes the use of several custom C# classes that can be used to create, view, edit and delete Windows file associations.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BrendanGrant.Helpers.FileAssociation.Example
{
   public partial class NewExtensionDialog : Form
   {
      public NewExtensionDialog()
      {
         InitializeComponent();
      }

      public string Extension
      {
         get
         {
            if (!extensionTextBox.Text.StartsWith("."))
               extensionTextBox.Text = "." + extensionTextBox.Text;

            return extensionTextBox.Text;
         }
         set
         {
            if (!value.StartsWith("."))
               value = "." + value;

            extensionTextBox.Text = value;
         }
      }
	
   }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Brendan Grant
Web Developer
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411019.1 | Last Updated 16 Mar 2007
Article Copyright 2007 by Brendan Grant
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid