![]() |
New CommandBars bug..? |
Post Reply
|
| Author | |
Majek
Groupie
Joined: 20 November 2006 Status: Offline Points: 24 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Majek
Groupie
Joined: 20 November 2006 Status: Offline Points: 24 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 May 2007 at 9:18am |
|
Thanks, works great! Exactly what I was trying to do. I appreciate the help.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |