Writing to the Event Log in Delphi

后端 未结 4 2198
攒了一身酷
攒了一身酷 2020-12-08 17:49

How can I get an application to write debug text to the Event Log window in the Delphi IDE (Borland Developer Studio 2006)?

How does one change the color of the text

4条回答
  •  遥遥无期
    2020-12-08 18:00

    OutputDebugString('Hello,World');

    I think you may need to add Windows to your 'uses' list. Not 100% sure on that...

    The text colour can't be changed as far as I know: It's a feature of the Delphi IDE that it adds additional messages into that window for thread start/stop, DLL load/unload, with their own specific colour.

提交回复
热议问题