mkyx Posted October 5, 2020 Report Share Posted October 5, 2020 Boa noite, pessoal, Não achei aqui no forum, algo referente por isso resolvi perguntar: Qual comando transferir a tela do nosso programa para frente quando na tela estiver aberto várias outras janelas, como google chrome, word, etc. BringWindowToTop( hWnd ) ShowWindow(hWnd,3) Esses comandos, só funcionam maximizando, quando a tela estiver minimizada, funciona top. Mas, não trazem para frente, tipo BringWindowToFront, testei mas, não existe. Desde já agradeço a todos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted October 5, 2020 Report Share Posted October 5, 2020 Não entendi muito bem, mas testates com estes comandos? IsIconic( oWnd:hWnd ) IsZoomed( oWnd:hWnd ) Quote Link to comment Share on other sites More sharing options...
mkyx Posted October 5, 2020 Author Report Share Posted October 5, 2020 Nos meus testes IsIconic( oWnd:hWnd ) retornou: False e IsZoomed( oWnd:hWnd ) retornou: True Quote Link to comment Share on other sites More sharing options...
kapiaba Posted October 5, 2020 Report Share Posted October 5, 2020 oWnd:Maximize() - eu acho... Quote Link to comment Share on other sites More sharing options...
mkyx Posted October 5, 2020 Author Report Share Posted October 5, 2020 Kapiaba, não funcionou, função inexistente. Quote Link to comment Share on other sites More sharing options...
ADutheil Posted October 5, 2020 Report Share Posted October 5, 2020 Se tiver minimizada pode usar oWnd:restore(). Veja setfocus( hWnd ) também Quote Link to comment Share on other sites More sharing options...
kapiaba Posted October 5, 2020 Report Share Posted October 5, 2020 Veja na WINDOW.PRG, Maximize() Quote Link to comment Share on other sites More sharing options...
Wellington Vieira Posted October 5, 2020 Report Share Posted October 5, 2020 Tentou, janela:SetFocus() janela:Show() Quote Link to comment Share on other sites More sharing options...
kapiaba Posted October 5, 2020 Report Share Posted October 5, 2020 http://forums.fivetechsupport.com/viewtopic.php?f=6&t=37823&p=226114&hilit=maximize#p226114 Quote Link to comment Share on other sites More sharing options...
giovanyvecchi Posted October 5, 2020 Report Share Posted October 5, 2020 Coloque assim ACTIVATE WINDOW oWndTeste ; ON INIT SetWindowPos(oWndTeste:hWnd,-1) Quote Link to comment Share on other sites More sharing options...
mkyx Posted October 5, 2020 Author Report Share Posted October 5, 2020 Eu mudei de lugar, a rotina que verifica se o programa já está em execução na memória. E por fim deu certo o que eu quero. Aqui no meu computador funcionou, não sei se nos clientes vai funcionar. . . . IF ISEXERUNNING("WINCOM.EXE") var_sys:="WinCom 4.00.69 - www.adentech.com.br - (12) 98854-8476" titj:="Empresário WinCom "+substr(var_sys,8,8)+" - Adentech Automação ::: "+fir_USER IF GETACTIVEWINDOW()=0 hWnd:=FindWindow(0,[titj] ) IF hWnd # 0 BringWindowToTop( hWnd ) ShowWindow(hWnd,3) RETURN Nil ENDIF ENDIF ENDIF . . 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.