c#编辑框-组合框-鼠标失去焦点后-绑定事件-如自动保存参数-鼠标移动
private void save_ip_port(object sender, EventArgs e) { string content = comboBox1.Text + "\r\n" + textBox_server_port.Text; Http_Class.WriteConfigFile(content); } private void Form1_Load(object sender, EventArgs e) { textBox_server_port.LostFocus += new EventHandler(save_ip_port); comboBox1.LostFocus += new EventHandler(save_ip_port);
使用LostFoucs
欢迎讨论,相互学习。
cdtxw@foxmail.com