using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
[DllImport("kernel32.dll")]
public static extern int GetCurrentProcessId();
public Form1()
{
InitializeComponent();
}
[B] private void button1_Click(object sender, EventArgs e)
{
if (GetCurrentProcessId() != 1234)
MessageBox.Show("No");
else
MessageBox.Show("Yes");
}[/B]
}
}