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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:26:32+00:00 2026-06-04T02:26:32+00:00

I have a combobox on form1 that I need to call on form2 to

  • 0

I have a combobox on form1 that I need to call on form2 to get the user selection. Can some one please give me an example on how to do this?

EDIT: Forgot to explain what Im trying to do. I have a readonly textbox….a user clicks edit to edit the text but I want the text they want/chose to edit to pop up right when form2 is called.

I have this code on form1

    public string SelectedComboValue
    {
        get { return comboBox1.SelectedItem.ToString(); }
    }

And this code on form 2

    EDIT: Added Form1 form1 = null; BUT its still not returning the SelectedComboValue
    public Form2(Form1 parentForm1) : this()
    {
         form1 = parentForm1;
    }

But it gave me an error saying that form1 is not in this context

  • 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-04T02:26:33+00:00Added an answer on June 4, 2026 at 2:26 am

    I suppose that Form1 is the parent of Form2, so when you create the Form2 you use code like this

    Form2 f = new Form2(this);
    

    then in the Form2 class you should have a declaration like this

    Form1 _parentForm = null;
    

    and in the Form2 constructor

    public Form2(Form1 parentForm1) 
    {          
        _parentForm = parentForm1;     
    } 
    

    If this is true then you can call

    _parentForm.SelectedComboValue ;
    

    to get the result required

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

Sidebar

Related Questions

I have a form that has a combobox . I need this combobox value
I have some logic in the business layer that limits the ComboBox options according
I have a sub form in Access: The CopyNo is a combobox that lets
I have one combobox on the window form and I have one method which
I have a combobox in a dialog box form. I need to fill this
I have a problem trying to show some images on my winform. On one
I have a requirement whereby a user can specify a variable number of user-defined
I have a parent form, which contains panels that calls different user control. For
I have some nested SplitContainers and there is one undesired behaviour happening. Every time
I have a Qt Form that contains 2 combo box messages. The second combobox

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.