Results 1 to 4 of 4

Thread: current window

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2000
    Posts
    157
    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

  2. #2
    Lively Member Owen Holiday's Avatar
    Join Date
    Mar 2001
    Location
    back where I started.
    Posts
    71

    Unhappy 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

  3. #3
    Lively Member AndySoft's Avatar
    Join Date
    Oct 2000
    Location
    Massillon, OH
    Posts
    68

    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!

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
  •  



Click Here to Expand Forum to Full Width