Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

So I am new to actually building GUI and I am creating a project where when you click on one button you open a new form. With this new form I want to be able to add and edit things to it.

In my solution explorer it is only showing the first form that I originally create, not the second one. I went online and used one of those little microsoft blurbs about creating a new form when a button is clicked, and I am a little lost from there.

My program is going to have multiple buttons that you click and they open certain forms. I understand that I have the button_click set to create a new form. I now want to know how to edit these forms that are created.

I tried refreshing my solution explorer and it wouldn't show my newly created design. (I thought that could be one of my possible errors, haha) Could someone please let me know what I should be doing?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
189 views
Welcome To Ask or Share your Answers For Others

1 Answer

First add a new form. Right click on your project (my project is called Test) and give it a name (I called it TestForm): Create a form

Then, add the following code to your button:

TestForm MyForm = new TestForm();
MyForm.Show();

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...