Hi,
I use next api-call to print directly a word-document from within Progress.
This works fine, but there is 1 counterpart, namelly by each print Word opens, gets in front, prints & closes. If at this time you are working in another program focus is lost. Is there an alternative to this api, which doesn't interference with the user interface ?
The api is called from within Progress as next : api-prn("c:\temp\my.doc").
/* the api-prn source code */
/*
# E. Nuyttens
# dd. 27/04/2000
*/
/* Afdrukken via Api*/
def input parameter Par_source as char no-undo.
def var hinstance as int no-undo.
PROCEDURE ShellExecuteA EXTERNAL "shell32" :
define input parameter hwnd as long.
define input parameter lpOperation as char.
define input parameter lpFile as char.
define input parameter lpParameters as char.
define input parameter lpDirectory as char.
define input parameter nShowCmd as long.
define return parameter hInstance as long.
END.
run ShellExecuteA (0, /* handle naar window, 0 is ok */
"print", /* afdrukken */
Par_source, /* volledig pad */
"", /* doeteriernietoe ! */
"", /* doeteriernietoe ! */
1, /* steeds 1 */
output hInstance).
Thanx for any response
Emmanuel.
I use next api-call to print directly a word-document from within Progress.
This works fine, but there is 1 counterpart, namelly by each print Word opens, gets in front, prints & closes. If at this time you are working in another program focus is lost. Is there an alternative to this api, which doesn't interference with the user interface ?
The api is called from within Progress as next : api-prn("c:\temp\my.doc").
/* the api-prn source code */
/*
# E. Nuyttens
# dd. 27/04/2000
*/
/* Afdrukken via Api*/
def input parameter Par_source as char no-undo.
def var hinstance as int no-undo.
PROCEDURE ShellExecuteA EXTERNAL "shell32" :
define input parameter hwnd as long.
define input parameter lpOperation as char.
define input parameter lpFile as char.
define input parameter lpParameters as char.
define input parameter lpDirectory as char.
define input parameter nShowCmd as long.
define return parameter hInstance as long.
END.
run ShellExecuteA (0, /* handle naar window, 0 is ok */
"print", /* afdrukken */
Par_source, /* volledig pad */
"", /* doeteriernietoe ! */
"", /* doeteriernietoe ! */
1, /* steeds 1 */
output hInstance).
Thanx for any response
Emmanuel.