Problem with splashscreen of WindowsFormsApplicationBase not closing

After cracking my head on this one, I found out what’s going on and wanted to share it here. I’ve got a winform app setup and wanted to use a splashscreen to show during loading. I’m using the WindowsFormsApplicationBase class to do this, which works fine. The SplashScreen appears, but I had the problem that it wouldn’t close any more. It seems that your MainForm form has to inherit from the Form class, which mine didn’t. As soon as I changed it back; it worked again. Probably, some internal routine of the WindowsFormsApplicationBase class checks if the instance of MainForm is a Form, which it isn’t primarily in this case. Offcourse the class which it inherits does inherit the Form class, but that doesn’t change a thing apparantly.

Related posts

Latest posts

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *