Idea similar to _exit
#4
(09-26-2022, 04:46 AM)mnrvovrfc Wrote: I made a quick look at "libqb.cpp", toward the bottom, at the "big fat main loop". It doesn't look like "_EXIT" is being handled by ancient interrupts. What you're requesting might have to be programmed like that for "_EXIT" but check for a different keystroke combination. Why do you want to trap "Print Screen" key? Oh OK you must actually have a printer and it's annoying to press it. Or it's annoying that Windows interferes when it guesses the user must have wanted to print a text file via Notepad.

You have to remember that any trace of "CALL INTERRUPT" is emulated by QB64PE only with the first three or so mouse functions, because those calls were quite common in programs written for QBasic, especially those by "TheBob". Cannot emulate BIOS or MS-DOS like we could do in M$QB or QBasic many years ago. Therefore, any emulation of ancient interrupts have to be implemented. Oh no somebody is going to request the "BSOD" one or the disk sector one... just ignore them devs.

The same thing goes on with the ancient input and output ports. Because so many QB/QBasic programs played around with EGA/VGA bit planes, the ports were emulated at that end. One more thing to emulate might have had to do with the keyboard. Otherwise Windows Vista and later was going to make it a pain installing a DLL only to be able to use "INP()" and "OUT" and "WAIT" in a QB program away from 16-bit.

I'm very confused as to why you are bringing up mouse interrupts and such. I think all he's saying is that he wants a way to catch if someone has pressed "PrintScreen". Very easy to do, as far as I can tell. Not easy to make a new keyword to do it (for me, at least) but definitely easy to do it with Win32 API in a program. It's the "VK_SNAPSHOT" key (0x2C). I'm not sure why he said it was 0x05. That's "VK_XBUTTON1".

GetAsyncKeyState (MSDN page for the function used to check for key presses from the Virtual Key Codes page)
Ask me about Windows API and maybe some Linux stuff
Reply


Messages In This Thread
Idea similar to _exit - by eoredson - 09-26-2022, 04:26 AM
RE: Idea similar to _exit - by mnrvovrfc - 09-26-2022, 04:46 AM
RE: Idea similar to _exit - by SpriggsySpriggs - 09-26-2022, 07:13 PM
RE: Idea similar to _exit - by mnrvovrfc - 09-26-2022, 07:20 PM
RE: Idea similar to _exit - by Pete - 09-26-2022, 04:23 PM
RE: Idea similar to _exit - by SpriggsySpriggs - 09-26-2022, 07:42 PM
RE: Idea similar to _exit - by eoredson - 10-10-2022, 03:42 AM
RE: Idea similar to _exit - by a740g - 10-10-2022, 10:53 AM
RE: Idea similar to _exit - by eoredson - 10-11-2022, 04:29 AM
RE: Idea similar to _exit - by mnrvovrfc - 10-12-2022, 05:53 AM
RE: Idea similar to _exit - by eoredson - 11-16-2022, 04:22 AM
RE: Idea similar to _exit - by SMcNeill - 11-16-2022, 04:32 AM
RE: Idea similar to _exit - by a740g - 11-16-2022, 04:33 AM



Users browsing this thread: 2 Guest(s)