using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace Key
{
public partial class Form1 : Form
{
IntPtr ptr = (IntPtr)null;
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();