MDI表格有2个表格 [英] MDI form with 2 Forms

查看:98
本文介绍了MDI表格有2个表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编码的新手,所以尝试并且做得很好:)

我有3个表格,MDI表格报告查看器表单|过滤表格

MDI表格打开报告表格,其中包含从数据表中提取的项目报告。我添加了一个选项,供用户通过过滤器表单中的各种选项过滤报表。



我最初使用报表查看器和过滤器表单启动项目,并按预期运行(在过滤器表单中选择的值将更新报表查看器)然后我添加了MDI接口和两个表单不再将过滤器表单之间的值传递给报表查看器。



我非常感谢您的帮助。



我正在寻找在MDI表单中的两个子表单之间传递数据的示例(VB.Net)

解决方案

首先,摆脱MDI垃圾。这是一个过时的概念,newb只是滥用到死。



MDI代表多文档界面。它的设计目的之类,例如,多文档记事本,其中您的子窗口都是相同的类型,并做同样的事情,如文本编辑器。



根据您的描述,没有充分的理由使用MDI。



在两个子表单之间传递数据与在任何其他表单之间传递没有什么不同。如果没有看到代码或者你正在做什么的任何描述,几乎不可能告诉你究竟出了什么问题。


除了解决方案1:



这是一个想法:谁需要MDI?为什么要折磨自己并吓跑你的用户?

帮自己一个大忙:根本不要使用MDI。没有它,您可以更轻松地实现设计,质量更好。 MDI甚至被微软高度劝阻,事实上,微软将其从WPF中删除并且很难支持它。更重要的是,如果您使用MDI,您将吓跑所有用户。只是不要。请参阅:

http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages

如何在WPF中创建MDI父窗口?



我可以解释做什么。请看我过去的答案:

如何在WPF中创建MDI父窗口?

关于在WPF中使用MDI窗口的问题

MDIContainer给出错误

如何设置最大化的子表单,最小化最后一个子表单



-SA

I am new to coding so try and be nice :)
I have 3 forms, MDI form | Report Viewer Form | Filter Form
The MDI form opens the report form with a report of items pulled from a data table. I added an option for the user to filter the the report by various selections in the filter form.

I initially started the project with the report viewer and filter form and this functioned as expected (Values selected in the filter form would update the report viewer) I then added the MDI interface and the two forms no longer would pass the values between the filter form to the report viewer.

Your help with this would be much appreciated.

I am looking for examples of passing data between 2 child forms inside an MDI form (VB.Net)

解决方案

First, get rid of the MDI crap. It's an outdated concept that newb's just abuse to death.

MDI stands for "Multiple Document Interface". It was designed for something like, for example, a multi-document Notepad where your child windows are all the same type and do the same thing, like a text editor.

From your description, there really is no good reason to use MDI.

Passing data between two child forms is no different than passing between any other forms. Without seeing the code or any description of what you're really doing, it's pretty much impossible to tell you exactly what's going wrong.


In addition to Solution 1:

Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?
Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it out of WPF and will hardly support it. More importantly, you will scare off all your users if you use MDI. Just don't. Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages,
How to Create MDI Parent Window in WPF?.

I can explain what to do instead. Please see my past answers:
How to Create MDI Parent Window in WPF?,
Question on using MDI windows in WPF,
MDIContainer giving error,
How to set child forms maximized, last childform minimized.

—SA


这篇关于MDI表格有2个表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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