I kind of have it working!!!
I put this in the UserMain file:
function GetActiveWindow(): LongWord; external "[email protected] stdcall";
function ShowWindow(hWnd : LongWord; nCmdShow : LongWord): LongWord; external "[email protected] stdcall";
Const
SW_MINIMIZE = 6;
procedure Minimize;
var hWnd : Longint;
begin
hWnd := GetActiveWindow();
ShowWindow(hWnd, SW_MINIMIZE);
end;
Then I call in the PHP like this:
exo_runhescriptcom ("UserMain.Minimize");
The only thing is that is leaves a “ghost” of that window’s title bar directly above the End User’s Task Bar… Is there another way to call the minimize function without using the native Windows call: “[email protected] stdcall”;?
EDIT: Was able to get rid of the “ghosting” by using: SW_FORCEMINIMIZE = 11; in the function
In case anybody is reading this for future reference: