-
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
-
Does this help...
I think that I got what you are trying to get at. One thing that you could do is to unload the current form each time that you load a new form, so that at any one time, there is only one form loaded. Another thing that you could do would be to use the enable property on the buttons that show the user which f keys he/she can use. You can also use the pre-set vb keys. Hope this helps somewhat
Owen Holiday
-
ActiveForm
I think that's what you want to use and set Form1.tag to "Form1" and so on...
-
You can also use ActiveForm.Name.