Log文件在系统的当前目录里 mousedown的帮助可以在Object Inspector的Event栏选中Onmousedown后按F1。ClickList.SaveToFile(ChangeFileExt(Application.ExeName, '.LOG')); { save the list }测试时你可以这样写 ClickList.SaveToFile('D:\xxx\xxx\'+ChangeFileExt(Application.ExeName, '.LOG')); { save the list } 直接给定目录。 另外,你的这条语句很有点吓人:第一感觉是要覆盖Exe文件。
ChangeFileExt does not rename the actual file, it just creates a new file name string. 幸亏有这句话。
mousedown的帮助可以在Object Inspector的Event栏选中Onmousedown后按F1。ClickList.SaveToFile(ChangeFileExt(Application.ExeName, '.LOG')); { save the
list }测试时你可以这样写
ClickList.SaveToFile('D:\xxx\xxx\'+ChangeFileExt(Application.ExeName, '.LOG'));
{ save the list } 直接给定目录。
另外,你的这条语句很有点吓人:第一感觉是要覆盖Exe文件。
幸亏有这句话。
不过我把OnDestroy 的事件放到OnClose去了:)
procedure FormDestroy(Sender: TObject);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
上面这两个procedure除了手工添加外,能否直接添加,
还有,为什么procedure不叫destroy,和mousedown,而要叫formdestroy/formmousedown呢?
又加了10分,谢谢。
各位,在你们的系统里生成log文件了吗?——生成了。 这两个procedure除了手工添加外,能否直接添加,
双击相应事件的空白处就可以了。