We have created a report that has a simple form that allows the user to pick a date range then click Go (set as default and DialogResult.OK) however we would like to be able to disable the form at runtime so that the default values in the date fields are used I have tried adding
Code: Select all
this.Pages.Remove(frmOptions);
Next I attempted to set the page to be Enabled = false; however that doesn't seem to do anything and the form was still rendered.
Additionally I tried adding a method to the form to immediately close the form but calling
Code: Select all
Close();
Code: Select all
btnGo.Control.PerformClick();
Is there a way to disable a form before it is shown?
Thanks