Print Page | Close Window

Execute Event Not Fired

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=5202
Printed Date: 11 November 2024 at 4:02pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Execute Event Not Fired
Posted By: jcbrugnago
Subject: Execute Event Not Fired
Date Posted: 03 October 2006 at 10:16am
I'm evaluating Command Bars ActiveX control release 10.3.1 in Visual Studio 2005.
I have a button in the ribbon that calls de SaveFileDialog component of VS.
After this event is fired and the Save Dialog is shown, the Ribbon stop raising any of its events.
 
Anyone have an idea to solve that problem.
 
Sample code
 
Public Class Form1

Dim RibbonBar As RibbonBar

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

BuildRibbon()

End Sub

Private Sub BuildRibbon()

Dim Tab As RibbonTab

Dim Group As RibbonGroup

CommandBars.VisualTheme = xtpThemeOffice2007

RibbonBar = CommandBars.AddRibbonBar("Menu")

RibbonBar.EnableDocking(xtpFlagStretched)

RibbonBar.EnableFrameTheme()

Tab = RibbonBar.InsertTab(1, "Tab1")

Group = Tab.Groups.AddGroup("Group1", 10)

Group.Add(xtpControlButton, 100, "Button1")

End Sub

Private Sub CommandBars_Execute(ByVal sender As Object, ByVal e As AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent) Handles CommandBars.Execute

If e.control.Id = 100 Then

SaveFileDialog1.ShowDialog()

End If

End Sub

End Class

 



Replies:
Posted By: Oleg
Date Posted: 04 October 2006 at 12:43am
Hello,
 
Yes, it is some strange bug of .NET 2 - after ShowDialog call it just destroy our control.
Workaround we found is to use some parameter for ShowDialog - any control on form:
 

SaveFileDialog1.ShowDialog(SomButton)

ps. SaveFileDialog works fine with vc 2002, vc 2003/ Only vc 2005 has it.


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


Posted By: blazej
Date Posted: 19 October 2007 at 12:18pm
Hi,

All of my ShowDialog() calls take the main form as the parameter, like this: ShowDialog(_mainForm). And my events still stop firing...

???

Best,
Michal Blazejczyk


Posted By: Oleg
Date Posted: 19 October 2007 at 3:23pm
Hello,
try use some control on form. not form.
 
btw after update for all hotfixes and servicepacks the problem goes away. Seems Microsofts's fixed it.


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



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