Print Page | Close Window

New CommandBars bug..?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6947
Printed Date: 18 July 2025 at 1:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: New CommandBars bug..?
Posted By: Majek
Subject: New CommandBars bug..?
Date Posted: 21 April 2007 at 3:13am

I'm making a program that minimizes to the system tray. The problem is, when the "this.ShowInTaskbar" property is changed during runtime, it causes my CommandBars to freeze up completely. I commented out this.ShowInTaskbar and it stops CommandBars from freezing, but I cannot create the "minimize to tray" look that I am trying to create, which requires the this.ShowInTaskbar property to be changed. Here is my code below:

            private void frmMain_SizeChanged(object sender, EventArgs e)
            {
                switch (this.WindowState)
                {
                    case FormWindowState.Minimized:
                        Icon1.Visible = true;
                        this.ShowInTaskbar = false;
                        break;
                    case FormWindowState.Normal:
                        Icon1.Visible = false;
                        this.ShowInTaskbar = true;
                        break;
                }
            }
 
            private void Icon1_MouseDown(object sender, MouseEventArgs e)
            {
                if (e.Button == MouseButtons.Left)
                {
                    if (e.Clicks == 2)
                    {
                        this.WindowState = FormWindowState.Normal;
                    }
                }
 
I am using C# 2005 and CommandBars 10.1 ActiveX.



Replies:
Posted By: Oleg
Date Posted: 23 April 2007 at 1:18am
Hello,
 
 
I tried simple sample with

this.ShowInTaskbar = !this.ShowInTaskbar; call

and I see that .NET destroys window and creates it again.
CommandBars is simple ActveX - it can't find event when .NET window was destroed and when it need to restore self.
 

Think you can call this.Visible= false; instead to hide icon in taskbar.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Majek
Date Posted: 08 May 2007 at 9:18am
Thanks, works great! Exactly what I was trying to do. I appreciate the help.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net