Issue is with window focus/order:

I have Program1 that launches Program2 using:

RUN('tjele.exe /' & CLIP(lok_handleplan_id))

This works fine.

The issue is with window focus/order:

  • Program2 opens its own window
  • If I switch back to Program1 to look something up
  • The window from Program2 disappears behind Program1’s windows, and it can be difficult to find again

I would like the window in Program2 to stay visible/on top while Program1 is still open.

What is the best way to handle this in Clarion?

  • Should I use SetWindowPos(..., HWND_TOPMOST, ...) in Program2?
  • Is there a better approach when launching a separate EXE with RUN()?

Any suggestions are appreciated.

If you have WinEvent then
WinOnTop() etc.

Otherwise yes, SetWindowPos.

I tried with WenEvent, but did not make it work. I was a bit tired after having woeked from early sunday morning! I found that Icetips Solutions had almost the same, and that vorked and i sent the solution at 7:14 PM yesterday.

But thanks anyway Bruce!

Best regards

Edvard korsbæk