Appearance Property

Purpose

Returns or sets the paint style of Ocx controls or Form.

Syntax

Object.Appearance [ = value ]

Object:Ocx Object
value:iexp (0..15)

Description

The Appearance property influences the border of the form and Ocx controls. The value ranges from 0 to 15, which represents a combination of 4 bits. Effectively, the following WS_EX window styles are applied.

Value Bit Style Effect
0 -- Flat
11 WS_EX_CLIENTEDGE Specifies that a window has a 3D look - that is, a border with a sunken edge.
22 WS_EX_WINDOWEDGE Specifies that a window has a border with a raised edge.
43 WS_EX_STATICEDGE Creates a window with a three-dimensional border style intended to be used for items that do not accept user input.
84 WS_EX_DLGMODALFRAME Designates a window with a double border that may (optionally) be created with a title bar when you specify the WS_CAPTION style.

The appearance of the OCX can be adjusted further by setting the BorderStyle property. BorderStyle = 2 draws a thick border.

For a Label Ocx the Appearance property simply applies optical effects. Setting the BorderStyle to 2 doubles the border line.

For a Checkbox Ocx only basFlat (0) and basThreeD (1) are allowed values for Appearance.

Flat Scroll Bar

By setting the Appearance property, the Scroll OCX is changed to a flat scroll bar (equivalent to the VB FlatScrollBar control). The flat scrollbar control is a mouse-sensitive version of the standard Windows scroll bar that offers two-dimensional formatting options. It can also replace the standard Windows three-dimensional scroll bar. With the FlatScrollBar you can disable either of the scroll arrows, this provides additional feedback to the user as an indication to scroll in a particular direction based on other factors in the program.

Appearance can have following values:

0A normal, non flat scroll bar is displayed. No special visual effects will be applied (FSB_REGULAR_MODE).

1A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in 3-D (FSB_ENCARTA_MODE).

2A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in inverted colors (FSB_FLAT_MODE).

Example

Form test

Me.Appearance = 15

Do : Sleep : Until Me Is Nothing

See Also

Form, BorderStyle

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