Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7434551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:51:25+00:00 2026-05-29T09:51:25+00:00

I have one main form, and i want to dynamically change it’s content, via

  • 0

I have one main form, and i want to dynamically change it’s content, via pressing some buttons.
Let’s say i have a button “New user” and “Login”, and if I press new user, i don’t want to make new form + show, i want all labels and buttons of new user to be displayed right in the main form. And if i press login, the main form content to change to some labels and textboxes?
This is just for example.
All I can now, is just make new forms and show them to the user via .Show() command.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:51:27+00:00Added an answer on May 29, 2026 at 9:51 am

    Let’s say you have Customer, Product and Vendor “windows”. You don’t want to make separate windows from them, so you group all of their controls inside groupboxes and make them visible/invisible depending on user actions. This will work, but it leads to problems of code readability and maintainability: you’re writing a lot of code for a lot of controls inside your window which is, after all, just one class.

    So you can do this: create a user control named usrCustomer or myCustomer or whatever, and paste into it all the controls related to Customer: the groupbox, the labels, the combos, everything. Then you can decide if you want to add this mega-control to your main form on design time or if you wanna create a new instance of it in run-time everytime you need it. If in the future you have to modify something, you’ll go to a separate class (ctlCostumer) instead of having to dig inside a monster main form class.

    CAVEAT: you’ll have to be careful if those controls share information between them, (if the Product mega-control needs to know something from the Customer mega-control) and expose that info with public properties, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a main form that can open MDI children inside it.
I want to change out my previous main form for a new one. According
I have WPF Application where I have One main form and other user controls
I have below html code in one of the opensource project. <form action=/wiki/bin/view/Main/Search> <div
We are installing out program via inno setup. We have one main exe file,
I have a one main Workflow which calls several activities asynchronously. Some of the
I have a form that I want to provide some security on, but up
I have one form called: MyControlContainerForm ccf and a main form called: SolidForm sf
I have a main form (MainForm) and a MDI child window (TFormChild). I want
I have one main windows form and within that form I have custom controls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.