Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我想在我的 WinForms 应用程序中找出最上面的表单,或者最后显示的那个(没有使用最上面的标志),我可以使用这个:
Form topForm = System.Windows.Forms.Application. OpenForms[System.Windows.Forms.Application.OpenForms.Count - 1];