private void FormRead_Load(object sender, EventArgs e) { Control.CheckForIllegalCrossThreadCalls = false; //读取配置文件里的IP和端口号 String svrInfoPath = System.Environment.CurrentDirectory + @"\config.ini"; OperateIniFile oif = new OperateIniFile(svrInfoPath, ""); CostTime = StrToInt(oif.GetValue("local", "time")); }