simple question...
-
sorry to be so lame with this question, but i'm still learning how this works. how can i get the input from a user in a textbox control on one form to display on another form?
//Form 1 private void data() { Mainform.sdgform sdg = new Mainform.sdgform(); MessageBox.Show(sdg.txtShipTo.Text); } //Form 2 public System.Windows.Forms.TextBox txtShipTo; public void textboxexample() //for example { this.txtShipTo.Text = "example data"; }
I have a whole form with a lot of textboxes that a user fills in and i need this data to write to a text file. the problem for me is that the toolbar button (on form 1) generates the 'write to textfile' code but it doesn't see the users input (from form 2). i know it's a lame-o question, but i'm still very new. Thanks for your help. -
sorry to be so lame with this question, but i'm still learning how this works. how can i get the input from a user in a textbox control on one form to display on another form?
//Form 1 private void data() { Mainform.sdgform sdg = new Mainform.sdgform(); MessageBox.Show(sdg.txtShipTo.Text); } //Form 2 public System.Windows.Forms.TextBox txtShipTo; public void textboxexample() //for example { this.txtShipTo.Text = "example data"; }
I have a whole form with a lot of textboxes that a user fills in and i need this data to write to a text file. the problem for me is that the toolbar button (on form 1) generates the 'write to textfile' code but it doesn't see the users input (from form 2). i know it's a lame-o question, but i'm still very new. Thanks for your help.