❔ ✅ Winforms
my code creates a new form when a button is clicked but how do i get that new forms code and display it in that editing window any help?
12 Replies
Editing window? You mean the form designer or code viewer in VS?
If so, you can't see a runtime (code) generated form in the editor
You can make a form in the designer and have your button open that
@anu6is this is what i meant via editor being able to add buttons and what not
Ok, but I still don't understand your question
Yes this is the editor. What is the code you have that creates a form?
@anu6is
You need to create it as a form in the project and create an instance of it when the button is clicked
^
Like I said, if you are creating that form in code you can't see it in the editor
You have to create it in the editor FIRST, then have your code show it
The only way you can edit it in the designer is to create it in the designer
ahhh now i get it
where do i create a form in editor tho its not in toolbox
You add form like you'd add a class in the solution explorer
done thanks
!close
Closed!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.