Making a project full screen
============================
Go to the Help menu and click on "Help Topics". Click on the "Search" tab rather than the "Index" one, and type in "full screen". The final entry - "Using the entire screen" - is the one you want. The example given uses the full names for various variables, which is good as it tells you what they do and why they are included, but they do make the program rather long-winded. I'm afraid, therefore, that I simply type
Code: Select all
SYS"SetWindowLong",@hwnd%,-16,&70000000
SYS"SetWindowPos",@hwnd%,-1,0,0,xscreen%,yscreen%
The VDU26 is important, as otherwise any graphics are going to end up in strange locations - though note the caveat in the help.
Read inputs
===========
To detect keyboard inputs you are spoiled for choice. There is GET, INKEY(time%) and, which may be the most useful for you, negative inkeys, which test for a specific key.
Click on the "Index" tab in the Help and type in "inkey". The first entry is "INKEY negative argument" and you use it by
Code: Select all
IFINKEY-2=-1 REPEATUNTILINKEY-2=0:REM Check for Ctrl
Note the REPEATUNTIL. INKEY cycles around so fast that you can easily clock up half a dozen key presses before you can take your finger off the key. Of course, that may be what you want, in which case leave out the REPEATUNITL. If you just want to detect a single keypress, then making sure that the key has been released is a good idea. And, obviously, where I have the REM, you will have the code to do whatever the keypress is for.
Mouse movements and mouse button clicks are also easy.
Code: Select all
REPEAT:MOUSEmx%,my%,mb%:UNTILmb%=4
REPEAT:MOUSEtx%,ty%,tb%:UNTILtb%=0
The first loop will repeat until the left-hand mouse button is clicked. Again, it is a good idea to wait until the mouse button has been released. The coordinates of the pointer are then given in mx% and my%. The different variables (tx%,ty% etc) are in case the mouse moves between pressing the button and releasing it.
However there is another method using ON MOUSE With the "Index" tab still selected enter "ON MOUSE" and click on the entry, which will tell you all that you need to know. However this routine is less easy to use - note the complicated way of finding the x and y coordinates.
Window always on top
====================
In the Help use the "Search" tab and type in "window". You will have to scroll down the results, one of which is "Forcing the window to stay on top".
Transparent window
==================
Richard will no doubt massacre me (and probably deservedly) but I simply cannot find how to make a window transparent in the Help file. However the solution is in the Wiki - not that I can find an index entry for it, I had to use the search box.
https://www.bbcbasic.co.uk/wiki/doku.ph ... ransparent
The only annoying thing is that you have to designate one particular colour as the transparent one, which means that you cannot use that colour in your program. I don't know what your screen-saver does, but suppose you have selected COLOUR 1 as your transparent colour and that your screen-saver produces swirls of every colour. Whenever one of those swirls uses COLOUR1, you will simply get a hole in your graphics, revealing whatever is underneath!