Hide, Show Methods

Purpose

Hides or shows an object.

Syntax

object.Hide

object.Show

object:Ocx object

Description

The Hide method hides an object at run time. Show makes it visible again. Invoking these methods in code enables you to hide and later redisplay an Ocx object at run time in response to a particular event.

At design time, to set the visibility at startup, set the Visible property to False.

Example

OpenW Center 100, , , 140, 100

Ocx Command cmd = "Hide this window", 10, 20, 100, 22

Do  : Sleep : Until Form(100) Is Nothing

 

Sub cmd_Click

If Left(cmd.Caption, 4) = "Hide"

Form(100).Hide

cmd.Caption = "Close this window"

Message "Click OK to show the window again"

Form(100).Show

Else

Form(100).Close

EndIf

EndSub

Remarks

Using the Show or Hide method on a form is the same as setting the form's Visible property in code to True or False, respectively.

See Also

Form, Visible

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