C
C#2y ago
jakub

❔ Visual Studio Help

I am making an app using Windows Form, is there a way to copy the layout of one of my forms and re use it? I want to keep the layout consistent.
19 Replies
ZacharyPatten
ZacharyPatten2y ago
yes first off though... I just want to mention that Windows Forms is an old framework and you should really only use it for educational purposes. I woudln't not recommend attempting to make a legit app in it nowadays as there are better options --- that being said... you just need to make "UserControls" you can define your own user controls and then re-use as much as you want when you make a user control, it will appear as an item in the "Tool Box" pane in Visual Studio and you can add it to any form just like any other UI element
jakub
jakubOP2y ago
What would be a more modern and efficient option?
ZacharyPatten
ZacharyPatten2y ago
what kind of application are you trying to make? that is really the determining factor if possible... try to make web apps rather than desktop apps if it must be a desktop app, then either WPF, Avalonia, Maui... there are multiple options
jakub
jakubOP2y ago
Why are web apps more favourable?
JakenVeina
JakenVeina2y ago
I wouldn't really say they're more favorable certainly more trendy if you're going for monetization, a web app is arguably better, as you can better counter piracy however, it's also arguably more work to maintain
jakub
jakubOP2y ago
I am just making a little side project nothing complex I am a beginner
JakenVeina
JakenVeina2y ago
prolly just go with WPF Avalonia gets you cross-platform desktop support MAUI gets you cross-platform mobile support WinUI gets you Windows Mobile/Store support if all you're looking for is Windows Desktop, WPF is still your best bet
jakub
jakubOP2y ago
Alright then I will go with WPF Thank you so much
JakenVeina
JakenVeina2y ago
somewhat unfortunately
jakub
jakubOP2y ago
how so?
JakenVeina
JakenVeina2y ago
even WPF is old now
jakub
jakubOP2y ago
oh haha
JakenVeina
JakenVeina2y ago
about 15 years, IIRC there's a lot of things that newer frameworks like Avalonia or MAUI do better that they've improved upon Avalonia though is a third-party project and just doesn't have the same first-class tooling that WPF does not yet and MAUI is still relatively new, and thus also lacking tooling, and is also kind of a pain in the ass same for WinUI
jakub
jakubOP2y ago
You lost me lmao Would WPF be the simplest option?
JakenVeina
JakenVeina2y ago
don't worry about it then
jakub
jakubOP2y ago
I am not looking for anything advanced just a basic app
JakenVeina
JakenVeina2y ago
WPF just giving some extra context feel free to ignore
jakub
jakubOP2y ago
No no I am grateful, thank you so much 🙂 I will use WPF Thanks again
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server