openprocedure
PROCEDURE
,
OPTION
,
VALUE

The openprocedure statement opens a procedure in the current database in a new window.


Parameters

This statement has three parameters:

procedure – is the name of the procedure to open.

option – in addition to the form name, this statement can have one or more additional option/value parameter pairs that modify the operation of the statement. Each pair has two parts, the option name (this parameter) and the option value. See the discussion below for more information.

value – option value.


Description

This statement opens a procedure in a new window. If the specified procedure is already open, it is simply brought to the front.

By default, the procedure will open in the same location it was in the last time it was opened. To specify the size and location of the new window in advance, use the setwindowrectangle, setwindow, or windowbox statements.

The procedure below opens the procedure .CustomMenu in a 4 inch by 6 inch window centered on the main screen.

local newWindowRect
newWindowRect=rectanglecenter(
    info("screenrectangle"),
    rectanglesize(1,1,4*72,6*72))
setwindowrectangle newWindowRect,""
openprocedure ".CustomMenu"

Options

In addition to the procedure name, this statement can have one or more additional option/value parameter pairs that modify the operation of the statement. Each pair has two parts, the option name (this parameter) and the option value, like this:

openprocedure name,option,value,option,value,option,value

The available options are described below.

Database

To open a procedure in a different database, use the database option. This example opens the procedure Print Report from the Members database.

openprocedure "Print Report","Database","Members"

The specified database must already be open.

Rectangle

Panorama normally opens a procedure in the same location it was in the last time it was open. This option allows you to specify the exact location and size of the new procedure window. This example opens a 3“ by 5” procedure window in the upper left hand corner of the screen.

openprocedure "Some Action","Rectangle",rectanglesize(20, 5, 72*3, 72*5)

Note: The location can also be specified with the setwindowrectangle statement. If both are used, the rectangle specified in the openprocedure statement will be used.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0, but now includes options for opening forms from another database.