Click here to Skip to main content
15,893,381 members
Articles / Programming Languages / C#

Fast Drive ComboBox

Rate me:
Please Sign up or sign in to vote.
4.82/5 (20 votes)
22 May 2007CPOL3 min read 90.6K   2.5K   51  
A fast combobox that correctly displays all the logical drives with the appropriate icons, volume names, and drive letters.
namespace ZinoLib.Win32
{
	using System;
	using System.Runtime.InteropServices;

	/// <summary>
	/// Wraps necessary functions imported from User32.dll. Code courtesy of MSDN Cold Rooster Consulting example.
	/// </summary>
	public class User32API
	{
		/// <summary>
		/// Provides access to function required to delete handle. This method is used internally
		/// and is not required to be called separately.
		/// </summary>
		/// <param name="hIcon">Pointer to icon handle.</param>
		/// <returns>N/A</returns>
		[DllImport("User32.dll")]
		public static extern int DestroyIcon( IntPtr hIcon );
	}
}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder CWAIN
Denmark Denmark
I have a MCPD .NET 3.5 EAD and a Bsc in computer science, organizational theory and economics.
After more than 24 years working as professional system engineer, I founded the independent consultant agency CWAIN.

Comments and Discussions