Jump to content
Fivewin Brasil

Travar p/ um EXE


Recommended Posts

  • 3 months later...

Eu utilizo da seguinte forma:

Local cDirwin:=GetWindir(),cFile:="TEMPORAR.ERR"

if File(cDirWin+"\"+cFile)

if Ferase(cDirWin+"\"+cFile)=-1

MsgStop("O programa está aberto na memória !")

IF !MsgNoYes("Deseja continuar ?")

REturn

endif

else

FCreate( cDirWin+"\"+cFile )

Endif

Else

FCreate( cDirWin+"\"+cFile )

Endif

nHdl:=Fopen( cDirWin+"\"+cFile,0 )

endif

//Bem, o arquivo cFile, fica aberto enquanto o aplicativo está rodando...

// Execute esta função ao finalizar o aplicativo

Fclose(nHdl)

// É simples, mas funciona !

Atenciosamente,

ECM SISTEMAS

Marciano Queiroz

Teixeira de Freitas-Ba

FW 2.4 - Harbour

Link to comment
Share on other sites

oWnd:=FindWindow( 0,SYS_NAME)

if oWnd!=0

MsgAlert("O programa já se encontra aberto!")

BringWindowToTop( oWnd )

Return(.f.)

endif

oWnd:=FindWindow( 0,'Erro!')

if oWnd!=0

MsgAlert("O programa já se encontra aberto!")

BringWindowToTop( oWnd )

Return(.f.)

endif

oWnd:=FindWindow( 0,'Aguarde...')

if oWnd!=0

BringWindowToTop( oWnd )

Return(.f.)

endif

Messager

luizantoniooliveira@hotmail.com.br

Skype

luizantoniooliveira

Xhb 99.5 / FW 2.6 / WorkShop / HbMake / Xmate / Clipper 5.3b / Blinker 5.1 / LLibg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...