C# Tutorial 55: Passing a value from one form to another form in C#




About this tutorial:

Video duration: 11:50
Passing Data Between Forms.

★★★Top Online Courses From ProgrammingKnowledge ★★★
Python Programming Course ➡️ ⚫️
Java Programming Course ➡️ ⚫️
Bash Shell Scripting Course ➡️ ⚫️
Linux Command Line Tutorials ➡️ ⚫️
C Programming Course ➡️ ⚫️
C++ Programming Course ➡️ ⚫️
PHP…

Post Author: OfficeTutes.com

Apple lover, ICT and LEAN consultant, MS Office lecturer My other website with video tutorials - Tutorials, guides and news for iPhones and iPads

31 thoughts on “C# Tutorial 55: Passing a value from one form to another form in C#

    TheChromaKnight

    (September 11, 2019 - 5:24 pm)

    Thank you 😀 It took me so long to actually realize how simply it was

    Zumrud Aliyeva

    (September 11, 2019 - 5:24 pm)

    Thanks a loooot

    Umar Ahmed Sheikh

    (September 11, 2019 - 5:24 pm)

    Sir! Please tell me how to pass many values from one form to another form

    Jason Liadi

    (September 11, 2019 - 5:24 pm)

    what to insert if I want to add a back button in form2 to form1?

    Travel Videos by Raf

    (September 11, 2019 - 5:24 pm)

    you f*lthy p*ssy

    andy रागनिया

    (September 11, 2019 - 5:24 pm)

    I have been trying for a lot of days in which I can create a media player, also get the file path and file name from the database and then play it also you can help me in fullscreen

    Ny Oeur

    (September 11, 2019 - 5:24 pm)

    i error Application.Run(new Form1); i can't run,why?

    Warrior Gaming

    (September 11, 2019 - 5:24 pm)

    Thank You man! Your tutorial made my day. I have been searching for this all around.

    Bicycle Ninja

    (September 11, 2019 - 5:24 pm)

    Thank you!

    Emz BaLleres

    (September 11, 2019 - 5:24 pm)

    too clumsy.

    Long Pheap

    (September 11, 2019 - 5:24 pm)

    What if i want to pass 3 or 4 value?? Add 4 parameters?

    Hi try this:
    Form2 frm2 = (Form2)Application.OpenForms["Form2"];
    frm2.button2.Text = "Hello Youtupe";
    frm2.TextBox2.Text = "How do you do?";

    Sabir Ali

    (September 11, 2019 - 5:24 pm)

    The content is very helpful and I was need to watch this video. But rotating your cursor drives me crazy. I was diverting my eyes to another side not to see it but… I need to see what u`re doing there. Sorry. But for me it`s impossible to watch all your videos. They`re too annoying…

    Alexandar Galic

    (September 11, 2019 - 5:24 pm)

    Thank you a lot! <3

    FacePalmProductions

    (September 11, 2019 - 5:24 pm)

    You talk so slow

    Wilfred Ayieko

    (September 11, 2019 - 5:24 pm)

    very nice well explained video ..i want to know how to make reports in c#

    wejdan albanna

    (September 11, 2019 - 5:24 pm)

    Do you know about omnet++ ?

    Jayjay Sevilla

    (September 11, 2019 - 5:24 pm)

    i've done it's working but now i cant switch forms without the login popping out again…

    Cristian Melgarejo

    (September 11, 2019 - 5:24 pm)

    thanks a lot!

    ayyaz ishaque

    (September 11, 2019 - 5:24 pm)

    anyone can tell me how to same template design on other form class???

    фе дов

    (September 11, 2019 - 5:24 pm)

    //for functions from another forms
    Main_Form main_form = this.Owner as Main_Form;
    main_form.FUNCTION_FROM_MAIN_FORM
    //for data from another forms
    Main_From.VAR_From_Main_Form –>all VARs should be public static

    Aaron Cookerly

    (September 11, 2019 - 5:24 pm)

    You completely fucked my program by mixing up which form was receiving the value. I had to start over from scratch. Thanks.

    kushal sharma

    (September 11, 2019 - 5:24 pm)

    you just passed username what if based on username and pasword it retrieves rest of information like name etc in other form textboxes

    taffy jones

    (September 11, 2019 - 5:24 pm)

    Am I the only one that thinks that the example works in the opposite way that he says it should work? at 2:09, he said whatever value he entered in Form2 will pop up in Form 1 after clicking the button; however, when he clicked, it sends the information from Form 1 to Form 2 instead.  This got me confused at first because I couldn't understand why he was declaring a variable in the Form 2 method that would be accepting the  text rather than sending the text.

    Mantas

    (September 11, 2019 - 5:24 pm)

    nebesvaik

    Hans Müller

    (September 11, 2019 - 5:24 pm)

    best video quality… 360p

    Jesse Li

    (September 11, 2019 - 5:24 pm)

    I'm trying to pass all items from a listbox (or list, idc) to the second form.. any suggestions?

    Hermit DV

    (September 11, 2019 - 5:24 pm)

    absolute trash cant understand your voice

    Daniel Tkach

    (September 11, 2019 - 5:24 pm)

    Thank you.

    Ali Atrushi

    (September 11, 2019 - 5:24 pm)

    thank you very much.

    Taha Wakrim

    (September 11, 2019 - 5:24 pm)

    can i use a form for two fonctions ????
    i mean for exemple :
    if i click on the button add or button show take me to the second form but when i click Button add the second form will save informations
    and when i click Buttonshow the second form will show informations

Leave a Reply

Your email address will not be published. Required fields are marked *