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

  • Home
  • SEARCH
  • 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 8549641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:45:48+00:00 2026-06-11T13:45:48+00:00

I am having a small issue where the defined custom property value is not

  • 0

I am having a small issue where the defined custom property value is not sticking in the inherited form.

The code in my base form is:

namespace ContractManagement.Forms
{
    public partial class BaseForm : Form
    {
        public BaseForm()
        {
            InitializeComponent();
        }

        public Boolean DialogForm
        {
            get
            {
                return TitleLabel.Visible;
            }
            set
            {
                TitleLabel.Visible = value;
                CommandPanel.Visible = value;
            }
        }

        protected override void OnTextChanged(EventArgs e)
        {
            base.OnTextChanged(e);
            TitleLabel.Text = Text;
        }
    }
}

Then in the form that inherits this I have:

namespace ContractManagement.Forms
{
    public partial class MainForm : Forms.BaseForm
    {
        public MainForm()
        {
            InitializeComponent();
        }
    }
}

For some reason, despite what I set in MainForm for DialogForm, on runtime it reverts back to True.

There is another post on this site which mentions this, but I don’t get what it explains.

I also want to create a property which allows me to hide the ControlBox, so how do I add this in?

  • 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-06-11T13:45:49+00:00Added an answer on June 11, 2026 at 1:45 pm

    I believe I have done it now:

    namespace ContractManagement.Forms
        {
            public partial class BaseForm : Form
            {
                private Boolean DialogStyle;
                private Boolean NoControlButtons;
    
                public BaseForm()
                {
                    InitializeComponent();
                    TitleLabel.Visible = DialogStyle = true;
                    ControlBox = NoControlButtons = true;
                }
    
                public Boolean DialogForm
                {
                    get
                    {
                        return DialogStyle;
                    }
                    set
                    {
                        DialogStyle = TitleLabel.Visible = value;
                        DialogStyle = CommandPanel.Visible = value;
                    }
                }
    
                public Boolean ControlButtons
                {
                    get
                    {
                        return NoControlButtons;
                    }
                    set
                    {
                        NoControlButtons = ControlBox = value;
                    }
                }
    
                protected override void OnTextChanged(EventArgs e)
                {
                    base.OnTextChanged(e);
                    TitleLabel.Text = Text;
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a small issue, I have some code that calculates a mean value
i've been having a small issue with the font-weight property, when I put it
I am having a small issue, I am trying to run a $(form#picform).submit after
I'm having a small issue with implementing custom basic authentication for a asmx in
I'm currently having a small issue which i thought would be easy, but not,
I am having a small issue using the classic WebLogin snippet (Not WebLoginPE) in
Ok I am having a small issue I am trying to turn this jQuery
I'm having a small issue when I'm compiling a template with Handlebars.js . I
I'm having an small issue with SQLXML in SQL Server 2008. Here's my testing
I'm having a small issue here: <div id=navbar> <ul id=navtabs class=floatcontainer> <li <?php if

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.