还是惯例,直接贴代码:(以后会练练写作技能)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace TopMaster
{
public partial class frm_TopMaster : Form
{
[DllImport("user32.dll ")]
private static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32 ")]
public static extern long SetWindowPos(IntPtr hwnd, long hWndInsertAfter, long X, long y, long cx, long cy, long wFlagslong);
public frm_TopMaster()
{
InitializeComponent();
timer1.Start();
GetProcess();
}
private void timer1_Tick(object sender, EventArgs e)
{
GetProcess();
}
private void GetProcess()
{