/// <summary>
/// 关键代码
/// </summary>
/// <returns></returns>
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
static extern uint GetTickCount();
static void Delay(uint ms)
{
uint start = GetTickCount();
while (GetTickCount() - start < ms)
{
Application.DoEvents();
}
}