View Single Post
Join Date: Mar 2008
Posts: 6
Reputation: kashifbhatti is an unknown quantity at this point 
Solved Threads: 0
kashifbhatti kashifbhatti is offline Offline
Newbie Poster

Re: Using multiple forms in c# windows application

 
0
  #9
Sep 16th, 2008
Originally Posted by c.v.burgess View Post
I get this:

private void button2_Click(object sender, EventArgs e)
        {
            Form3 form3 = new Form3(); form3.ShowDialog();
            string str = Form3.textBox1.Text;
        }
It tells me that "Mail.Form3.textBox1 Is inaccesable due to its pro tsction level."

PLEASE HELP!!!
c.v.burgess, you may need to set protection level of textbox to private or declare properties/functions to get its text. To change protection level, select the control and from properties window change the value of "Modifiers" from private to public.
Reply With Quote