摘要:
以前写代码, 总是把主单元弄得满满当当; 现在更喜欢把控件比较独立的功能写成一个单元, 改写属性、重载方法...哪怕只有一点点和默认不同, 也喜欢独立出来.刚刚用到 TListBox, 需要能拖动元素、双击删除.------------------------------------------------------------------------------------------------------------------------------------------------unit ListBox2;interfaceuses System.Classes, Vcl.C. 阅读全文
摘要:
uses Winapi.msxml, System.DateUtils;//实时获取网络时间的函数, 得到的是格林威治时间; 默认从 sohu 服务器获取, 因为它最快, 平均只需 15 毫秒function GetNetTime(aUrl: WideString = 'http://www.sohu.com'): string;begin with CoXMLHTTP.Create do begin open('Post', aUrl, False, EmptyParam, EmptyParam); send(EmptyParam); Result := ge 阅读全文