Windows form buttons work without focus

  • Thread starter Thread starter archie456
  • Start date Start date
A

archie456

Guest
Hi,


I've created a C# addon for Autodesk Revit which displays a modeless form that has various buttons on it to run certain commands.

This works well, but I've now discovered tool strips (I'm new to c# and windows forms). I've now removed the buttons from the form and used a toolstrip with buttons - this looks much cleaner.

But I've now noticed a strange effect. When had buttons on the form, I could click on them and they would work even though the focus would on Autodesk Revit and no my modeless form.

But now I have a tool strip, the buttons don't work unless the form has the focus, so in effect I need to click them twice - once to gain focus and again to operate them.

Is there any way I can change this operation and make the buttons on the toolstrip always work on first click?


Thanks.

Continue reading...
 
Back
Top