Returning Values from Forms in C#
In a scenario where a child form (frmHireQuote) is opened from a parent MDI form (frmMainMDI) using ShowDialog(), how can we efficiently pass values from the child form back to specific text boxes on the parent form, while ensuring that the values are returned to the correct parent instance?
Solution
To return values from the child form (frmImportContact) to the parent form (frmHireQuote), follow these steps:
public string ReturnValue1 { get; set; } public string ReturnValue2 { get; set; }在父级中检索属性:
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3