![]() On the Shortcut tab, click Minimized in the Run list, click Apply, and then click OK. To start Outlook in a minimized state when Windows starts, copy the shortcut to the Startup folder and leave a copy on the desktop. To do this, follow these steps: Right-click the shortcut created in the previous steps, and then click Copy. AustraliaI've successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs when trying to start with the app minimized. At first the problem was that the app would be minimized but would still appear in the alt-tab dialog. Changing the FormBorderStyle to one of the ToolWindow options (from the 'None' option) fixed this, but introduced another problem. When the app first starts the titlebar of the minimized window is visible just above the start menu:. Opening the form and the closing it causes it to hide properly. I've tried lots of variations, but here's essentially how it's working right now. WindowState is set to Minimized in the Designer. After some initialization in the constructor I have the following lines: this.Visible = false; this.ShowInTaskbar = false; When the NotifyIcon is double-clicked I have the following: this.WindowState = FormWindowState.Normal; this.Visible = true; this.ShowInTaskbar = true; Like I said, I've tried lots of minor variations on this (this.Hide(), etc.). Is there a way to have the NotifyIcon be the primary component such that I can completely start and dispose of the form while leaving the NotifyIcon running? There's got to be a way to start the app with the form minimized without any of the weirdness. Start Program Minimized To System TrayPlease help me find it! When minimizing an application and you want to hide it from Alt+Tab: You also need to set the Opacity to stop the titlebar showing near the Start Menu when you set the Border Style to a Tool Window. On Minimize Event: this.Visible = false; this.Opacity = 0; this.FormBorderStyle = FormBorderStyle.FixedToolWindow; this.ShowInTaskbar = false; On Normalize Event: this.Visible = true; this.Opacity = 100; this.FormBorderStyle = FormBorderStyle.FixedSingle; //or whatever it was previously set to this.ShowInTaskbar = true.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2018
Categories |