private void myMethod_QQShake(){ //将此方法,假如窗体的 Shown 事件中即可。 //using System.Threading Point point = this.Location; for ( int i = 0 ; i <= 6 ; i++ ) { //*(new Random()).NextDouble()随机数值 this.Top = (int)( point.Y + 5 * Math.Pow(-1 , i) );//上下震动5像素 this.Left = (int)( point.X + 5 * Math.Pow(-1 , i) );//左右震动 5像素 Thread.Sleep(25); } this.Location = point; }