BEST Way to SEND DATA between Multiple Forms | C# Windows Form

preview_player
Показать описание
the video shows that how can you send data from one form to another form in c#
modify or access data between forms
so you can change data of a form, from another form using this method.
pass data form one form to other

Software Used in This Tutorial:
-Visual Studios 2019 Community Edition

Project Description:
-Based on Windows Form C#.
Рекомендации по теме
Комментарии
Автор

CHECK THIS OUT!

How to Buy Website Domain & Hosting, Complete Simple Procedure

HassaanRaza
Автор

I just went through this two or three times and it feels like I just learned in six minutes what would've taken six weeks to learn from other "dry" tutorials. Again, good job.

ricklangston
Автор

THIS IS THE BEST!!! THANK YOU 3000!
I have been looking for this for over 3 weeks now!

mohamedhussein
Автор

This helped me with an issue I was facing about one whole week. I'm immensely grateful for this content, many blessings for you!

viniciusmachadovianna
Автор

I went through a lot of videos, not one did not work, I saw yours, checked it and immediately worked, thank you very much, you helped a lot

warzonerustproject
Автор

this just answered 5 pages of modules, I've been fixing my project for 2 weeks! THANK YOU SO MUCH!!!

konichiwaya
Автор

That was so cool. I've been hacking away at this for over an hour. This video was clear and straight to the point. Thanks. You saved me a lot of time. :D

ricklangston
Автор

I kept finding programs opening multiple instances of form2 every time I transferred data, but this does exactly what I needed. Since I am using some hardware in combination with advanced mathematical processing to send messages back from the future, you will be first in line for the lottery numbers when everything is up and running. Thank you! I presume I can run a chart control using similar methods? There are so many charts in my program that one form is not enough.

trevorloughlin
Автор

I usually have a hard time with Hinglish. But this time it was WELL WORTH it, thanks !
Also slowing the video a bit down helped a little bit ;-)

janstergaard
Автор

it say this - 'Object reference not set to an instance of an object.'

Trexstudio
Автор

Thank you so much i was trying to figure out how to do this!

signaller
Автор

Hi.
I have a problem with the example given here.
I have a Form object named EDF1 on the form I have public static cmdrName, shipName_z etc.


So I have this code in EDF1 form:
public static EDF1 instance;
public Label cmdrName_z;
public Label shipName_z;


and

instance = this;
cmdrName_z = cmdrName;
shipName_z = shipName;




Then in the second class project file I have a function


public void read_file (string changeFile)


in which I read the changes that appeared in the file given as "changeFile".



If the change is significant, I enter it into the element on the EDF1 form with the code:


EDF1.instance.cmdrName_z.Text = newValue



The problem is, I get an exception once in a while:


"Invalid cross-thread operation: The 'cmdrName' control is being accessed from a thread other than the thread on which it was created."

This exception was originally thrown on this call stack:
()
(string)
(string)
(string) in Jurnal.cs
ED_Informator.EDF1.OnChanged (object, in Form1.cs

(uint, uint, *)
(uint, uint, *)


Same appeal


EDF1.instance.cmdrName_z.Text = newValue


There are also two other functions, one of which is called to read some information from the most recently created change log file. The second pre-checks the file after creating a new change log file.

BoorgPL
Автор

That was amazing, save me a lot of time

khaibaromari
Автор

Thank you very much man. I've tried to do something for my project and didn't know how to do it. Plus, here I've learned that of public static thing, or how to do things global for the Forms. Thanks.

ProgramateEstaNene
Автор

Thank you so much. I looked for this for 5 days.

dominikweclewski
Автор

Thank you my friend, you were very useful

RasitTunc
Автор

Hi, I want to do this but from form1 I want to be able to hide form 2 using a button.
So When you press a button on form 1 it will hide form2 something like (form2.Hide();) I have tried lots of ways and none of them are working

DN
Автор

omg.. you help me a lot.. no blackbox no stackover... thank u man <3

zuratchankvetadze
Автор

How about using com port in multiple windows? can you help me? I have to receive my data from com port in form2 and display it in my main form (form1)

fitrahazizah
Автор

The name instance does not exist in current context. Am using a multi document winforms with parent and child forms. Any suggestions?

OtsileM