You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Form - FormStyle Property
Determines how the form behaves in a multiform application
Member of Form (PRIM_FORM)
Data Type - Enumeration

Details


The FormStyle property defines the forms behavior with respect to its owner form.
NormalChild, OwnedChild and StayOnTopChild forms automatically route Shortcut Key pressed events to their owner form.

Allowed Values

Enum Value

Description

Normal

Form is not affected by the owner form

NormalChild

As Normal. Will be hidden or minimzed with the owner

Owned

Closed when the owner closes. No item in the task bar.

OwnedChild

As Owned. Will be hidden or minimzed with the owner. No item in the task bar.

StayOnTop

Will always be infront of the owner form. No item in the task bar.

StayOnTopChild

As StayOnTop. Will be hidden or minimzed with the owner. No item in the task bar.

Example


This sample form demonstrates the behavior of the different form styles.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(484) Clientheight(301) Componentversion(2) Top(40) Left(40) Caption('Main Form')
Define_Com Class(#prim_form) Name(#Normal) Caption('Normal') Top(80) Left(80)
Define_Com Class(#prim_form) Name(#NormalChild) Caption('NormalChild') Formstyle(NormalChild) Top(120) Left(120)
Define_Com Class(#prim_form) Name(#Owned) Caption('Owned') Formstyle(Owned) Top(160) Left(160)
Define_Com Class(#prim_form) Name(#OwnedChild) Caption('OwnedChild') Formstyle(OwnedChild) Top(200) Left(200)
Define_Com Class(#prim_form) Name(#StayOnTop) Caption('StayOnTop') Formstyle(StayOnTop) Top(240)
Define_Com Class(#prim_form) Name(#StayOnTopChild) Caption('StayOnTopChild') Formstyle(StayOnTopChild) Top(280) Left(280)
Evtroutine Handling(#com_owner.Initialize)
#Normal.Showform
#NormalChild.Showform
#Owned.Showform
#OwnedChild.Showform
#StayOnTop.Showform
#StayOnTopChild.Showform
Endroutine
End_Com

See also

All Component Classes
Technical Reference

  • No labels