Dear Roberto Lopez and other comrades.
I saw some examples of this feat that many say is not possible and I myself have tested a few.
I'm talking about an application (program) 100% clipper converted 16-bit / 32-bit migrated to harbor, using HMG 3.0.xx; running at 99% in
MODE CONSOLE and call new routines in GRAPHIC MODE.
It would be something like this:
The traditional application, the confirmation messages, error, information, etc., are in graphic windows and new menus / entries also in graphics mode.
Incidentally, my application that is 100% in graphical mode, already use one errosys screen already in graphical mode and completely redesigned for myself (with the help of staff
http://www.pctoledo.com.br/forum) and also my messages information and interaction with the end user, are already in graphics mode.
I wonder if anyone knows how to make and set up a console mode application properly perform graphic and vice versa mode.
I tried two options that have partially right, but it is still not what you'd really correct. See (m) codes:
* 1st -
CONSOLE MODE application performs a routine in GRAPHIC mode but in the end, when you click to close this' graphic module "it does not return to the CONSOLE module that called and simply terminates the application.
This example is present in PCTOLEDO forum in link:
http://www.pctoledo.com.br/forum/viewto ... 45&t=16153
* 2nd - ever this second example, I learned to make an initial simulation graphics so that returns to the CONSOLE MODE and so deceive processing and performs much so as CONSOLE GRAPHIC MODE and vice versa.
When you close a window or other it does not end the application. It will only be closed if I close the module (program) main. Here does not mean it's the MAIN (), but rather the main module that I have determined for my final application.
And this example, until last week was running smoothly until the moment added a SPLASH screen I do not know where I went wrong they're all wrong.
Well, this example, I must post my original source code for everyone to see, understand, and to make the necessary changes to make it work smoothly. See (m):
Code: Select all
/*
TELA DE INICIALIZAÇÃO PRIMÁRIA - MODO GRÁFICO
o código abaixo, pode ser livremente copiado, distribuído, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: INICIA_MODO_GRÁFICO
objetivo: para abrir o modo console essa é inicilizada com a tela principal (modo gráfico) para dar lugar ao MODO CONSOLE, que é a base principal do sistema.
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
*/
FUNCTION MAIN ()
DEFINE WINDOW F1 ;
AT 0,0 ;
WIDTH 100 HEIGHT 100 ;
TITLE 'SiCCoSV - SISTEMA DE ORDENS DE SERVIÇO VEICULAR' ;
MAIN ;
FONT 'Arial' SIZE 10 ;
ON INIT INICIA_CONSOLE()
END WINDOW
CENTER WINDOW F1
ACTIVATE WINDOW F1
RETURN // MAIN ()
/*
TELA DE INICIALIZAÇÃO PRIMÁRIA - MODO GRÁFICO
o código acima, pode ser livremente copiado, distribuido, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: INICIA_MODO_GRÁFICO
objetivo: para abrir o modo console essa é inicilizada com a tela principal (modo gráfico) para dar lugar ao MODO CONSOLE, que é a base principal do sistema.
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
*/
/*
TELA DE INICIALIZAÇÃO SECUNDÁRIA - MODO CONSOLE
o código abaixo, pode ser livremente copiado, distribuido, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: INICIA_MODO_CONSOLE
objetivo: após abrir o modo gráfico, essa função/procedure minimiza a tela principal (modo gráfico) para dar lugar ao MODO CONSOLE, que é a base principal do sistema.
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
*/
FUNCTION INICIA_CONSOLE() // MINIMIZA MODO GRÁFICO
MINIMIZE WINDOW F1
F1.HIDE
splashwin() // chama a tela de SPLASH enquanto o sistema é carregado para a memória
PCI10000() // CHAMA O ANTIGO PCI1000.PRG QUE AINDA ESTÁ EM MODO CONSOLE, MAS, A TELA DE LOGIN AGORA ESTÁ SEPARADA (JÁ EM MODO GRÁFICO) 1/6/15w
F1.release
RETURN // INICIA_CONSOLE()
***************************
/*
TELA DE INICIALIZAÇÃO SECUNDÁRIA - MODO CONSOLE
o código acima, pode ser livremente copiado, distribuido, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: INICIA_MODO_CONSOLE
objetivo: após abrir o modo gráfico, essa função/procedure minimiza a tela principal (modo gráfico) para dar lugar ao MODO CONSOLE, que é a base principal do sistema.
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
*/
/*
TELA DE SPLASH
o código abaixo, pode ser livremente copiado, distribuido, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: SPLASH WINDOW
objetivo: enquanto é realizado o carregamento de todos os módulos de seu aplicativo para a RAM a tela de splash é mantida
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
*/
procedure splashwin ()
DEFINE WINDOW Form_Splash ;
AT 0,0 ;
WIDTH 500 HEIGHT 200 ;
TITLE '';
TOPMOST NOCAPTION ;
ON INIT SplashDelay()
// ON INIT SplashDelay() ;
// ON RELEASE Form_Main.Maximize()
@ 10,10 LABEL Label_1 ;
WIDTH 500 HEIGHT 40 ;
VALUE 'SiCCoSV v4.01 - Sistema Ordem Serviço' ;
FONT 'Arial' SIZE 20
@ 70,10 LABEL Label_2 ;
WIDTH 500 HEIGHT 40 ;
VALUE 'Carregando o Sistema... aguarde um instante por favor!' ;
FONT 'Courier New' SIZE 12
END WINDOW
CENTER WINDOW Form_Splash
ACTIVATE WINDOW Form_Splash
Return Nil
/*
TELA DE SPLASH
o código acima, pode ser livremente copiado, distribuído, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: SPLASH WINDOW
objetivo: enquanto é realizado o carregamento de todos os módulos de seu aplicativo para a RAM a tela de splash é mantida
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
*/
/*
TEMPORIZADOR DA TELA DE SPLASH
o código abaixo, pode ser livremente copiado, distribuido, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: SPLASHDELAY
objetivo: enquanto é realizado o carregamento de todos os módulos de seu aplicativo para a RAM a tela de splash é mantida
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
*/
Procedure SplashDelay()
Local iTime
iTime := Seconds()
Do While Seconds() - iTime < 5
EndDo
Form_Splash.Release
Return
/*
o código acima, pode ser livremente copiado, distribuido, compilado, e até usado para fins comerciais, desde que citem o autor e seus contatos.
função/procedure: SPLASHDELAY
objetivo: enquanto é realizado o carregamento de todos os módulos de seu aplicativo para a RAM a tela de splash é mantida
autor: W de Paula / microvolution@hotmail.com / MVinfo Sistemas & Automação / www.mvinfo.wmx.net.br
Os infratores, serão punidos com a mais rigorosa punição das leis e tratados internacionais de direitos autorais
TEMPORIZADOR DA TELA DE SPLASH
*/
So if anyone has more ideas to improve the functionality of these functions / procedures, feel free to contribute our dream.
Sincerely,
MICROVOLUTION / W Paula
All rights reserved
http://www.mvinfo.wmx.net.br
Have you read the Bible today? Jesus is coming back !!! - John 14: 1-6