Page 2 of 2

Re: Bring application to front

Posted: Wed Jul 22, 2015 8:29 am
by rdonnay
With your xppload you 'animate' the user, but there is no time benefit.
Yes, I could see that is why you wrote it that way.
That is a very good idea.

I would like to help you figure this out.

Re: Bring application to front

Posted: Wed Jul 22, 2015 8:50 am
by rdonnay
If you start 'xppload xdemo.exe' you will see my problem.
I don't see the problem.
When I click OK on the MsgBox, the Xdemo.exe application comes into focus.
Are you saying that you want it to appear in front of the MsgBox ?

Re: Bring application to front

Posted: Wed Jul 22, 2015 2:54 pm
by messaoudlazhar
Hi,
test the syntax :
runshell( "/C autologon test.txt" , "count.exe" , .T. , .F. )

If the result remains the same test :
DC_Isapprunning(,,<title application>,.T.)

Best regards

Re: Bring application to front

Posted: Thu Jul 23, 2015 12:10 am
by skiman
Hi,

I tested it as follows.
- Create a shortcut to 'xppload xdemo.exe'.
- Start Windows Explorer and resize it to 50% of your screen. Move it so you see your shortcut on the desktop.
- Start the shortcut.

The xdemo is started in the background according to Windows Explorer.

Re: Bring application to front

Posted: Fri Jul 24, 2015 12:37 am
by skiman
Hi,

Anyone who can confirm the problem when testing as in the previous post?

Re: Bring application to front

Posted: Fri Jul 24, 2015 12:04 pm
by Auge_Ohr
hi,

as i see XppLoad.PRG ( BAD Name while we have XppLoad.EXE from Xbase++ ) use RUNSHELL() which have no Return Handle ...

Runshell will load a new Instance of CMD.EXE ... that is not the Windows Way to call a 32bit Application ...
try to use Windows ShellExecuteA() "open" API to start a Windows Application.

Re: Bring application to front

Posted: Thu Aug 13, 2015 8:03 am
by skiman
Hi Jimmy,

The result remains the same. The application gets focus but doesn't come to the front.

It is started with the shellexecute. It processes and loads some things without displaying something on the screen, and then it waits untill it receives the login parameters. This is send in some kind of 'flag' file.

As soon as the application sees the flag file, it reads it, and starts the main screen.

At that moment the 'icon' on the taskbar starts blinking, but the screen doesn't come to front.