Show waiting cursor while starting and loading application

.net, c#, winforms

Solution

Try this

//Set the cursor to appear as busy
Cursor.Current = Cursors.WaitCursor;

---Execute your code-------

//Make the Cursor to default
Cursor.Current = Cursors.Default;

Problem

I'm trying to show waiting cursor while my application initializes after clicking on exe file. My code is below ``` public MainWindow(string FileName):this() { this.Cursor = Cursors.WaitCursor; //some init code } ``` But cursor does change only for a moment of second. How to change it for the whole period my `some init code` executes? UPD: instantiation of the main window looks like this in `Program.cs` ``` mainWindow = new MainWindow(args[0]); Application.Run(mainWindow); ```

Original source