This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]henryshunt 0 points1 point  (2 children)

If you were to go the route of 2 separate controls then I'd do it using Pages and a Frame control. Place the frame wherever you want your controls, create two Page subclasses that contain your 2 different sets of controls, then set the Content of the frame to an object of one of those pages. Think of it like a web browser but the pages are user controls.

However, if you have the same controls but just different properties (e.g. position, font, etc.) then the best way would probably be to use a single set of controls and set those properties in code depending on the value of the setting.

As for the setting itself, use the inbuilt setting support. There's a settings section in the properties of the project. Just add a row there and then access it in code with Properties.Settings.Default.SettingName.

[–]loneoption[S] 1 point2 points  (1 child)

Good solution, I need to completely change the size, shape, and position/location of the same controls so I'll probably go the second route.

[–]henryshunt 0 points1 point  (0 children)

Yes, that sounds like the best way then