65.9K
CodeProject is changing. Read more.
Home

Single Instance Form in a MDI application

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.50/5 (2 votes)

Sep 20, 2011

CPOL
viewsIcon

5771

Assuming you only want a single instance of a form type, I'd suggest you add a Dictionary(Of Type, Form). ShowOrActiveForm would have a single parameter of Type and would be a subroutine.The Form object could be found based on a ContainsKey. The rest of the ShowOrActiveForm function would be...

Assuming you only want a single instance of a form type, I'd suggest you add a Dictionary(Of Type, Form). ShowOrActiveForm would have a single parameter of Type and would be a subroutine.

The Form object could be found based on a ContainsKey. The rest of the ShowOrActiveForm function would be the same.