当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - How to get the top form in a WinForms app?

问题描述:

If I want to find out the top Form in my WinForms application, or the one that was displayed last (no topmost flags used), can I use this:

Form topForm = System.Windows.Forms.Application.

OpenForms[System.Windows.Forms.Application.OpenForms.Count - 1];

分享给朋友:
您可能感兴趣的文章:
随机阅读: