Often it is usefull if the user press CTRL-C to abort a console-Programm.
This little Api-call do the trick form me, it installs a CallBack in the Console-Handler:
Code: Select all
OpenConsole()
ConsoleColor(14,0)
ConsoleLocate(10,12)
PrintN("PRESS CTRL-C to goto 'MyTest'")
SetConsoleCtrlHandler_(?MyTest,#true)
Repeat ;endless Loop
Delay(1)
ForEver
End
MyTest:
Beep_(100,100)
Beep_(200,100)
CloseConsole()
MessageRequester("Test","Hello, this is the end from CTRL-C",0)
End