ShowInTaskbar, StartupMode Properties

Purpose

ShowInTaskbar returns or sets a value that determines whether a Form object appears in the Windows taskbar. Read-only at run time.

StartupMode returns or sets a value specifying the position of a Form object when it first appears with LoadForm. Not available at run time.

Syntax

Form.ShowInTaskbar

% = Form. StartupMode

Description

Use the ShowInTaskbar property to keep dialog boxes in your application from appearing in the taskbar. Only available at design time in the Form Editor. (It is a hidden property in the code editor.)

Use the StartupMode property to specify the position of the Form object at design time in the Form Editor. The StartupMode property can take the following values:

0 - no initial setting

1 - centered on the screen

2 - maximized

The optional parameters of the LoadForm command can overrule the StartupMode setting.

Example

// Design a form in the Form Editor and title it frm1

// Then run the following code.

LoadForm frm1

AutoRedraw = 1

Print Me.StartupMode

Do : Sleep : Until frm1 Is Nothing

Remarks

Methods of recreating the StartupMode settings for forms created 'in-program' are:

  • frm1.StartupMode = 1 (Centred) => Form Center frm1
  • frm1.StartupMode = 2 (Maximized) => Form Full frm1
  • See Also

    LoadForm, Form

    {Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}