For Programmers: Free Programming Magazines  


Home > Archive > Clipper > March 2004 > start windows app from clipper









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author start windows app from clipper
Thomas Venus

2004-03-26, 10:59 pm

Hi All,

in my clipper app i start a windows app (image viewer) via the blinker
swpruncmd()-function.
That works fine.

The only thing is, the called windows app keeps the focus and the user has
to
switch back to the clipper app manually.

Does anybody know of a solution to get the focus back to the calling clipper
app?

Thanks in advance

Thomas


Stephen Quinn

2004-03-26, 10:59 pm

Thomas

Probably not what you want to hear but
- don't call the windows program<g>

Why don't you add pix viewing to your app, no need for the external viewer then.

See the OASIS for a couple of libraries http://www.the-oasis.net/
- Ferns Graphics Library http://www.the-oasis.net/files/library/fgl_v30.zip
- RPPCXLibrary http://www.the-oasis.net/files/library/rpcxlb11.zip

--
HTH
Steve Quinn


tnhoe

2004-03-26, 10:59 pm

"Thomas Venus"

You need to use a batch file :-

:begin
yourclipper.exe
if errorlevel=1 goto :winexe
goto :end

:winexe
yourviewer.exe
goto :begin

:end


In your clipper exe,
- for normal exit : errorlevel(0),return
- for running viewer : errorlevel(1),swpruncmd(),return




Clifford Wiernik

2004-03-26, 10:59 pm

You could also make certain that you run application in a window. Some
applications will return focus. For others, you could write a short
xbase++ or other language application that calls window API to return
focus to your clipper application. I do this for a clipper application
that utilizes a windows application to request a client credit bureau
report. The delphi app was not returning focus and you needed to use
the mouse to reselect the clipper window. So clipper->intermediate
app->windows program and back.

Note the name of the window to return to is different for win9x and
win2000/xp.

tnhoe wrote:

> "Thomas Venus"
>
> You need to use a batch file :-
>
> :begin
> yourclipper.exe
> if errorlevel=1 goto :winexe
> goto :end
>
> :winexe
> yourviewer.exe
> goto :begin
>
> :end
>
>
> In your clipper exe,
> - for normal exit : errorlevel(0),return
> - for running viewer : errorlevel(1),swpruncmd(),return
>
>
>
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com