|
-
Mar 3rd, 2001, 10:06 AM
#1
Thread Starter
Addicted Member
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
-
Mar 3rd, 2001, 10:28 AM
#2
Lively Member
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
"Programmers by passion, profession and insanity.
Insane from the irrational, illogical and VB."- ThreeMinds
-
Mar 3rd, 2001, 10:52 AM
#3
Lively Member
ActiveForm
I think that's what you want to use and set Form1.tag to "Form1" and so on...
-AndySoft
[email protected]
[email protected] (Use the other one first!)
I use: NASM, HTML, Perl, PHP, JavaScript, Batch, TI-Basic (TI-83+), QBasic 1.1, QuickBASIC 4.5, QuickBASIC Extended 7.1, VB-WIN 6 Ent., and the rest of Visual Studio 6 Ent.  And who knows what else!
-
Mar 3rd, 2001, 12:04 PM
#4
Monday Morning Lunatic
You can also use ActiveForm.Name.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|