06-08-2023, 12:05 AM
(06-07-2023, 09:31 AM)TempodiBasic Wrote: HiAccording to the wiki, alt-F4 should return 1. Break can be assigned different keypress depending on who built it. For Lenovo, which I use, it is Function-B to send a break command.
a little question to you QB64 friends...
I am not able to find key BREAK on my notebook keyboard... (I only found Canc, Stamp, Ins, Esc)
Should you run my little demo on your PC/notebook to test the Ctrl+Break option?
ThanksCode: (Select All)foo = _Exit
Print "Welcome to the _EXIT test code!"
Print "Please press X on the window bar or / and Alt+F4 on keyboard or Ctrl+Break on keyboard and look at results"
Print "press Spacebar to quit program"
View Print 5 To 20
While kb <> 32
kb = _KeyHit
_Delay 2
food = _Exit
On food GOSUB X, AltF4, CtrlBreak, XCtrlBreak
Wend
End
X:
Print "You have clicked on X of the window"
Return
AltF4:
Print "You have pressed Alt + F4 on keyboard"
Return
CtrlBreak:
Print " You have pressed Ctrl+ Break on keyboard"
Return
XCtrlBreak:
Print "You have pressed Ctrl+Break on keyboard and you have clicke on X of the window"
Return
Moreover pressind Alt + F4 (Windows command to close the program) _EXIT retruns 1. Is It right?
Thanks for answers and testing.
WHILE NOT EndOfLife(1)
HappyLife = HappyWife - (Money * Time * Travel * Gifts)
Kids = (NoTime * LackOfLove) MOD NumOfKids
IF Retirement <> Rich THEN YearsOnJob = YearsOnJob + 1 ELSE SeeTheWorld
WEND
HappyLife = HappyWife - (Money * Time * Travel * Gifts)
Kids = (NoTime * LackOfLove) MOD NumOfKids
IF Retirement <> Rich THEN YearsOnJob = YearsOnJob + 1 ELSE SeeTheWorld
WEND