Passing selected value of a combobox from form1 to textbox of form2
  • In my application in form1 there is a combobox control with few items. Now I want to transfer selected item of combobox to textbox of form2. Please help.
  • 1 Comment sorted by
  • following example for text box replace your code instead textbox
    In form1

       public string GetTextFromCombo()
            {
                string mytext = "";
                if (txtUserName.Text != "")
                {
                     mytext = txtUserName.Text;
                }
                return mytext;
            }


    in Form2

    Form1 myform  = new Form()

    Textbox.text=myForm.GetTextFromCombo();


    do best will hope best

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative