[SOLVED] Want to minimize active Window

Well I just got back to using EXEOutput again…

Quick minimize question… this has nothing to do with using tray icon or not… What I need is the main window to minimize on a

Sample HTML code:

<form action="searching.php" method="post">
<input type="submit" name="submit" value="SEARCH">
</form>  

When end user clicks SEARCH I need the window to also minimize. That’s it…

I didn’t see any exo_runhescriptcom calls to the minimize command…

Thanks in advance…
SysAdm

Do you mean you didn’t see an HEScript script to minimize the main window?

That is correct…

I know I can call the function using PHP, but I need the actual function…

Example:

Thanks in advance…
SysAdm

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:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx

Thanks in advance…
SysAdm

This topic was automatically closed after 24 hours. New replies are no longer allowed.