how about when i hide the form how can i return it to show?
Hey,
If you use Show.Dialog, there really isn't any need to hide the first form. Using ShowDialog means that the user can no longer access Form 1. Give it a try, and you will see what we mean.
indeed. ShowDialog is best practice in terms of design but also user experience. you should never hide one form and show another. whilst its possible to do this, and can provide code, it is highly not recommended to do this.
furthermore, say for example your application is expecting some response from somewhere but form1 or form2 is hidden - how do you expect the application to exit or even display the form because of a coding bug that was undiscovered?
MVP 2007-2010 any chance of a regain?
Professional Software Developer and Infrastructure Engineer.
sorry i dont understand. does this new problem have any relevance to the code given? if so and you are wanting to switch forms - you wont be able to because you are hiding a form and showing another form which is one of many reasons why you shouldnt be doing it this way
MVP 2007-2010 any chance of a regain?
Professional Software Developer and Infrastructure Engineer.
Write down the exact requirements of what you are trying to do, i.e. what forms are visible and which ones aren't and at which point. What causes these things to happen? How you want the user to interact with the forms? etc.
Once we have all of the requirements, then the best overall recommendation can be provided.
I would also suggest that you look at some of the existing applications that you use already on your computer, i.e. Word, Visual Studio. Do these applications do the type of things that you are asking for? If not, then you might want to think about why you want to go against the grain. These applications will have invested hundreds of thousands of pounds/dollars trying to get the UI to be the best that they are, and you have to think they are doing things that way for a reason.