I was determined to post some code that would enable us all to move a control easily without us having to do calculations.
It came about when LarryMc mentioned that he might find it hard to drag a control to a specific location and that arrow keys would help.
So here are the functions and in this example I am detecting the keyboard arrow keys being pressed e.g. up / down etc and moving a control a specific amount in this case 20.
The functions are:
Window, ControlId, Amount of movement.
This works for a window with / without the @SIZE style.
The code is designed so that the control does not disappear from the window.
You could of course move the local variables / constants and make them global ones etc, but this way the code is portable and you should be able to use it in any of your programs.
I'm sure this will come in handy from time to time so I would suggest you grab yourself a copy!