w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to properly show Settings window on application start (in WinForms)?

All my project i had setting / user login screen. what i do to prevent this is open the actual main form invisible but within the FormLoad() i call show dialog all the screens i need input. then upon checking all dialogresult if they are valid i let the formload() of the main form continue usually all left is applying filter on dashboard elements that might be on that main form and finally put back visible the form.

i'll alos add you should use opacity and NOT visibility because it cause screen flicker. i noticed on average business computers they are pretty slow and if you set the default visibility in the property grid at design time to visible = false that the form actually show up when the formLoad() is called but then see the property and goes invisible after. on 1.8/2.0 ghz computer with video cards you don't see this much unless you load a crap load of stuff in the load method. I found a workaround is to set opacity to 0. opacity to 0 is set before the form render as i can see from personal result experience (didn't actually check override on paint and stuff like that). so i stopped using visibility if it required to be invisible at start an use opacity instead.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.