i have a program that has mulitple forms. but each form uses the f keys( but each form has different functions regarding these f keys). so how do i tell which is the current window.
say in form 1, if the user presses f1 it will display a message.
but in form2 if the user presses f1 it does nothing.
this works fine,
but i have a list of images at the bottom of the program
displaying the 12 f keys,
but i want only the keys that are being used on that form showing as enabled. and the rest grey out so that the user knows what they can press.
so for example if form 1 is the current window, i want f1 image to be enabled, but if the form2 is the current form then i want f1 not enabled.
the only this i am struggling how to find out which is the current window.

i hope i have explained my self clearly
if not please tell me and i will explain more