I have a problem with a MessageBox window changing my wait cursor back to default and not letting me override it again. If i comment out the "Are you sure" message box the wait cursor works as intended (wait cursor is visible during the long running method). However with the program as normal no matter what i do the mouse is always default.      private void btn_Click(object sender, EventArgs e)     {         this.Cursor = Cursors.WaitCursor;          if (string.IsNullOrWhiteSpace(textbox1.Text))         {             MessageBox.Show("Text Box 1 Can't Be Empty");         }         else if (string.IsNullOrWhiteSpace(textbox3.Text))         {             MessageBox.Show("Text Box 3 Can't Be Empty");         }         else if (string.IsNullOrWhiteSpace(textbox4.Text))         {             MessageBox.Show("Text Box 4 can't be empty");         }         else if (string.IsNullOrWhiteSpace(textBox2.Text))         {             HelperClass.MethodThatCanHandleEmptyTextBox2(textBox1.Text, textBox3.Text, textBox4.Text));         }         else          {             //problem line                             DialogResult result = MessageBox.Show("Are you sure you wish to proceed?", "Are You Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);              if (result == DialogResult.Yes)             {                this.Cursor = Cursors.WaitCursor; //doesn't work                                    //long running method                HelperClass.DoMethodThatNeedsAllFields(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text); //long running method                 MessageBox.Show("All done!");             }          }           this.Cursor = Cursors.Default;       }   I have tried all of these both inside and outside of the if (result == yes) condition, but to no avail:  Cursor = Cursors.WaitCursor;  Form1.ActiveForm.UseWaitCursor = true; //throws runtime exception  Cursor.Current = Cursors.WaitCursor;  Application.UseWaitCursor = true;  Application.DoEvents();  I have also tried threads AND tasks but neither of those have worked as well. Is there something I'm missing?
Is there a difference between Cursor.Current and this.Cursor (where this is a WinForm) in .Net? I've always used this.Cursor and have had very good luck with it but I've recently started using CodeRush and just embedded some code in a "Wait Cursor" block and CodeRush used the Cursor.Current property. I've seen on the Internet and at work where other programmers have had some problems with the Cursor.Current property. It just got me to wondering if there is a difference in the two. Thanks in advance.  I did a little test. I have two winforms. I click a button on form1, set the Cursor.Current property to Cursors.WaitCursor and then show form2. The cursor doesn't change on either form. It remains Cursors.Default (pointer) cursor.  If I set this.Cursor to Cursors.WaitCursor in the button click event on form1 and show form2, the wait cursor only shows on form1 and the default cursor is on form2 which is expected. So, I still don't know what Cursor.Current does.
I'm new to linux and the terminal. As I learn how to use the terminal to navigate through directories, I like to use the gui file explorer to mirror my terminal navigation. The icons and file extension info in the gui file explorer help me figure out what everything is. However, I can't access the root folder via the gui, I can only access it via the terminal. Is there a way to enable access to the root folder outside of the terminal? Why is there no 32 bit ISO for the new Ubuntu 18.04? Why is there no 32 bit ISO for the new Ubuntu 18.04? How to integrate OpenCV Manager in Android App Postgis, get the points that are x meters near another point, in meters Currently selected indicator's colour in flag summary and help pages, can be the same as the site's colour code ID a book about a mirror world and 4th dimension I read a book about 10-15 years ago about a boy and a girl who find a mirror. What made the mirror special was, they were able to enter the reflection and be a part of the reverse image world. They end up going to school and when asked to write something on the board, it ends up being backwards, but to them looks normal.  Later, the two end up in a world with 4 dimensions. With the added dimension they can't see as they normally could. If one moved a certain way the other would see their insides. Eventually a native of that dimension made some type of device that lets them see regularly.  Other than that my memory is blank. If I remember anything else I will be sure to edit it in. How to prove $b=c$ if $ab=ac$ (cancellation law in groups)? Closed form for an infinite product The following fascinating formula appears in the paper  by M.Chamberland and A.Straub (see page 9): $$\prod_{n=2}^\infty\left(1-\frac{1}{n(n-1)}\right)=-\frac1\pi\cos\left(\frac{\sqrt5}{2}\pi\right).$$ Unfortunately, it's given without any reference or explanation. Could anyone give one? Syntax error on print with Python 3 Why is the probability that a continuous random variable takes a specific value zero? My understanding is that a random variable is actually a function $X: \Omega \to T$, where $\Omega$ is the sample space of some random experiment and $T$ is the set from which the possible values of the random variable are taken.  Regarding the set of values that the random variable can actually take, it is the image of the function $X$. If the image is finite, then $X$ must be a discrete random variable. However, if it is an infinite set, then $X$ may or may not be a continuous random variable. Whether it is depends on whether the image is countable or not. If it is countable, then $X$ is a discrete random variable; whereas if it is not, then $X$ is  continuous.  Assuming that my understanding is correct, why does the fact that the image is uncountable imply that $Pr(X = x) = 0$.  I would have thought that the fact that the image is infinite, regardless of whether it is countable or not, would already imply that $Pr(X = x) = 0$ since if it is infinite, then the domain $\Omega$ must also be infinite, and therefore  $$Pr(X = x) = \frac{\text{# favorable outcomes}}{\text{# possible outcomes}} = \frac{\text{# outcomes of the experiment where X = x}}{|\Omega|} = \frac{\text{# outcomes of the experiment where X = x}}{\infty} = 0$$  What is wrong with my argument?  Why does the probability that a continuous random variable takes on a specific value actually equal zero? how many distinct values does it have? How can I prevent Chrome from offsetting newly opened Window? When I open a new Window in Chrome on Windows 7 (by pressing CTRL+N), the new window does not exactly overlap the existing window.   Instead it is offset to the right slightly.   So, immediately after opening a new window I have to manually move it to the left so that it uses the full screen real estate.   Is there a way to prevent this offset? How to create csv files in controller method from list I want to create csv files from lists and send an email attaching them, how to do that in a controller method? Install python packages for specific python version I understand that in Ubuntu 14.04, you have access to both python 2.7.6 and python 3.4.0. When getting python packages through the command line, how do I make sure that I am installing packages meant for python 2.7.6 and not for python 3.4.0? Warning: mysql_fetch_* expects parameter 1 to be resource, boolean given error Is a DSL splitter required, if only a Modem is attached to the line? Did Emperor Palpatine know about Luke and Leia from the beginning? Did Emperor Palpatine know that Padme had given birth to twins while it was happening?  Was it his long-term goal to have Vader only discover his offspring later, at some "correct" moment? I am nearing the end of my PhD and I would quite like to buy a "thank you" gift for my supervisor (although, she's the socially awkward type who I'm sure will be greatly embarrassed to receive one).  I'm just wondering whether a gift is the done thing? And if so, what sort of gift seems appropriate? I suppose a bottle of wine would be a safe choice? $dx$ appears in differential equations, such us derivatives and integrals.  For example, a function $f(x)$ its first derivative is $\dfrac{d}{dx}f(x)$ and its integral $\displaystyle\int f(x)dx$. But I don't really understand what $dx$ is. Can't Use /Summon Command