Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

C# Help: How to safely modify Windows Forms Designer code?

I'm writing a Windows Forms project in C# using Visual Studio 2010 Express. I need to make many iterations of a panel, each of which is identical except for name and position. I also need the code to be able to make variable numbers of these (example: one time it runs, it puts 40 on a form, the next time, it might need to put 100 on). I've figured out how to come up with a way of calculating all these properties, but I need a way to actually put them on the form. I've tried building an instance of a class with all the panels I need inside the initialize component routine, but that doesn't work. I've tried creating a second partial class of the Form, but then it gives me this: "The type Form1 is made of several partial classes in the same file."

Any suggestions? Please be detailed in your explanations, I've only been programming for a year or so, and Windows Forms are new territory for me.

Thanks!

2 Answers

Relevance
  • 9 years ago
    Favorite Answer

    Why not just create the panel in the code (you could make an array of panels) and then use this.controls.add(panel); ?

  • Anonymous
    4 years ago

    look ahead to different solutions to return and then complete your technique, simply by fact i'm undecided. even nonetheless it hink that that is an significant folder. um dont delete the folder yet delete the aspects/data in it. like replica the data in it and delete those, not the entire folder. i think of that is only non everlasting cyber web data.

Still have questions? Get your answers by asking now.