Maximizing the Browse Window

Question:
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?

Answer:
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:

KEYBOARD "{CTRL+F10}" PLAIN BROWSE

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:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a