开发者

C# Windows menu item help user manage open windows

I want to have a window's menu item maintain a list of open windows that have been spawned by the main form. When a form 开发者_开发问答is closed the list will be reduced. This feature exists in excel 2003 where clicking the window's menu item a list of open workbooks is given. I can write a singleton form where all other forms will report a form creation but I'm wondering whether this feature already exist in .Net. I don't want to reinvent the wheel.


I think Application.OpenForms is what you need: http://msdn.microsoft.com/en-us/library/system.windows.forms.application.openforms.aspx


You need a separate thread for each, and on each thread you call Application.Run(yourform).
You can obviously create arrays of threads, forms et cettera.


It's done for you Automatically. Here's the link to show you how: http://msdn.microsoft.com/en-us/library/ms171654.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜