I am making on application which reduces to a NotifyIcon when minimised and again comes into existence when the NotifyIcon is double clicked.
Here is the code that works
	look at the series of calls in the Doubleclick event handler 
Show();
WindowState = FormWindowState .Normal;
if i change it to
WindowState = FormWindowState .Normal;
Show();
Than i can see something maximizing but it's not showing.I guess it is not able to paint itself.
Refresh() also not working
Why is this ???
					Here is the code that works
Code:
	namespace formspractice
{
    public partial class mainform : Form
    {
        public mainform()
        {
            InitializeComponent();
        }
        private void mainform_Resize(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
                Hide();
                notifyIcon.Visible = true;
                notifyIcon.ShowBalloonTip(3);
                
            }
        }
        private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            notifyIcon.Visible = false;
            Show();
            WindowState = FormWindowState.Normal;
        }
        private void mainform_FormClosing(object sender, FormClosingEventArgs e)
        {
            notifyIcon.Visible = false;
        }
    }
}
Show();
WindowState = FormWindowState .Normal;
if i change it to
WindowState = FormWindowState .Normal;
Show();
Than i can see something maximizing but it's not showing.I guess it is not able to paint itself.
Refresh() also not working
Why is this ???
Comment