MessageBoxOptions (edit)

Remove the MessageBoxOptions.DefaultDesktopOnly parameter and it will work correctly.

DefaultDesktopOnly specifies that "The message box is displayed on the active desktop" which causes the focus loss.

Given an instance of your Form, you can call a MessageBox like this:, "Message", "Title"); (Check the doc for other parameters.)

However if you want to call this from a background thread (e.g.: BackgroundWorker) you have to use Form.Invoke() like this:

{, "Message", "Title");

MessageBox.Show(this, "Message", "Caption", MessageBoxButtons.OK);

I got the message box to show on top of all other applications by calling it like so:

                        "Server registered successfully!", 
                        "Gyptech Micrometer OPC Server",

The vital part being that last parameter, MessageBoxOptions.DefaultDesktopOnly. Now the box shows over top of the installer : )

MessageBox.Show(index.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);

MessageBox.Show(new Form() { WindowState = FormWindowState.Maximized, TopMost = true }, "You clicked Cancel button", "Cancel");

Show the Wait Cursor

You can use Cursor.Current.

// Set cursor as hourglass
Cursor.Current = Cursors.WaitCursor;

// Execute your time-intensive hashing code here...

// Set cursor as default arrow
Cursor.Current = Cursors.Default;

However, if the hashing operation is really lengthy (MSDN defines this as more than 2-7 seconds), you should probably use a visual feedback indicator other than the cursor to notify the user of the progress. For a more in-depth set of guidelines, see this article.

As @Am pointed out, you may need to call Application.DoEvents(); after Cursor.Current = Cursors.WaitCursor; to ensure that the hourglass is actually displayed.