Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 181577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:47:18+00:00 2026-05-11T14:47:18+00:00

I want to show the hourglass cursor and disable the window while a BackgroundWorker

  • 0

I want to show the hourglass cursor and disable the window while a BackgroundWorker process runs in another thread.

This is what I’m doing:

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 

The window becomes disabled like I want, but the cursor remains an arrow. How can I make it the Wait cursor?

It seems to work for vg1890 according to this question: Disabling all but one control in a WPF window

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:47:18+00:00Added an answer on May 11, 2026 at 2:47 pm

    What seems to be happening here is that WPF is ignoring the Cursor setting on the disabled window. The following workaround seems to work: instead of disabling the window itself, disable the content of the window:

    C#:

    ((UIElement)Content).IsEnabled = false; Cursor = Cursors.Wait;  // and in RunWorkerCompleted handler: ((UIElement)Content).IsEnabled = true; Cursor = Cursors.Arrow; 

    Visual Basic:

    DirectCast(Content, UIElement).IsEnabled = False Cursor = Cursors.Wait  ' and in RunWorkerCompleted handler:' DirectCast(Content, UIElement).IsEnabled = True Cursor = Cursors.Arrow 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to show activity indicator while sending and receiving synchronous asihttprequest from server.
I want to pop up a window to show that a program is busy
I want show weather information from xml to this URL: http://www.google.com/ig/api?weather=roma&hl=it using this script:
I have a paragraph <p>hello<br>wor&nbsp;l&nbsp;d</p> then I want show the paragraph's html in another
I want show dialog after finish Thread. In thread I am changing TextView's Value
I want show my project main window in the middle of the screen .
I have saved same image into /data/data/mypackage/img/ and now I want show this full
i want show 123 in my input tag value i write this: <INPUT TYPE=text
I use : Window.showModalDialog(...) to open a dialog window, I want show some HTML
I want show annotation view (above one of my pin) after load map. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.