davido wrote:An excellent, concise, example.
Thank you very much for sharing.
Thanks, davido; always appreciated.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!Please visit my YouTube Channel
fromVB wrote:...why do you open the window and image gadget twice?
Thanks, fromVB. Glad you find it useful.
Rather than fiddling with desktops, the simplest approach would be to obtain the full-screen dimensions from a maximized window. This saves a lot of hassle, especially if there are multiple desktops.
However, if the image dimensions are smaller than a maximized window, the window (same window number) is re-initialised without the maximized flag, while still benefiting from the screen-centred flag. Again, this saves the hassle of fiddling with desktops to centre the window. Accordingly, if the window is re-initialised, the image gadget has to be as well.
It should also be noted that the DesktopWidth() and DesktopHeight() functions do not account for the desktop's taskbar.
Hope it answers your question.
Perfectly - thank you.
@infratec: Is there any advantage in manually positioning the window?