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

🖥 "Spirographed" ellipses to create a colorful (32-bit, gradiant) spherical shape

This sample program shows how to use DRAW to create ellipses (I like to call this a "spirographing" approach. The program generate...