Commit 806e995b39bdb873300af98874ecbfb2c8c249ab
1 parent
0a932b6a
Exists in
master
Atualizado para "mapacacic" apenas.
Showing
1 changed file
with
0 additions
and
41 deletions
Show diff stats
MapaTesteProj/MapaCACICpgfn.dpr
| ... | ... | @@ -1,41 +0,0 @@ |
| 1 | -program MapaCACICpgfn; | |
| 2 | - | |
| 3 | -uses | |
| 4 | - Forms, | |
| 5 | - Windows, | |
| 6 | - MapaTeste in 'MapaTeste.pas' {frmMapaCacic}, | |
| 7 | - CACIC_Comm in '..\CACIC_Comm.pas', | |
| 8 | - CACIC_Library in '..\CACIC_Library.pas'; | |
| 9 | - | |
| 10 | -{$R *.res} | |
| 11 | - | |
| 12 | -const APP_NAME = 'MapaCACICpgfn.exe'; | |
| 13 | - | |
| 14 | -var hwind:HWND; | |
| 15 | - oCacic : TCACIC; | |
| 16 | - | |
| 17 | -begin | |
| 18 | - oCacic := TCACIC.Create(); | |
| 19 | - | |
| 20 | - if( oCacic.isAppRunning( APP_NAME ) ) | |
| 21 | - then begin | |
| 22 | - hwind := 0; | |
| 23 | - repeat // The string 'My app' must match your App Title (below) | |
| 24 | - hwind:=Windows.FindWindowEx(0,hwind,'TApplication', APP_NAME ); | |
| 25 | - until (hwind<>Application.Handle); | |
| 26 | - IF (hwind<>0) then | |
| 27 | - begin | |
| 28 | - Windows.ShowWindow(hwind,SW_SHOWNORMAL); | |
| 29 | - Windows.SetForegroundWindow(hwind); | |
| 30 | - end; | |
| 31 | - FreeMemory(0); | |
| 32 | - end | |
| 33 | - else | |
| 34 | - begin | |
| 35 | - Application.Initialize; | |
| 36 | - Application.Title := 'MapaCACICpgfn'; | |
| 37 | - Application.CreateForm(TfrmMapaCacic, frmMapaCacic); | |
| 38 | - Application.Run; | |
| 39 | - end; | |
| 40 | - oCacic.Free(); | |
| 41 | -end. |