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

The Archive Base Latest Questions

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

Could I add some custom control to the standard Message Box for read input

  • 0

Could I add some custom control to the standard Message Box for read input value, for example text fields for user name and password, or I should create custom winform with "Ok,Cancel" buttons and text fields?

Related: Which control to use for quick text input (inputbox)?

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

    Create your own.

    Creating a custom modal (or otherwise) input dialog isn’t all that difficult and you can built the extensibility you need for reuse.

    public class ValueHolder {
        public string SomeInput { get; set; }
        public DialogResult Result { get; set; }
    }
    
    public class GimmeValues : Form {
        //... HAS A TEXTBOX and Okay Buttons...
    
        private GimmeValues() {        
            okButton.DialogResult = DialogResult.OK;
            cancelButton.DialogResult = DialogResult.Cancel;
            // ... other stuff
        }
    
        public static ValueHolder GetInput(IWin32Window owner) {
            using (GimmeValues values = new GimmeValues()) {
                DialogResult result = values.ShowDialog(owner);
                return new ValueHolder { 
                    SomeInput = values.Textbox1.Text,
                    Result = result
                };
            }
        }
    }
    

    Okay I just wrote that all in this editor so forgive any syntax mistakes.
    You could do something like the above but clean it up a little, add the extensibility you need (in terms of buttons and inputs showing that you need etc)… then just call it like ValueHolder value = GimmeValues.GetInput(this); where this would represent an IWin32Window…

    The resulting value of value would be the selected nonsense and you could perform your logic..

    if(value.Result == DialogResult.OK && !string.IsNullOrEmpty(value.SomeInput)){
        //TODO: Place logic....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to create a custom form with some fields that i could add/edit/delete
Im wondering how i could add a success or fail message to return at
I want to create an custom control (descendant of TRichEdit). I simply want add
I have a custom WinForms control (inherits from control, i.e. without user interface jsut
I'm looking to add some custom functionality to a VB installation, but I can't
Sometimes I want to add some custom CSS or Javascript to a page but
I'm trying to add some custom controls to Google Maps and style them with
If you could add anything to Cocoa, what would it be? Are there any
how we could add a special class for labels and errors for a zend-form-element
I'm wondering how you could add flir on the captions of a lightbox. I

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.