Showing posts with label Windows Development. Show all posts
Showing posts with label Windows Development. Show all posts

05 June 2011

Windows App - Detecting Running Instance

Code to detect if an windows application instance is already running or not:

static class Program
    {
        ///
        /// The main entry point for the application.
        ///
        [STAThread]
        static void Main()
        {
            if (IsPreviousInstanceRunning)
            {
                MessageBox.Show("Another instance of this application is already running...", "Application already running", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new frmMain());
            }
        }

        private static bool IsPreviousInstanceRunning
        {
            get
            {
                // get the name of our process
                string proc = Process.GetCurrentProcess().ProcessName;
                // get the list of all processes by that name
                Process[] processes = Process.GetProcessesByName(proc);
                // if there is more than one process...
                if (processes.Length > 1)
                    return true;
                return false;
            }
        } 
    }

06 June 2010

Working On Windows Application

Web to Windows Application shift was not something i was hoping for when i stared with ASP.NET.
But as it turns around i got a Good Domain "Medical Insurance" to work on, and so i readily accepted the challange.
Been busy eversince last 4 months.
Hey it does get boring at times but just look at the good things i got to learn...

1.Large database handling techniques!!
2.Really improved my SQL Server knowledge and skills.
3.Learnt a lot more about Crystal Reports and Windows Application.
4.Got to know how to communicate with clients (USA). And loving it!
5.Really learnt how to work in a shared environment, using source safe, communicating with developers across the globe, coding standards etc etc.

So all in all its a great addition to my Resume!

And now the Best Part is that we are implementing the same functionality on a Web Portal as well.
Ain't that great!!

ASP.NET here i come again!!