this.Close();
public static string txt_textbox1 = ""; public static string txt_textbox2 = ""; public static string txt_textbox3 = "";
form1.txt_textbox1 = textbox1.Text; form1.txt_textbox2 = textbox2.Text; form1.txt_textbox3 = textbox3.Text;
class Form2 { ... private int valeur1; ... public int Valeur1 { get { return valeur1; } } }
form2.Close();
try { mon_entier = int.Parse(textBox1.Text); } catch ( FormatException ex ) { // code si il y a une erreur de format } catch ( OverflowException ex ) { // code si la valeur saisie depasse les limites du int } catch (Exception ex ) { // gestion des autres exceptions }
Form2 frm = new Form2(); var_Form1 = frm.var_Form2;
this.Close();
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionpublic void setTextBox1(string sChaine) { this.textBox1.Text = sChaine; }
// Dans ta méthode Closing Form1.setTextBox1(this.textBox1.text);