i have a combobox that has 3 cases. case “0” opens a dialog saying, “Not a valid choice”
but case “1” and case”2″ open up there own separate forms. (FormMain and Form3)
How do i make it so if Form3 is open FormMain Can not be opened, And a messagebox appear saying so. I do not just want the “.hide” function. I already have that set.
I have tried a few differant things, none of which worked. And i tried them in the formload and in the combobox selected index
Any suggestions?
You could implement some kind of a static class that will keep an instance of the currently shown form .
make sure each form checks this static class before showing .
Something like this maybe .