-1
I’m playing a poker game in C#, but I’m not able to establish a communication between 2 Forms, so the formPrincipal receives values from formSecundario, using the player class that exists in formPrincipal only I am calling the formSecundario sending the main as parameter(I believe this way I can access the class)
Contextualizing: at the time the player is in his turn and wants to increase his bet I open a new form asking him to enter the amount he wants to increase and if he confirms that he wants to send even.
frmAumentar aumento = new frmAumentar(this);
aumento.ShowDialog();//Isso no formPrincipal
While in formSecundario I’m getting like this
public frmAumentar(frmPokerGame principal)
{
InitializeComponent();
}
But I need that in the button1 click event it sends the parameters of a textbox that is in the form. But I do not know how to send to the player.Balance the amount he has increased.
Thank you Daniel Gama you helped me so much
– Eduardo Maciel