Hi Sean,
Originally Posted by
seanyboy
I quite like console mode apps, and it's frustrating that DAccess don't provide a "Convert to Console" button in the project options.
Thanks for exposing these functions. I have started to convert some of our house keeping programs so we can run them as scheduled tasks.
becomes
One change I did make was to split the WriteConsole procedure into WriteConsole and WritelnConsole. Also there was comment next to the statement, highlighted below, in the OpenConsole function I didn't really understand as it would be called each time WriteConsole was called.
Code:
Function OpenConsole Returns Handle
Integer iRetVal
Move (Win32AttachConsole(ATTACH_PARENT_PROCESS)) To iRetVal // Can only call this once!
Move (Win32GetStdHandle(STD_OUTPUT_HANDLE)) To iRetVal
Function_Return iRetVal
End_Function