Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - New CommandBars bug..?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

New CommandBars bug..?

 Post Reply Post Reply
Author
Message
Majek View Drop Down
Groupie
Groupie


Joined: 20 November 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Majek Quote  Post ReplyReply Direct Link To This Post Topic: New CommandBars bug..?
    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.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Majek View Drop Down
Groupie
Groupie


Joined: 20 November 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Majek Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2007 at 9:18am
Thanks, works great! Exactly what I was trying to do. I appreciate the help.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.