Mega Code Archive
Activated and Deactivated events monitors the activation status of an application
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Threading;
namespace ActivationSample
{
public partial class App : System.Windows.Application
{
void App_Startup(object sender, StartupEventArgs e)
{
}
void App_Activated(object sender, EventArgs e)
{
Console.WriteLine("App_Activated");
}
void App_Deactivated(object sender, EventArgs e)
{
Console.WriteLine("Deactivated");
}
void App_Exit(object sender, ExitEventArgs e)
{
Console.WriteLine("Exit");
}
}
}