This article describes the method of creating the front-end form by Winform. Share it for your reference. The specific implementation method is as follows:
1. Requirements:
1). This form is required to be always in the front end and available
2). When the main form opens other modal forms, this Form must also be active.
Notice:
The TopMost property of Form is set, but it is invalid when the main form opens the modal form.
2. Solution:
Copy the codeThe code is as follows:
Thread th = new Thread(() => { (new FormA()); });
();
();
or:
Copy the codeThe code is as follows:
Thread th2 = new Thread(() => { new FormA().ShowDialog(); });
();
();
I hope this article will be helpful to everyone's C# programming.