-1

I have created an app where users can store their passwords in iv used an image which is an icon and then a textbox next to it and also a login system and logout button. When the user types in the textbox and logouts out when they log back in the textbox is empty.

So far for my other textboxes I have put search in the textbox and when the users clicks the textbox it disappears and the comes back again now I just need to figure out how to keep the text in the textbox unless the user deletes it themselves.

I'm not sure if its simple by using one of the events.

4

1 回答 1

1
    private void button2_Click(object sender, EventArgs e)  // Read the data...
      {
        StreamReader sr = new StreamReader("f:\\hg.txt");

        textBox1.Text = sr.ReadToEnd().ToString();
        sr.Close();

    }


    StreamWriter sw;
    private void button1_Click(object sender, EventArgs e) // write the data in the txt file
    {

            sw = new StreamWriter(textBox2.Text);

            sw.WriteLine(textBox3.Text);


            sw.Close();


        }

我正在尝试解决您的问题。我粘贴了两个按钮和两个文本框。我在用英语写作时遇到了这个问题。

于 2013-02-21T21:01:26.473 回答