Lock ribbon button in VB.NET - vb.net

I am developing a application in VB.NET. The user interface contains a ribbon tab with a few ribbon buttons. On each ribbon button click event, the application will execute a process.
When a process being executed, I want to lock the click event of other ribbon buttons. It means, the user should not be able to pick the other ribbon buttons.
I do not find the lock property for ribbon buttons. To avoid the button getting grey, I do not want to disable the button. please provide your suggestion.

Related

How can I remove keyboard focus from a button on User Control after clicking it, in a vb.net PowerPoint add-in?

I have a vsto add-in for PowerPoint (vb.net) which includes a User Control with several buttons.
After clicking any of those buttons, or the User Control itself, I can't immediately use 'Ctrl' keyboard shortcuts, like Ctrl+C. It seems that the button or the User Control gets the focus. If I click on the slide, 'Ctrl' keyboard shortcuts work again.
Is there a way that I can take the focus away from the Button / User Control, in my Button1.Click event handler, in order to be able to use Ctrl+C right away? Or a way in which I can place the focus on the PPT Presentation?
I have searched and tried a ton of different methods, with no success...
PS: One observation I have made is that if instead of a Button, I click a Panel within my User Control, I do not have this problem.
Another observation is that while I can't use 'Ctrl' shortcuts right after clicking the button, 'Alt' shortcuts continue working fine.

Assign Event by Event Handler

In my application i am using Krypton Component Factory.
My application i have Ribbon Menu and Some krypton buttons. In krypton buttons i want to assign click event of Ribbon Menu Group Button at run time. The events of Ribbon Menu Group Button Changed Based some condition so i tried like this
Dim eventsField = GetType(Component).GetField("events", BindingFlags.NonPublic Or
BindingFlags.Instance)
Dim eventHandlerList = eventsField.GetValue(KryptonRibbonGroupButton1)
eventsField.SetValue(KryptonButton1, eventHandlerList)
Its not work. The Get Field always return nothing.
Problem: I want add handler of Krypton Button Click event by old ribbon menu button throw coding using the controls name only. Its Possible or not? Its possible how to do it?
am using Vb.Net
Perhaps you're looking for AddHandler?

Refreshing Custom Ribbon Tab in Excel 2010 When Someone Clicks on the Tab

I've been writing a custom ribbon with VSTO (using VB.net and XML) and I have written a number of buttons who's labels & pressed states depend on the calculation mode that Excel is in.
The getPressed and getLabels callback functions check for the excel calculation mode but these are only called when the ribbon is first loaded or the buttons are clicked. If someone were to go into the "formulas" tab, change the calculation mode and then go back to the custom ribbon tab, the pressed states and labels on the buttons in this custom tab would now be incorrect.
Is there a way to trigger these callback functions to be called (eg a way to call the ribbon.invalidate() function) when someone clicks on the custom ribbon tab in Excel?

Dotnetbar Tab Control TabItem Closing Prompt

I am using dotnetbar with visual studio 2010.
I added dotnetbar tabcontrol to my form, with close buttons on tabs visible.
I just wanna get a message box prompt, when closing a tab by clicking on their close button on the tab, whether to close it or not.
If "Yes" clicked, tab closes.... else not.
I can't find a close button click event or any other method to do that.
Use TabItemClose event and if needed set Cancel=true on event arguments to prevent closing.

Right Click event not firing in VSTO code for PowerPoint 2010

I'm attempting to add a Context Menu option to PowerPoint 2010 that only appears when text is selected. Unfortunately the WindowBeforeRightClick event does not seem to fire if the mouse is inside of a TextBox.
Is there a different event I need to be listening to or a better way to add that context menu?