I have a .NET 3.5 Winforms project. This project has a main form with a toolbar on it with a toolbar button in it. And a simple normal button dropped directly on to the form.
When the main form starts up a smaller sub form is loaded up too in the load event of the main form with the .Show method (so it is not modal which is important). The focus is on this subform.
When I hover with the mouse over the toolbar button in the main form it responds to the mousehover event but when i click the toolbar button the main form first receives focus, so I have to click again. Only then the click event is fired. When I however do this to the normal button it immediatly responds to the click wether the sub form has focus or not.
So my question is why does this happen? And how can I prevent it so my endusers do not need to click the toolbar button twice?