Maximizing the Browse Window

Maximizing the Browse Window

When I use the BROWSE command it always displays the results in a normal window. Is there a command to maximize the browse window in the program?

The simplest way to accomplish this, is not to use the BROWSE command at all. Drop a grid onto a form instead. You could then use the form designer to set the windowstate property of the form to 2, which tells VFP to maximize the window.

Here are two approaches you could take if you would rather use a browse window. First (and simplest) would be to stuff the keyboard buffer with Ctrl+F10. This key sequence tells the active window to maximize. You could do the following:


The second approach is to use the DEFINE WINDOW command to accomplish what you need. This command allows you to create a window and size it. You can then take advantage of the WINDOW clause of the BROWSE command to make the browse occur in the window you have created. Drop the following code into a PRG file and run it.

USE MyTable*-- Create a window to show the browse in, *-- and create an object reference to*-- the window called oBrowseDEFINE WINDOW MyBrowseWindow ;  FROM 1, 1 TO 2,2 ;  NAME oBrowse ;  TITLE "My Browse Window" ;  DOUBLE ;  CLOSE ;  FLOAT ;  GROW ;  MINIMIZE ;  ZOOM *-- Set the windowstate of the *-- browse window to be maximizedoBrowse.WindowState=2*-- Activate the window and show the*-- browse in itACTIVATE WINDOW MyBrowseWindowBROWSE WINDOW MyBrowseWindow*-- release the windowRELE WINDOW MyBrowseWindow


Share the Post: