Topmost Form at Application Level [C#]
This example demonstrates how to show a topmost non-modal form, but only within an application. The form must not overlap forms from other applications.
If you use Form.TopMost property, the form will overlap all other non-topmost forms, but also those from other applications. Instead of this, set the Form.Owner property to the parent form – the one which should be under the form (e.g. the main form).
[C#]
// use Form.Owner instead of Form.TopMost
form1.Owner = mainForm;
See also
- [C#] InputBox – simple static method to show InputBox in C#
- [C#] InputBox With Value Validation – improved InputBox class
- [C#] Separator Line on Form – simulate a bevel line on form
- [C#] Set DoubleBuffered Property – set protected property Control.DoubleBuffered
- [C#] Hourglass Wait Cursor – how to change mouse cursor to hourglass
- Form.Owner – MSDN – form above another form
- Form.TopMost – MSDN – form above all forms