Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Arquivo aberto
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00843041
Message ID:
00843051
Vues:
21
This message has been marked as the solution to the initial question of the thread.
Thiago,

Tenta isto:
if IsAppRunning("Caption do seu Programa")
  this.ExecutarSeuPrograma()
else
  this.AtualizarSeuPrograma()
endif
***
function IsAppRunning(IcAppScreenTitle)
  DECLARE INTEGER FindWindow IN Win32api STRING, STRING
  DECLARE ShowWindow IN Win32api INTEGER, INTEGER
  DECLARE SetForegroundWindow IN Win32api INTEGER 
  nWinHandle = FindWindow(NULL, IcAppScreenTitle)
  IF nWinHandle <> 0
    SetForegroundWindow(nWinHandle)
    *WAIT WINDOW 'Carregando ' + IcAppScreenTitle + '...' TIMEOUT 1
    ShowWindow(nWinHandle, 9)
    RETURN .T.
  ELSE
    RETURN .F.   	
  ENDIF
endfunc && function IsAppRunning(IcAppScreenTitle)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform