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);
Try this