Search Results

Search found 3 results on 1 pages for 'arc1880'.

Page 1/1 | 1 

  • Displaying wait cursor in while backgroundworker is running

    - by arc1880
    During the start of my windows application, I have to make a call to a web service to retrieve some default data to load onto my application. During the load of the form, I run a backgroundworker to retrieve this data. I want to display the wait cursor until this data is retrieved. How would I do this? I've tried setting the wait cursor before calling the backgroundworker to run. When I report a progress of 100 then I set it back to the default cursor. The wait cursor comes up but when I move the mouse it disappears. Environment: Windows 7 Pro 64-bit VS2010 C# .NET 4.0 Windows Forms EDIT: I am setting the cursor the way Jay Riggs suggested. It only works if I don't move the mouse. **UPDATE: I have created a button click which does the following: When I do the button click and move my mouse, the wait cursor appears regardless if I move my mouse or not. void BtnClick() { Cursor = Cursors.WaitCursor; Thread.Sleep(8000); Cursor = Cursors.Default; } If I do the following: I see the wait cursor and when I move the mouse it disappears inside the form. If I move to my status bar or the menu bar the wait cursor appears. Cursor = Cursors.WaitCursor; if (!backgroundWorker.IsBusy) { backGroundWorker.RunWorkerAsync(); } void backGroundWorkerDoWork(object sender, DoWorkEventArgs e) { Thread.Sleep(8000); } void backGroundWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { Cursor = Cursors.Default; } If I do the following: The wait cursor appears and when I move the mouse it still appears but will sometimes flicker off and on when moving in text fields. if (!backgroundWorker.IsBusy) { backGroundWorker.RunWorkerAsync(); } void backGroundWorkerDoWork(object sender, DoWorkEventArgs e) { UseWaitCursor = true; Thread.Sleep(8000); } void backGroundWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { UseWaitCursor = false; }

    Read the article

  • C# Login Dialog Implementation

    - by arc1880
    I have implemented a LoginAccess class that prompts the user to enter their active directory username and password. Then I save the login data as an encrypted file. Every subsequent start of the application, the LoginAccess class will read the encrypted file and check against the active directory to see if the login information is still valid. If it is not, then it will prompt the user again. I have made it so that the reading of the encrypted file and displaying of the login dialog is done on a separate thread. A delegate is fired when the login process is complete. The issue that I'm having is that I have a class that is used in multiple places. This class contains the call to the LoginAccess object. Every time I instantiate a new object there are multiple calls to the LoginAccess object and I get multiple dialogs appearing when it tries to prompt for a username and password. Any suggestions on how to have only one dialog appear would be greatly appreciated.

    Read the article

  • How do I programmatically set Integrated Windows Authentication in IIS on a .NET web service?

    - by arc1880
    I have a web service project that needs to be set to use Integrated Windows Authentication after installation. Normally, I would install the web service, then manually go to IIS and make sure the box is checked for Integrated Windows Authentication. There has to be a way to do this through code. I have looked up on using the Installer class. It looks like this is something I could use, but I have not found anything on setting properties programmatically in IIS.

    Read the article

1