本文整理自网络,侵删。
XE2中正常的代码:
IdTCPClient1.IOHandler.WriteLn(sendData,TEncoding.ANSI); XE8中不行了,解决方法:1,引入“IdGlobal ”单元。
2,调整代码:通过IndyTextEncoding() 方法,把TEncoding转换为IIdTextEncoding。
IdTCPClient1.IOHandler.WriteLn(sendData,IndyTextEncoding(TEncoding.ANSI));
相关阅读 >>
Delphi 使用shellexecuteex运行应用程序并等待完成
winapi 字符及字符串函数(15): charnext、charprev
Delphi 编写activex控件(ocx控件)的知识和样例
Delphi setwindowshookex - 设置钩子 unhookwindowshookex - 卸掉钩子
更多相关阅读请进入《Delphi》频道 >>