ZombieKnifer223 ZombieKnifer223 - 4 months ago 23
C# Question

How have a form open on button click in Visual Studio 2015?

I am trying to find the right syntax and code that will open a Form (settings.cs) so the user can edit my program to their likings!

  • I don't want the current form to close.


You will need to add a form either dynamically or in the gui. I'd advise to use the gui as formatting can be iffy when done dynamically. As far as calling a form you must use the following:

void btnSettings_On_Click(){
Form somename = new YourFormName();
somename.Show() // or somename.ShowDialog(); if you want the new form to have priority until it is closed