Dotnet Dotnet - 5 months ago 42
C# Question

WinForms opening the same form multiple times

I have a requirement to open up the same form multiple times when looping. I am not using any MDI from so is there is any possibility to show the same

foreach (string report in lstReports)
PrintForm print = new PrintForm();
print.FillReport(dt, report);

This code is opening up the same form when I close the previous one, what I need is I need to show the same form instance multiple times


Try using the Show() method instead of ShowDialog(). That should do the trick.