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 223877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:15:47+00:00 2026-05-11T19:15:47+00:00

I have a bunch of Forms that I embed in tabpages( some are embedded

  • 0

I have a bunch of Forms that I embed in tabpages(some are embedded two and three layers deep) that I now suspect are giving me trouble. I have been told that User Control’s are the better approach.

  • Now I am wondering how I
    canaccomplish this as quick as
    possible.

  • Is it as simple as copy and paste?

  • Has anyone ever done something like
    this?

I have about 40 forms that I embedd that would need to be moved and not a lot of time to do it so any help is greatly appreciated.

EDIT 1

This is how I embed forms:

        public static void ShowFormInContainerControl(Control ctl, Form frm)
    {
        frm.TopLevel = false;
        frm.FormBorderStyle = FormBorderStyle.None;
        frm.Dock = DockStyle.Fill;
        frm.Visible = true;
        ctl.Controls.Add(frm);
    }

        public static void DockControl(this Control control, UserControl userControl)
    {
        userControl.Dock = DockStyle.Fill;
        control.Controls.Clear();
        control.Controls.Add(userControl);
    }
  • 1 1 Answer
  • 0 Views
  • 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-11T19:15:47+00:00Added an answer on May 11, 2026 at 7:15 pm

    Not sure if it’s the “best”, but this is probably the most efficient. Change the classes to inherit from UserControl instead of Form. Then fix the compiler errors if/when you get any (see NOTE 2 below).

    NOTE 1: If you’re not using version control, start using it before doing something drastic like this. You’ll want to be able to go back if something goes too far south.

    NOTE 2: If you use any particular events or properties of Form that aren’t implemented in UserControl, you’ll have to think of a solution. Some properties (Icon for example) you can safely just ignore (= delete the line from the designer file).

    NOTE 3: If you use the forms as an actual form somewhere, you’ll want to also have a form that uses the newly created UserControl. You’re most likely to get in trouble here with naming, so keep a sharp eye.

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

Sidebar

Related Questions

I have a bunch of forms that have a lot of <input type=text> fields
Basically I have a bunch of submission forms that gather data in a generic
I want to create a bunch of forms that all have the same properties
I have a bunch of forms that I need to put in a list
I have a bunch of forms that have various input elements. I want to
I have a bunch of forms that have various input elements. I want to
I currently have an IHttpModule that is doing some custom forms authentication to authenticate
I have a bunch of external forms that post data into databases via CFC's.
We have a legacy forms application that runs a bunch of 32 bit C++
I have a form that contains a bunch of checkboxes. Before submitting the form,

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.