Tuesday, March 28, 2023

⛯ Making sure your program gets the "focus"

 A BASIC Anywhere Machine program cannot receive keyboard input (nor produce any audio) if it does not have the "focus".

For any program that's going to need (physical) keyboard input and/or produce audio output, it is a good idea for the program to get the focus just before the first line of code gets executed.

To have the program pause until it gets the focus, you have to turn off the "autostart this program" feature (which is set to "on" by default).

In the "Project" menu, click on the "Runtime Properties ..." menu item.

That will open the "Runtime Properties Viewer" window.

Remove the check mark on "Autostart his program".



No comments:

Post a Comment

🖥 Pongy game

This program is a port (and slight mod) of the QB64pe program by SierraKen.  (SierraKen's program shared with the QB64pe community in th...