[SOLVED] Want to minimize active Window

Status
Not open for further replies.

sysadm

New member
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:
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
 
Last edited:
Do you mean you didn’t see an HEScript script to minimize the main window?
 
Last edited:
gdgsupport said:
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:
Using PHP

ExeOutput provides you with two built-in php functions to call HEScript functions:

exo_runhescriptcom ( string $script )

$script is the reference to the script’s name and function to call.

string exo_return_hescriptcom ( string $script , string $defaultvalue )

$script is the reference to the script’s name and function to call.

$defaultvalue is the value returned if the script function is not found.

Syntax for $script: script name + dot + procedure/function name, i.e. [scriptname].[functionprocedurename]

Example:
<?php echo exo_return_hescriptcom("UserMain.ReturnDate", "Error"); ?>
Thanks in advance…
SysAdm
 
Last edited:
I kind of have it working!!!
I put this in the UserMain file:
Code:
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:
Code:
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
 
Last edited:
Status
Not open for further replies.
Back
Top