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