Thiagodb Posted May 17, 2005 Report Share Posted May 17, 2005 Por favor, alguem sabe como fazer para o executavel só abrir uma vez ( como era no 16 bits )... estou usando a vs. FWH 2.6 e xHarbour 0.99.3 . Obrigado!!! Thiago@cinformatica.com.br Quote Link to comment Share on other sites More sharing options...
ecmsoft Posted August 31, 2005 Report Share Posted August 31, 2005 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 Quote Link to comment Share on other sites More sharing options...
gilmer Posted August 31, 2005 Report Share Posted August 31, 2005 Olá, Você pode usar a função FindWindow(), veja o exemplo endapp.prg no samples, ele irá ajudar. Quote Link to comment Share on other sites More sharing options...
luiz53 Posted August 31, 2005 Report Share Posted August 31, 2005 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.