>George, I've advanced a little bit but am still stuck !!
>
>I've set up a .prg as follows:
>------------------------------------
>* ShowWind
>*
>Declare Integer FindWindow in Win32API ;
> String @lpClassName,String @lpWindowName
>
>lcApplicationTitle = "cmd.exe"
>lnHWnd = Findwindow(0,@lcApplicationTitle)
>wait window 'Windows handle for cmd.exe = ' + Str(lnHWnd)
>
>Declare Integer ShowWindow in Win32API ;
> Integer hwnd, Integer nCmdShow
> * lnhWnd is the Window Title
> * Restore it to its last size and position
>= ShowWindow(lnHWnd,9)
>-------------------------------------
>
Rather than the WinAPI, I'd recommend using the WSH's Wscript.Shell's AppActivate() method - pass it the name of the executable or part of the title of the top-level Window of an app, and it'll select the app, bring the top-level window to the foreground and activate the top-level window. You'd use it like:
oShell = CREATEOBJ('Wscript.Shell')
oShell.AppActivate('CMD.EXE')