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; }
by: 发表于:2018-01-29 11:01:49 顶(0) | 踩(0) 回复
??
回复评论