我希望在另一个线程中运行BackgroundWorker进程的同时,显示沙漏光标并禁用窗口。
这是我的做法:
窗口已经像我想要的那样变为禁用状态,但光标仍然是箭头。我该如何将其设置为等待光标?
根据这个问题:Disabling all but one control in a WPF window,似乎对于vg1890是有效的。
这是我的做法:
Private Sub MyButton_Click(...)
Dim box As New AnotherWpfWindow()
box.Owner = Me
...
box.ShowDialog()
If (box.DialogResult.GetValueOrDefault = True) Then
Me.IsEnabled = False
Me.Cursor = Cursors.Wait
MyBackgroundWorker.RunWorkerAsync()
End If
End Sub
Private Sub MyBackgroundWorker_RunWorkerCompleted(...)
UpdateInterface()
Me.IsEnabled = True
Me.Cursor = Cursors.Arrow
End Sub
窗口已经像我想要的那样变为禁用状态,但光标仍然是箭头。我该如何将其设置为等待光标?
根据这个问题:Disabling all but one control in a WPF window,似乎对于vg1890是有效的。