* "Sameh Ahmed" <es******@hotmail.com> scripsit:
Is there a way to get the last control that was in focus before the current
control?
please note that I don't want the next or previous control in the tab order,
I need the last one used by the user.
Recursively loop through the controls and add a handler to their
'LostFocus' event. This handler will receive the event for all
controls. Inside the handler, you can cast 'sender' to 'Control' and
assign it to a private member.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>