Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Run a exe program from Developer Forms 6i

Status
Not open for further replies.

Pacholi

Programmer
Sep 30, 2003
6
CL
Hi:
I open other program .exe from a Form 6i with Win_Api_Shell.WinExec( I'm using D2kwutil.pll ), but I don't know if the program is runnig or not( the .exe program ), I'm using Win_Api_Utility.Get_Active_Window, but the function returns the Forms handler and I need the .exe handler I have executed.

This is the code :
Declare
v_WindowHandle PLS_INTEGER;
Begin
Win_Api_Shell.WinExec( 'c:\faxpress.50\faxmain.exe c:\faxtest.txt', WIN_API.SW_SHOWMINIMIZED, false );
Win_Api_Utility.Sleep( 5000 );
Win_Api_Utility.Get_Active_Window( true )
Win_Api_Shell.SendKeys( v_WindowHandle, :block.txtnombre||'^%2'||:block.txtcompany||'^%2'||:block.txtfaxemail||'{Enter}');
End;

thank a lot.
Paholi
 
I think that if you use WIN_API.SW_SHOWMINIMIZED, that window can not be active.

Regards, Dima
 
I have this from Help

Description

Execute a Windows program from within an Forms Developer product. The program runs independently of the product that called it.

Syntax

PROCEDURE Win_Api_Shell.WinExec
(Command IN VARCHAR2,
WindowStyle IN PLS_INTEGER DEFAULT WIN_API.SW_SHOWNORMAL,
RaiseExceptions IN BOOLEAN DEFAULT FALSE);

Parameters

Command The full command string to start the application
WindowStyle Used to determine how the application should start, the following options are available as constants in the WIN_API package header:
WIN_API.SW_SHOWNORMAL Starts with application’s default
WIN_API.SW_SHOWNOACTIVATE Application does not have focus
*WIN_API.SW_SHOWMINIMIZED Starts minimized and active
*WIN_API.SW_SHOWMINNOACTIVE Starts Ionized without focus.
WIN_API.SW_SHOWMAXIMIZED Starts Maximized

you can see exists 2 way to show minimized a aplication with focus and without focus( marked with * ).

thx, pacholi.

Atte.
Alejandro Devia M.
Consultor
Pyx
56-0-9 072 15 30
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top