2017-08-15 76 views

回答

1

如果你的「特定區域」由控制覆蓋,你可以設置控件的Cursor屬性Cursors.WaitCursor。在你的情況下,它似乎是你有一個TextBox

yourTextBox.Cursor = Cursors.WaitCursor; 

否則,添加一個新的控制形式:

var control = new Control(); 
// use the Location and Size properties to define your "area' 
control.Location = ...; 
control.Size = ...; 
// set the cursor 
control.Cursor = Cursors.WaitCursor; 
yourForm.Controls.Add(control); 
+0

第一種方法的工作原理然而,這只是光標設置爲一個Wait.Cursor當它懸停在TextBox上時 - 是否有辦法將此與正在進行的處理相關聯,以便在處理完成後返回到默認值? –

+0

@EmilyMartin處理後,您可以將其設置回'Cursor.Current'或'Cursors.Arrow'。 – Sweeper