The .Net framework libraries does not provide you an API to query for the focused Control. You have to invoke a windows API to do so: