How to Create a Modal Browse WindowLast reviewed: April 30, 1996Article ID: Q121027 |
The information in this article applies to:
SUMMARYThe window in which a BROWSE is presented is, by default, not a modal window. This means that users can activate other windows while a Browse window is on the screen. In some cases, you may want the Browse window to be modal so that users cannot activate other windows while the Browse window is active. This article explains how to create a modal Browse window.
MORE INFORMATIONThe following sample code produces two Browse windows. The second Browse window will be modal so that users cannot activate any other window.
* The BROWSE will be terminated when F5 is pressed. * Disable the ESC key. ON KEY LABEL f5 DO myquit ON KEY LABEL esc * * Create a sample table for the first BROWSE. SELECT 1 CREATE TABLE one (myfield C(1)) INSERT INTO one (myfield) VALUES ("A") * Display the first Browse window. DEFINE WINDOW winone FROM 01,01 TO 10,50 BROWSE NOWAIT WINDOW winone * Create a sample table for the second BROWSE. SELECT 2 CREATE TABLE two (myfield C(1)) INSERT INTO two (myfield) VALUES ("B") * Display the second Browse window. DEFINE WINDOW wintwo FROM 11,01 TO 20,50 BROWSE NOWAIT WINDOW wintwo mquit = .F. READ MODAL WITH two VALID mquit=.T. * This point will be reached when the READ was * terminated by pressing the F5 key. Clear the * ON KEY LABEL assignments. ON KEY LABEL f5 ON KEY LABEL esc RETURN PROCEDURE myquit mquit = .T. CLEAR READ * Release the window definitions. RELEASE WINDOW winone RELEASE WINDOW wintwo * Release the Browse windows. RELEASE WINDOW one RELEASE WINDOW two RETURN |
Additional reference words: VFoxWin 3.00 FoxUnix FoxMac FoxDos FoxWin 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |