MDI应用程序的多实例 [英] Multi instance of MDI Application

查看:133
本文介绍了MDI应用程序的多实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个MDI应用程序,具有主窗体和与此相关的菜单.当按下打开"菜单项时,该应用程序允许用户选择一个文件并打开该文件.打开文件后,如果用户再次单击打开"并选择第二个文件,则我希望创建同一应用程序的另一个实例并打开第二个文件.与Microsoft Word相似.

我该如何执行呢?我能找到一些信息的任何想法或链接都非常感谢!

在此先感谢
K

Hi
I have a MDI application with a Main form and menu associated with that. When "Open" menu item is pressed, the application allows the user to select a file and opens the same. Once a file is opened, if the user clicks "open" again and selects a second file, I want another instance of the same application to be created and the second file to be opened. Something similar to what Microsoft Word does.

How do I implement this? Any ideas or links where I can find some information is much appreciated!

Thanks in advance
K

推荐答案

将带有标签"Open New Instance ..."的菜单项添加到文件"菜单中,并且当用户选择要打开的文件时,会生成一个新的过程.

我不必这么说,但是如果我不说别人,就会...

这是一个相当奇怪的要求,因为从本质上来说,MDI应用程序允许在其内部打开多个文档.
Add a menu item to your File menu with the label "Open New Instance...", and when the user slects the file to be opened, spawn a new process.

I shouldn''t have to say this, but if I don''t someone else will...

That''s a fairly bizarre requirement since an MDI app, by it''s very nature, allows multiple documents to be opened within itself.


这篇关于MDI应用程序的多实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆