Dotnet Dotnet - 1 year ago 80
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

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download