954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

get access textbox text form another form textbox text

currently i am doing sms function by using window mobile standard 6.
i have multiple form, up to 4 window form.
and at the last form, i wish to collect all the data that already key in in previous form textbox text, and send message to people.

example:
in form 1: textBox1. text
form 2: textBox1.text
......
at the SMS form coding like:

{
SmsMessage messageFromForm1TextBox1 = new SmsMessage (textBox1.Text, "this text get from 1 textBox1")
messageFromForm1TextBox1.Send();

SmsMessage messageFromForm2TextBox1 = new SmsMessage (textBox1.Text, "this text get from 2 textBox1")
messageFromForm1TextBox1.Send();
}


kindly advice.
thx a lot

cheekangteh
Newbie Poster
12 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

Make your textbox variables public and then select the text as follows:

{
SmsMessage messageFromForm1TextBox1 = new SmsMessage (form1.textBox1.Text, "this text get from 1 textBox1")
messageFromForm1TextBox1.Send();
 
SmsMessage messageFromForm2TextBox1 = new SmsMessage (form2.textBox1.Text, "this text get from 2 textBox1")
messageFromForm1TextBox1.Send();
}
berniefitz
Light Poster
36 posts since Jul 2011
Reputation Points: 17
Solved Threads: 7
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: