Click here to Skip to main content
Click here to Skip to main content

YaAppLauncher - A Drawer Style Application Launcher Using WinForms

By , 11 Apr 2012
Rate this:
Please Sign up or sign in to vote.

Application launcher article image

Introduction

This article is about a small Windows application that runs on the user's desktop and that can be configured and used to launch various applications.

Background

This application is something that I wrote last week to explain the concepts of WinForms development to someone. I was initially planning to go with the usual data entry type forms but since I only had to deal with form concepts and not data, I decided to develop this application. Also, to make it a little interesting we decided to get our user interface designed in such a way that it can be user as a drawer.

Using the code

The application in the initial state shows 16 launch spaces.

Application launcher article image

Each launch space can be configured by right clicking on the image and can be hooked with any application/file. In case a file is being selected, the default program selected on the user machine will open that file.

Application launcher article image

Once applications are configured, the launcher app will look like:

Application launcher article image

This application runs hidden on the right border of the primary display and can be pulled on the screen by the click of a button and then can be pushed back when done. I have not tested it on an extended desktop so perhaps users with extended desktops will have to make some small changes in the code to put it on the secondary display.

The user interface

The user interface mainly contains three forms. One is the MainForm that contains all the tiles, the second one is the small HandleFrom that keeps itself stuck to the main form. This handle is to draw/undraw the main form on and off the screen. The third form is the ConfigurationLauncher dialog that lets the user to configure the launcher spaces with the desired apps and images.

Application launcher article image

The functionality

The functionality of the application is very simple and can be summarized in the following steps:

  1. The application reads a data store (which is an XML file) to check for launcher configurations.
  2. If the file exists it will use that file.
  3. If the file does not exist it will create this file with the default values.
  4. Then data read from this XML is used to configure each tile in the MainForm.
  5. If the user right clicks and selects to configure/reconfigure the tile then the XML will be updated and the MainForm will also be refreshed to reflect the changes.
  6. The user can launch any application by double clicking on the tile.

The classes involved here are:

Application launcher article image

Let us try to understand what each class is doing here:

  • LauncherItem: This class holds the path of the application that needs to be launched, the image location of the tile image, and the display name for the application tile.
  • ItemManager: This class hold the collection of LauncherItems and keeps the mapping of launcher items with the tiles on MainForm. This class also has the functionality of saving and reloading this collections in the form of XML so that configurations can be remembered between application runs.
  • SlidingController: This class does all the math and functionality required for sliding in and out of the forms and the repositions on the handle form on the screen.

Note: The application is configured to have only one instance running at a time.

Points of interest

This small application is written just for the purpose of explaining Windows Forms development. The article itself does not contain any explanation on Windows Forms but gives a brief introduction to the application and pointers on how to use the code. But I hope someone could find some bits and pieces of this application useful. I am ready to enhance the application and make changes to improve it and add more functionality, so suggestions are most welcome.  

History

  • 11 April 2012: First version.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Rahul Rajat Singh
Software Developer (Senior)
India India
I Started my Programming career with C++. Later got a chance to develop Windows Form applications using C#. Currently using C#, ASP.NET & ASP.NET MVC to create Information Systems, e-commerce/e-governance Portals and Data driven websites.

My interests involves Programming, Website development and Learning/Teaching subjects related to Computer Science/Information Systems. IMO, C# is the best programming language and I love working with C# and other Microsoft Technologies.
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
GeneralFor all that voted 1 PinmemberFernandoUY8-Sep-12 8:02 
GeneralRe: For all that voted 1 PinmvpManfred R. Bihy22-Oct-12 5:26 
GeneralRe: For all that voted 1 PinmemberFernandoUY31-Oct-12 8:46 
GeneralMy vote of 1 Pinmembernick_journals31-May-12 10:26 
GeneralMy vote of 1 PinmemberFerretallicA25-Apr-12 17:16 
GeneralMy vote of 1 Pinmemberknoami14-Apr-12 23:21 
GeneralMy vote of 1 PinmemberEduard Keilholz12-Apr-12 21:01 
QuestionSome initial feedback PinprotectorMarc Clifton12-Apr-12 2:05 
GeneralMy vote of 1 Pinmembert_rex12-Apr-12 0:12 
Agree with previous votes - tha's just a grid, no Metro style in this app at all.
GeneralMy vote of 1 PinmemberSeishin#11-Apr-12 22:30 
GeneralMy vote of 1 PinmemberSteve Hansen11-Apr-12 21:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140421.2 | Last Updated 11 Apr 2012
Article Copyright 2012 by Rahul Rajat Singh
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid