LoginForm hides or closes automatically when the ShowInTaskBar property is false
LoginForm hides or closes automatically when the ShowInTaskBar property is false I am developing an application in C# Winforms with system login where I have two forms, one being the main MainForm and the other which is for the login LoginForm . MainForm LoginForm This application has a Modern Flat UI Design interface, so it wants the LoginForm form is displayed in front of the MainForm form, to not display its icon in the taskbar and not allow the user to interact with MainForm to display it's been use of the method ShowDialog(); . Modern Flat UI Design LoginForm form MainForm MainForm ShowDialog(); LoginForm compacted code: LoginForm public partial class LoginForm : Form { protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.ShowInTaskbar = this.ShowIcon = false; } } MainForm compacted code: MainForm public partial class MainForm : Form { protected override void OnLoad(EventArgs e) { base.OnLoad(e); new Logi...
