Sometimes you may need to force focus to a certain widget.
There must be several solutions but I found this one to be fairly reliable: make Windows think the user clicked on the widget using his left mouse button. 'Click' is a combination of 'buttondown' and 'buttonup' so it involves two messages, but I assume you might be allowed to skip one of them.
So if you want to apply focus to FILL-IN-1 you might say:
run MouseClick(FILL-IN-1:HANDLE).
{windows.i} PROCEDURE MouseClick : DEFINE INPUT PARAMETER hWidget AS HANDLE NO-UNDO. DEFINE VARIABLE ReturnValue AS INTEGER NO-UNDO. RUN PostMessage{&A} IN hpApi(hWidget:HWND, {&WM_LBUTTONDOWN}, {&MK_LBUTTON}, 0, OUTPUT ReturnValue). RUN PostMessage{&A} IN hpApi(hWidget:HWND, {&WM_LBUTTONUP}, 0, 0, OUTPUT ReturnValue). END PROCEDURE.
You might have noticed the use of PostMessage instead of SendMessage like in apply the right mouse button. I have no idea why SendMessage doesn't work for the left mouse button.