ZIndex Property

The ZIndex property allows you to designate which control will be displayed on top of another control when more than one is overlaid on a form.

Applies to: All controls except Read/Write Grid, Menu control, and ActiveX controls.

Setting dynamically:

Winform Set form.button.ZIndex TO n      

Property Settings:

Type an integer for ZIndex in the property sheet for the control. The control with the highest value will be displayed in the foreground. By default, the first ZIndex assignment is 0. The value for each successive control placed on a form will be incremented by 1. To ensure a particular control remains on top while you continue to add to your form, you can assign it a very high value for ZIndex (for example, 999).

Setting dynamically using JavaScript or VBScript:


Note: In JavaScript, the property must be written zIndex, with only the letter I capitalized.