Print Page | Close Window

Bug in CommandBars_InitCommandsPopup ...

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=2495
Printed Date: 07 July 2024 at 6:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug in CommandBars_InitCommandsPopup ...
Posted By: Superpippo
Subject: Bug in CommandBars_InitCommandsPopup ...
Date Posted: 02 July 2005 at 12:06am

I have a problem with CommandBars_InitCommandsPopup event.

In my application i build the popup menu at runtime starting from CommandBars_InitCommandsPopup.

All works fine but....look at the sample code in attachment.

Start the code, from the application window select an item on menu, so you can see the popup menu. Now press and keep pressed the rigth arrow on the keyboard of your pc to navigate in the items of main menu, after few second you get an error and a vb crash!

I try to manage it with a static flag to exit from sub if a previous event calling is pendent but doesn't work.

Any ideas ?

Best regards

SuperPippo

http://forum.codejock.com/uploads/Superpippo/2005-07-02_000544_BugInCommandBars_InitCommandsPopup.zip - 2005-07-02_000544_BugInCommandBars_InitCommandsPopup.zip

 

P.S. I think that a good way to solve the problem is if you give as something like "cancel" option of query_unload event of vb form, setting cancel to true = event chain cancel.

 



-------------
SuperPippo



Replies:
Posted By: Oleg
Date Posted: 04 July 2005 at 2:32am

You can't call DoEvents in InitCommandsPopup

just comment it in sample/your application.



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


Posted By: Superpippo
Date Posted: 04 July 2005 at 2:54am

Dear Oleg,

naturally i know that without doevents all works fine, but how many code in the world doesn't have doevents? My application is really complex and in my code i need dovents!   

Why I can't call DoEvents in InitCommandsPopup ? It seems to be an architectural limit of commandbar!

It seems as the commandbar popup event is pending when the code is in InitCommandPopup. If this is the case, to have full functionality of InitCommandPopup you must give us a cancel parameter to stop the event chain. Otherwise you have to send the popup message after the initcommandpopup event. Without this InitCommandPopup is workless.

Can you modify this ?

Thank you.

 

 



-------------
SuperPippo



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