SetFrameOptions

<< Click to Display Table of Contents >>

 

SetFrameOptions

SetFrameOptions(Title, [Flags])

This method is used to configure the title of a Frame on a window and the style of that window. The Title parameter is a String that contains the title of a window. This text is displayed if that Screen's Caption property is empty.

The Flags parameter specifies the style of a window. If this parameter is omitted, its default value is -1 (minus one). This value is used to keep the previous configuration of that window. When the specified value is not equal to -1 (minus one), users can change the style of a window by specifying a sum of values of all combinations described on the next table.

Possible combinations for the Flags parameter

Value

Description

1

Enables a title bar on a window

2

Enables a Close button on a window

4

Enables a Minimize button on a window

8

Enables a Maximize button on a window

16

Enables a border on a window

32

Specifies that a window can be resized. To do so, this window must have a border

64

Specifies that a window can be moved

256

Specifies that a window stays on top of a Screen

512

Specifies that a window is configured in a Tool Bar style

1024

Disables object buttons

2048

Centers a window

 

The next script contains an example of using this method.

Sub Screen_OnPreShow()
  Frame.SetFrameOptions("Alarm Screen", 114)
End Sub

 

In the previous example, the value 114 (2 + 16 + 32 + 64) indicates that this window contains a Close button enabled (2), a border (16), can be resized (32), and can be moved (64). The title of this window is "Alarm Screen".

In the Open Screen and Open Modal Screen Picks, users can also configure the style of that window during edition, by using the Window Style dialog box. For more information, please check topic Picks.

 

NOTE

This method must be used after calling the SetDisableTaskSwitching method, if users want to change the title or style of a window.

Was this page useful?