01.
using
System;
02.
using
System.Collections.Generic;
03.
using
System.ComponentModel;
04.
using
System.Data;
05.
using
System.Drawing;
06.
using
System.Linq;
07.
using
System.Text;
08.
using
System.Windows.Forms;
09.
using
System.Diagnostics;
10.
using
System.Runtime.InteropServices;
11.
using
System.Threading;
12.
using
System.Diagnostics;
13.
14.
15.
namespace
WindowsFormsApplication1
16.
{
17.
public
partial
class
Form1 : Form
18.
{
19.
public
Form1()
20.
{
21.
InitializeComponent();
22.
}
23.
24.
private
void
button1_Click(
object
sender, EventArgs e)
25.
{
26.
Process p = Process.Start(
"test_nor.exe"
);
27.
Thread.Sleep(1000);
28.
}
29.
[DllImport(
"user32.dll"
, CharSet = CharSet.Auto)]
30.
public
static
extern
IntPtr FindWindow(
string
classname,
string
windowname);
31.
[DllImport(
"user32.dll"
)]
32.
public
static
extern
bool
SetForegroundWindow(IntPtr p);
33.
34.
35.
36.
private
void
button2_Click(
object
sender, EventArgs e)
37.
{
38.
39.
}
40.
41.
private
void
textBox1_TextChanged(
object
sender, EventArgs e)
42.
{
43.
44.
}
45.
46.
private
void
button3_Click(
object
sender, EventArgs e)
47.
{
48.
this
.Close();
49.
50.
}
51.
52.
}
53.
}