C
C#2y ago
GenTwo

❔ Windows Form help

I have the source code for an application that utilizes Windows Forms, but I have no experience working with forms. Could you please guide me on how to switch between tabs in the application? Specifically, I would like to access the "packing" and "options" screens. I have attached a screenshot for reference. Thank you in advance for your assistance.
12 Replies
mistopportunity
Depends on how it was programmed. Are the other pages being created in code? Easiest way to figure it out is to see where the click event for that button leads to. Check its property values in the designer That is.. assuming the click event is registered through the designer
GenTwo
GenTwo2y ago
Yeah i click the button and it sends me to the code We've got FormMain.cs, FormMain.Designer.cs & FormMain.resx I'd be happy to DM them to you if you like? Actually, there's nothing super important in them, ill attach them here
GenTwo
GenTwo2y ago
I can't seem to access this tab
GenTwo
GenTwo2y ago
Or this In desginer
GenTwo
GenTwo2y ago
TheBoxyBear
TheBoxyBear2y ago
it seems the code file is doing a lot of work in creating controls outside InitializeComponent, that you can't see in the designer The Designer view is bound to the auto-generated Designer.cs file and its InitializeComponent method.
GenTwo
GenTwo2y ago
That's unfortunate, is there anyway to easily add/remove buttons and so on or would it be easier to rewrite the UI?
TheBoxyBear
TheBoxyBear2y ago
You could paste the code to a new form's Designer and add the form as a control when the button is clicked That will be a very breaking change however. The controls on the page will be members within the page control and are private by default. You can change the accessibility in the Properties Also since the pages are only used within a form, you could create them as UserControls instead of Form. It's just more lightweight The positioning of everything is also likely to be off after the change. After checking the code again, it seems each page is contained in a GroupBox control that is made visible when the button is clicked So everything exists at runtime, you just have to change the visibility of the groups in the designer to see the other ones. Tbh the whole thing is a mes
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
More Posts
❔ Services collection life timeHi guys, is it possible to register some services later when the application up and running ? ### ❔ So I'm hammering my head against this Lambda API I trying get workingSo I followed the instructions out of one of the articles I read on AWS Lambda C# API did the conver❔ Best architectural design choice?If I have multiple instances of multiple apps all working to do similar things, and they all need th✅ In WPF using a custom dialog service, how would i "validate" the dialog data before closing it?I have a `NewUserWindow`, whose data context is a `NewUserViewModel` and then i have a dialog servic❔ xamarin forms displaying text in 1 line with spacinghow can i distribute text that first is at the start of the line second is in the middle and third i✅ Should I use unity to create a app?Trying to make app, should I make it in unity? It'll be for creating characters and putting them on ❔ System.Linq.Expressions custom expressionHi guys! I'm parsing a custom language and building an Expression Tree based on it, but I came into❔ ✅ IndexOutOfRangeExceptionI just tried to code out a simple app that reads a .csv file (as per screenshot) and displays the c❔ Getting a variable from a GameObject without dragging and dropping it inForenote: For unity Is there any way to get a variable from a GameObject without dragging and droppi❔ ✅ Singleton, thread-safe logger with absolutely 0 runtime performance penalty when turned offI've got an application that lazily discovers its state-space, as it needs it. Carrying through a lo