So I have a presentation game where the answers would be revealed/displayed in Form1 when you click a button from Form2, The answers are displayed with TextBox Winform, But when you click the button from form2 it doesnt change the text of the display textbox, I had already searched in the internet for this problem it solved it but I do not want to make a new window as only the display window will be displayed at on the projector.
Form 1:
public void revealItems(int ItemNo)
{
Items zItems = JsonSerializer.Deserialize<Items>(File.ReadAllText(loadJson()));
switch (ItemNo)
{
case 1:
Item1.Text = zItems.ItemArray[0];
Score1.Text = zItems.ScoreArray[0];
InitializeComponent();
break;
}
Form 2:
public void btnAward1_Click(object sender, EventArgs e)
{
var frm = new Form1();
frm.revealItems(1);
}