Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Easy USB Remover (F10 to remove)

0.00/5 (No votes)
23 Nov 2013 1  
If you often use removable USB devices like a flash drive, you are probably already familiar with the “Safely Remove Hardware” icon that sits in the system tray. The problem for many people is that the icon is tiny, and clicking it just right to bring up the menu is a pain.

Introduction 

If you often use removable USB devices like a flash drive, you are probably already familiar with the “Safely Remove Hardware” icon that sits in the system tray.  

The problem for many people is that the icon is tiny, and clicking it just right to bring up the menu is a pain. 

So that only I create a application for windows to safely remove the USB from Computer by simply pressing "F10" key.

Its requires background run. 

Using the code

The code that runs the application until the user terminated manually.

No sleep() or other timer function has been used:

/// Processes a menu item.
/// The sender
/// instance containing the event data.</param>
void Exit_Click(object sender, EventArgs e)
{
    // Quit without further ado.
    Application.Exit();  
}

///start the system function  
System.Diagnostics.Process.Start(""); 
        public void Display()
{
    // Put the icon in the system tray and allow it react to mouse clicks.            
    ni.MouseClick += new MouseEventHandler(ni_MouseClick);
    ni.Icon = Resources.SystemTrayApp;
    ni.Text = "Easy USB Remover";
    ni.Visible = true;

    // Attach a context menu.
    ni.ContextMenuStrip = new ContextMenus().Create();
}

Points of Interest

I would like to thank codeproject.com . Because i just embed my idea into C# code which i got in there only. and also I thank U. Manikandan who is the initiator of this project!

Here is the project running snaps.

History

  • 23/11/2013: Easy USB Remover v1.0 created.   

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