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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:59:11+00:00 2026-05-17T16:59:11+00:00

I have created a dialog as a winform and am calling that winform like

  • 0

I have created a dialog as a winform and am calling that winform like this:

 Dim dlgEditChangeOrder As New dgEditChangeOrder
        Dim dlgResult As DialogResult

        dlgResult = dlgEditChangeOrder.ShowDialog

…pretty simple. I want to be able to set the visiblility of a control on the win form when the win form is called. I would like to do this as a constructor so I could write the following….

  Dim dlgEditChangeOrder As New dgEditChangeOrder(visibleIsTrue)

Can someone give me the contructor code to make this happen? The reason I am concerned is I dunno if its legal to do this inside a winform since the winform is loaded bby the precreated IntializeComponent() function

  • 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-17T16:59:11+00:00Added an answer on May 17, 2026 at 4:59 pm

    It is perfectly acceptable to overload constructors. Just make sure to call InitializeComponent() in your overloaded constructor, as it’s required to setup the form.

    However, as long as you do this, you are free to overload the constructor (or just change the one that’s there).


    Edit:

    Just add this in your code behind:

    Public Sub New(ByVal isVisible As Boolean)
        ' This call is required by the designer.
        InitializeComponent()
    
        ' Do what you want with isVisible here
    
    End Sub
    

    If you want to have a default constructor, too, you can add that (it’s not required, however).

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

Sidebar

Related Questions

I have dialog created like this $('#add_error').click(function(e) { $('<div>') .load('/someaction/format/html/') .dialog({ title: 'Some title',
I have a modal dialog that is created with the following: procedure TFormCompose.createParams(var Params:
I have created a custom dialog, the code is below. The problem is that,
I have created a dialog that shows a multi-choice list of items that can
I have created a dialog popup on click to show - I would like
I have created a dialog. Now what I want is that onClick of the
I have created a dialog box in my WinForms application. This has many text
I have a Winform dialog that contains several user controls - all of them
I have created Custom Dialog for my application. While i run that application in
I have created a Dialog with two buttons Yes, No, and then I have

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.