Skip to content

Wait cursor problem

Areeb Quazi

Asked Nov 29, 2012, 10:07 PM EST2 answers
Share
LinkedInX
Hi,

I used Me.Cursor = System.Windows.Forms.Cursors.WaitCursor when I click on search
button because I want user does not click button again before execure all code. but user is able to click on button.
Is there any alternative for this except button disable.

Thanks

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Please add some flags in your code and use that flag to control search.

    bool executing = false;

    button_click()
    {
       if (executing == false)
         {
           executing = true;
            //do your search here...
            //once the search is completed,
          executing = false; 
         }

    }
    Hope this helps you.
    0
  • 0
    button enable / disable is another solution but I need functionality to show wait cursor and user not able to click on another control like text boxes etc
    0