The TextBox control saves the last input


This article is to refer to C ා how to let WinForm program input text box to retain the last input, again thank you
Write it again here, in order to save it, so that you can find it quickly next time
1. Setting the configuration file for the txtbox control
Select text to create a new one
3. Enter the custom name and select user
Sadname is the name defined in the previous step

private Settings settings = new Settings();
  private void Form1_Load(object sender, EventArgs e)
        	 txtBox1.Text = settings.sdaname;
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
           settings.sdaname  = txtBox1.Tex;

6. If there are multiple txtbox controls in the project, each control needs to set a configuration file, and the configuration file name of each control cannot be the same

Recommended Today

Minimize the configuration required after installing CentOS 6. X

1、 / boot partition backup 2、 Network configuration Modify host name: Copy code The code is as follows: #vi /etc/sysconfig/network NETWORKING=yes #HOSTNAME=localhost.localdomain HOSTNAME=CentOS-1 #You can also set up a gateway here#GATEWAY=192。168.30.1 Set network to DHCP get Copy code The code is as follows: vi /etc/sysconfig/network-scrip/ifcfg-eth0 DEVICE=”eth0″ BOOTPROTO=”dhcp” HWADDR=”08:00:27:A7:AB:97″ NM_CONTROLLED=”no” ONBOOT=”no” TYPE=”Ethernet” UUID=”9622f9e1-6218-4c56-9f45-7ae29b477e89″ Set static IP […]