简体   繁体   English

通过事件c# windows应用程序在MDI表单和SDI表单之间进行通信

[英]Communicate between MDI form and SDI form through event c# windows application

please some one help with small code for communicate between MDI form and SDI form through event in c#.请一些小代码帮助,通过 c# 中的事件在 MDI 表单和 SDI 表单之间进行通信。

according to my knowledge you can communicate between two forms as you communicate with two SDI Forms.据我所知,当您与两个 SDI Forms 通信时,您可以在两个 forms 之间进行通信。 if you need to retrieve a value or something simple operation based on common data types like int, bool, string then i suggest you to use stored value under project setting.. (project properties --> setting --> create a variable to hold your value and set scope to user)如果您需要基于常见数据类型(如 int、bool、string)检索值或一些简单操作,那么我建议您在项目设置下使用存储值..(项目属性 --> 设置 --> 创建一个变量来保存您的值并将 scope 设置为用户)

but keep in mind to reset this vale to a pre-defined default value because .net serialize the values.但请记住将此值重置为预定义的默认值,因为 .net 会序列化这些值。 this can case errors on your project depending on your system.根据您的系统,这可能会导致您的项目出现错误。

sorry for not being able to give you a code example because this moment i don't have any editor with me.很抱歉不能给你一个代码示例,因为此刻我没有任何编辑器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM