So, in my applications, I try to create new instances of forms on the fly, and then use Form.Show () to display them (not modally).
private void test_click(object sender, EventArgs e) { var form = new myForm(); form.Show(); }
However, Code Cracker tells me that these forms should be deleted. So, I wrapped them in a "using" statement, but then they close immediately after opening.
using (var form = new myForm()) { form.Show(); }
I do not want to use Form.ShowDialog (), because in several cases I open new windows that show only reports; I do not need them to be fashionable.
javon27 Sep 14 '16 at 21:57 2016-09-14 21:57
source share