only My site

Friday, February 25, 2011

WPF : Restrict Multiple Instance

protected override void OnStartup(StartupEventArgs e){

// Get Reference to the current Process

Process thisProc = Process.GetCurrentProcess();

// Check how many total processes have the same name as the current one

if (Process.GetProcessesByName(thisProc.ProcessName).Length > 1)

{

// If ther is more than one, then it is already running.

MessageBox.Show("Another Instance is already running.");

Application.Current.Shutdown();

return;

}

base.OnStartup(e);

}

Vandalore Zoo, Chennai




Sunday, February 6, 2011

My visit to United Kingdom (London)

Today I arrived to London Gatwick Airport this morning at 7 AM. Earlier I started from Chennai on 5th Feb 2011 and spent a couple of hours at Dubai Airport to catch K11 Emirates flight.

It was a wonderful experience on arrival at London. The weather is very cold and 11 degree temperature. I was freeze while waiting for my Taxi from hotel.

I miss my loving daughter Ashvitha and my wife.

My only focus is to make my assigned task success...