切換滑鼠到等待狀態

  • 1758
  • 0
  • 2012-02-03

摘要:切換滑鼠到等待狀態

            Cursor C = this.Cursor;
            this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
            Application.DoEvents();
            Form2 f = new Form2();                        
            f.MdiParent = this;            
            f.Show();
            this.Cursor = C;  

先把滑鼠換成等待, 等需要長時間執行的部分結束後再換回來