HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Moderator: Rathinagiri

Post Reply
MICROVOLUTION
Posts: 146
Joined: Sat May 30, 2015 5:15 am

HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by MICROVOLUTION »

Dear Good afternoon!
Maybe it's something very simple, but for us still a little confused.

In version 3.0.35 of HMG in the CONFIGURATION / CONFIGURAÇÃO panel is very simple this console mode issue because we just simply put the .T option. after the inscription:
CONSOLE MODE .t.

But in version 3.0.46 everything that is there can be erased, then, does anyone know properly teach us the way to set this version both for how to console graphics mode, and also other configuration options and their meanings and also the differences in version 3.0.35? see, and answer if you can (in):
Version 3.0.35:
Expand visualizacao

Code: Select all

1 include paths:
2 Libraty paths:
3 additional libs:
4 mode console: .t. - This is easy
5 multi-thread: - what is this thing?
6 copy target to: - this also or have no idea

Version 3.0.46:

Code: Select all

Expand visualizacao
1 include paths =
2 Libraty paths =
3 libs =
4 = gt - what is this thing?
5 mt = - what is this thing?
6 = instpaths - this also still or have no idea

Thanks to everyone who can help!
Much Obliged,
MICROVOLUTION / W Paula

"Unless the Lord builds the house, they labor in vain that build it!" Have you ever read the Bible today?
MICROVOLUTION
Posts: 146
Joined: Sat May 30, 2015 5:15 am

HMG 3.0.xx - CONSOLE MODE and MODE GRAPHIC together in the same application

Post by MICROVOLUTION »

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
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: HMG 3.0.xx - CONSOLE MODE and MODE GRAPHIC together in the same application

Post by EduardoLuis »

Hi W Paula:

First, i'm not friend to mix both modes.-
IMHO you can solve your problem dividing your app in different apps (exes).-
Define your principal app in Graphic mode or Console mode; from this one call other's (of course anyone (Graphic or Console mode).- One's each app ends, return control to principal, and finally end Principal app.-
Although i think it's inconvenient mixing both modes.-
As you can make everything using Graphic mode, why use console ?
If you take some time, you can develope your own confirmation, information, and error messages, giving your app and uniforms look with independence of Win default messages.- I do this on my appe, and no mather which OS have's customer (XP, Win7, 8, etc.), all messages are indentically.-
In my experience, i develope all my app using the method of a Principal One and lots of secondary app (exe); the advantage is, when must upgrade only a parte of all system, you must compile one appe and not principal appe; so you don't waste time and you cand send only the upgraded file to your customer and not all the big system.-
Hopping this could help you.
With regards.
Eduardo
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by Pablo César »

Eu concordo com o que disse Eduardo em fazer executáveis separados apesar de não ser a favor de juntar os dois ambientes que são completamente diferentes.
Fazer isto irá demandar muito trabalho, porque precisa ter o handle de cada seção aberta e recuperá-la.
Claro que estando em ambientes diferentes fica mais complicado.

Gostaria Paula que não poste as suas dúvidas nesta seção, pois destina-se basicamente a tutorial ou dicas sobre o uso HMG.
As suas dúvidas pode ser em outras seções do fórum e de preferência por favor não abrir tópicos inerentes ao mesmo assunto. Assim mantemos o fórum organizado.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
MICROVOLUTION
Posts: 146
Joined: Sat May 30, 2015 5:15 am

Re: HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by MICROVOLUTION »

right Eduardo did not understand well, but I have done some tests and CONSOLE MODE to call a .EXE in GRAPHIC MODE and end this chart so the application does not return to the main EXE.
So how can you be in accordance with your proposal?
thankful!
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by esgici »

Build note from HMG Help
Build note from HMG Help
HMG_Build.jpg (223.08 KiB) Viewed 5867 times
Viva INTERNATIONAL HMG :D
MICROVOLUTION
Posts: 146
Joined: Sat May 30, 2015 5:15 am

Re: HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by MICROVOLUTION »

portuguese:
caraca.... vc esgici é o "miozin q tá teno" (não sei dizer isso em inglês, pois é um termo em português ou frase pra dizer que você é o máximo!!!). Muito obrigado, pois você me ajudou a matar dois coelhos com apenas um tiro. Perguntei apenas uma coisa, e as duas foram resolvidas. Os meus parabéns a você, a todos, e aos mantenedores deste e de outros fóruns que tanto contribuem para conosco - clippeiros apaixonados!

vlw pessoal!
Breve Jesus Voltará! parece distante ou que não mais virá pois se passaram 2000 anos, mas, "as misericórdias do Senhor são a causa de não sermos destruídos" e são elas que fazem Ele delongar ainda mais para alcançar mais pessoas para a Vida Eterna - BS João 3:16; 5:24, 14:1-6; Atos 17:30-31

english:
whoa .... you esgici is the "q miozin' q tá teno" (I can not say it in English because it is a Portuguese term or phrase to say that you are the most !!!). Thank you because you helped me to kill two birds with one shot. I asked only one thing, and the two have been resolved. My congratulations to you, everyone, and maintainers of this and other forums that do so much for us - passionate clippers!

Personal vlw!
Quick Jesus will return! seems distant or who no longer come because 2000 years have passed, but "the Lord's mercies are the cause of not being destroyed" and they are they which do delongar He further to reach more people for Eternal life - BS John 3:16; 5:24, 14: 1-6; Acts 17: 30-31
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by esgici »

MICROVOLUTION wrote: whoa .... you esgici is the "q miozin' q tá teno" (I can not say it in English because it is a Portuguese term or phrase to say that you are the most !!!). Thank you because you helped me to kill two birds with one shot. I asked only one thing, and the two have been resolved. My congratulations to you, everyone, and maintainers of this and other forums that do so much for us - passionate clippers!
You are welcome :)

and thanks to your nice words :oops:

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by danielmaximiliano »

Hola a Todos :
Actualmente ese texto es diferente en la Referencia de HMG 3.4.0 pero el nuevo esta mas optimizado para una facil compresion...

gracias a todos por ese granito de arena...

Hi Everyone:
Currently the text is different in Reference HMG 3.4.0 but the new is more optimized for easy compression ...

thank you all for that bit
windos.jpg
windos.jpg (37.3 KiB) Viewed 5846 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.0.46 - CORRECTLY SET MODE CONSOLE

Post by Pablo César »

danielmaximiliano wrote:Hi Everyone:
Currently the text is different in Reference HMG 3.4.0 but the new is more optimized for easy compression
Good remembered Daniel !!

But the main point is you have a appointed the correct DOC even for HMG 3.0.46 and higher versions. Because all those parameters were not valid for long time and hmgdoc where corrected by this main reason.

RIGHT:
Image

WRONG:
Image

You can read this topic for long time:
viewtopic.php?f=8&t=3997&p=37448#p37448

Thank Daniel for advising ! :D
( Y disculpame que te escriba en inglés :lol: )

Un gran abrazo hermano.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply