I am using the toolbar control and when you click on it, it does not take focus like a command button does.
Is there any way of forcing it to take focus when you click on it so that the lostfocus event of the control which has focus at the time you click on the toolbar is triggered?
This control does not have a gotfocus event.
One way I thought of was to call the lostfocus event of the control
not all controls can take focus, I don't know how you could fake it.
But the solution might be easier that doing something along those lines anyway. Do you really need to use the LostFocus event? Would the Validate event do the job instead?
I called the text box's loctfocus event inside the text box's validate event procedure and the text box text is formatted into a date when you click on the toolbar just as if it had taken the focus.