The Window Closer X
#3
Hi @Ron welcome to the forum!

This works for me on my Windows 10 laptop:
Code: (Select All)
_Title "Test F4 key to exit" 'b+ 2023-02-08 mod wiki On Key(n) example
Key(4) On ' F1 too important use F4 to quit
On Key(4) GoSub quit
Print "Press F4 to quit!"
temp = _Exit
Do
    Cls
    count = count + 1
    Print count
    _Limit 30 ' <<< really needed to slow down looping
Loop 'never ending loop
End ' just in case no fall through to gosub
quit: ' set to quit when press F4
End
Return

Never used On Key before, looks like you need additional Key(n) On as part of setup. And probably used to deactivate too, ie Key(n) Off

I tested on QB64pe 3.4.1 but see no reason why an earlier version would not work. I did have to slow the looping down with _Limit to catch the Key.

PS oh looky keys for the arrows!
b = b + ...
Reply


Messages In This Thread
The Window Closer X - by Ron - 02-08-2023, 06:58 PM
RE: The Window Closer X - by Kernelpanic - 02-08-2023, 07:27 PM
RE: The Window Closer X - by bplus - 02-08-2023, 07:28 PM
RE: The Window Closer X - by Ron - 02-08-2023, 08:34 PM
RE: The Window Closer X - by SpriggsySpriggs - 02-08-2023, 07:40 PM
RE: The Window Closer X - by mnrvovrfc - 02-08-2023, 08:34 PM
RE: The Window Closer X - by Ron - 02-08-2023, 09:26 PM
RE: The Window Closer X - by SMcNeill - 02-08-2023, 09:47 PM



Users browsing this thread: 1 Guest(s)