เปลี่ยนเคอเซอร์ ให้เป็นรูปนาฬิกาทราย เพื่อให้ทราบว่าโปรแกรมกำลังทำงาน
private void Hourglass(bool Show) { if (Show == true) { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; } else { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; } return; }
เรียกใช้ดังนี้
this.Hourglass(true); this.getData(); this.Hourglass(false);