Layering Interface Reference

Specifies layering specific properties for a control. More...

List of all members.

Properties

VARIANT_BOOL RW Layered []
 Enables or disables layering for the control.
BYTE RW Alpha []
 Specifies alpha value for the control.
ULONG RW TransparentColor []
 Specifies the transparency color for the control.
ULONG RW Flags []
 Specifies the layering flags for the control.


Detailed Description

Specifies layering specific properties for a control.

For the Form only.

Windows 2000 or later required.

Example:

o = new ActiveXObject("Scripting.WindowSystemObject")
o.EnableVisualStyles = true

f = o.CreateForm(0,0,0,0)

f.ClientWidth = 500
f.ClientHeight = 300
f.CenterControl()

TransparentColor = 0x005050FF

f.Layering.Layered = true
f.Layering.Alpha = 120
f.Layering.TransparentColor = TransparentColor

f.TextOut(10,10,"Layered Window")

f.Rectangle(220,10,150,100).Color = TransparentColor

f.CreateButton(10,30,100,25,"Close").OnClick = CloseFormHandler

Track = f.CreateTrackBar(10,70,200,25)
Track.Max = 255
Track.Position = f.Layering.Alpha

Track.OnChange = function() {
	f.Layering.Alpha = Track.Position
}

TransparentColorCheck = f.CreateCheckBox(10,100,100,25,"Use Transparent Color")

TransparentColorCheck.OnChange = function() {
	f.Layering.Flags = TransparentColorCheck.Checked ? o.Translate("LWA_ALPHA | LWA_COLORKEY") : o.Translate("LWA_ALPHA")
}

f.Show()

o.Run()



function CloseFormHandler(Sender)
{
	Sender.Form.Close()
}

Since:
1.1.16.


Property Documentation

BYTE RW Alpha

Specifies alpha value for the control.

When Alpha is 0, the window is completely transparent. When Alpha is 255, the window is opaque.

See also:
SetLayeredWindowAttributes in the MSDN.
Since:
1.1.16.

ULONG RW Flags

Specifies the layering flags for the control.

This parameter can be a one of the following values:

Default: LWA_ALPHA.

See also:
SetLayeredWindowAttributes in the MSDN.
Since:
1.1.16.

VARIANT_BOOL RW Layered

Enables or disables layering for the control.

Note:
Sets the WS_EX_LAYERED extended window style.
Since:
1.1.16.

ULONG RW TransparentColor

Specifies the transparency color for the control.

All pixels painted by the window in this color will be transparent.

See also:
SetLayeredWindowAttributes in the MSDN.
Since:
1.1.16.


WSO 1.1 Documentation. Date modified:Wed Aug 12 18:12:46 2015. (C) Veretennikov A. B. 2004-2015