How to bring app to top if already running?

How to bring app to top if already running?

Postby Ariston (BR) » Fri May 07, 2010 12:57 pm

HI. (Oi)

How can I have the app brounght to top if a try tu run it agian. (Como faço para trazer o aplicativo para a frente se eu tentar executá-lo novamente?)

Ariston Santos.
FWPPC
User avatar
Ariston (BR)
 
Posts: 9
Joined: Fri May 07, 2010 1:42 am
Location: Macapá - Amapá - Brasil

Re: How to bring app to top if already running?

Postby Maurizio » Fri May 07, 2010 2:54 pm

Code: Select all  Expand view
CFILENAME := "test.exe"
  IF ISEXERUNNING( CFILENAME( HB_ARGV( 0 ) ) )
     msginfo("Test is running","Attenzione")
     SHOWWINDOW( FINDWINDOW( 0, "TEST" ), 9 )
     SETFOREGROUNDWINDOW( FINDWINDOW( 0, "TEST" ) )

     RETURN NIL
  ENDIF

  DEFINE WINDOW m->oWnd TITLE "TEST"

 


Regards Maurizio
Maurizio
User avatar
Maurizio
 
Posts: 796
Joined: Mon Oct 10, 2005 1:29 pm

Re: How to bring app to top if already running?

Postby Ariston (BR) » Fri May 07, 2010 3:38 pm

Thank you very much, friend. I'm gonna test it now.
Muito obrigado, amigo. Vou testar agora.

Editado (Edited)

It worked. Thanks again. (Funcionou. Obrigado novamente.)
Ariston Santos (Macapá-Amapá-Brasil)
FWPPC, Fwh26, xHb, xDev, WorkShop, Php, MySQL.
User avatar
Ariston (BR)
 
Posts: 9
Joined: Fri May 07, 2010 1:42 am
Location: Macapá - Amapá - Brasil


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 4 guests