Forum Discussion
Dmitry_Nikolaev
Staff
15 years agoHi Evgeny,
A z-order of controls in a Windows Forms application is actually the order of these controls in their parent's Controls collection. You can get an index of a control using the GetChildIndex method of the Controls collection:
var form = Sys.Process("MyApp").WinFormsObject("MyForm");
Log.Message(form.Controls.GetChildIndex(form.WinFormsObject("MyPanel")));
The topmost control has index 0.