Here is 3 forms, form3, form1, form2.
form1 has textbox.
A. Start form3, form3 load form1, form1 load form2 and form2 try updating form1.textbox but failed.
B. But start form1, form1 load form2 and form2 try updating form1.textbox and then textbox is normally updated.
I don't know why B succeed but A fail.
How do I do to succeed in A?
(I attached project to show this.)
I havent looked at your project but you can't load something from something that has not been created yet until you load form1 with the textbox it doesnt exist
So if i understand correctly in scenario A you are trying to load form 3 first, then form2 and have form2 get information form form1 textbox?
You have to load form 1 first
perhaps a more senior programmer will correct me or offer a better idea but i beleive that is your problem
Why do you want to load something from a textbox that hasnt been created yet. in theory the user wouldnt have put any information in the textbox yet, so you must have a default value in the textbox, why not just use that value when you load form2?
How ever it should be noted as mentioned it's a lazy approach. The controls Modifier should be private. If access is needed we should handle this correctly.