C carmen May 24, 2004 #1 I need to pass a parameter to a class while calling Showdialog method, is this possible? Thanks, Carmen
I need to pass a parameter to a class while calling Showdialog method, is this possible? Thanks, Carmen
M Morten Wennevik May 24, 2004 #2 Hi Carmen, Sure it is. Either expose some public method or property in the dialog, or pass it a reference that it can use to obtain data when needed. Happy coding! Morten Wennevik [C# MVP]
Hi Carmen, Sure it is. Either expose some public method or property in the dialog, or pass it a reference that it can use to obtain data when needed. Happy coding! Morten Wennevik [C# MVP]
J John Baro May 25, 2004 #4 protected override DialogResult ShowDialog(object MyCustomParameterObject) { this.CustomParam = MyCustomParameterObject; return this.ShowDialog(); }
protected override DialogResult ShowDialog(object MyCustomParameterObject) { this.CustomParam = MyCustomParameterObject; return this.ShowDialog(); }