Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arquivo aberto
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00843041
Message ID:
00843051
Views:
19
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform