Microsoft KB Archive/141143

= How to Determine the Active & Previously Active Forms =

Article ID: 141143

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q141143



SUMMARY
The command _SCREEN.ACTIVEFORM.NAME tells you the name of the active form. There is another way to determine the currently active form and to determine which form was active before the current form.



MORE INFORMATION
 Create three forms (Form1, Form2, and Form3).  Open the debug window and type the following: _SCREEN.FORMS(1).NAME _SCREEN.FORMS(2).NAME _SCREEN.FORMS(3).NAME _SCREEN.ACTIVEFORM.NAME _SCREEN.FORMCOUNT   Inside the Command window, type the following: DO FORM FORM1 DO FORM FORM2 DO FORM FORM3 Note the following from the debug window: _SCREEN.FORMS(1).NAME        FORM1 _SCREEN.FORMS(2).NAME        FORM2 _SCREEN.FORMS(3).NAME        FORM3 _SCREEN.ACTIVEFORM.NAME      FORM3 _SCREEN.FORMCOUNT            3

Note that _SCREEN.FORMS(3)= _SCREEN.ACTIVEFORM   Select Form1, and note the following changes from the debug window: _SCREEN.FORMS(1).NAME        FORM2 _SCREEN.FORMS(2).NAME        FORM3 _SCREEN.FORMS(3).NAME        FORM1 _SCREEN.ACTIVEFORM.NAME      FORM1 _SCREEN.FORMCOUNT            3 