Hello,
How to compile for creating console mode application?
Thanks,
Tristan
Compile Console Mode
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Compile Console Mode
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- luisfrancisco62
- Posts: 66
- Joined: Thu Mar 18, 2010 12:16 am
- Location: Colombia
- Contact:
Re: Compile Console Mode
hola
como puedo hacer una aplicacion win y que me salga el modo consola cuando lo pida y no desde el principio?
gracias
como puedo hacer una aplicacion win y que me salga el modo consola cuando lo pida y no desde el principio?
gracias
-
- Posts: 10
- Joined: Sat Dec 18, 2010 2:04 pm
Re: Compile Console Mode
Dear Mr.Rathinagiri,
If possible please provide a demo prg for console mode compilation.
with Regards,
Sankarasubramanian
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Compile Console Mode
This is from \samples\console\hello.prg
And this is the note from HMG reference.
By default two gt drivers are ALWAYS linked: GTGUI (as default) and GTWIN (Windows console). To create console/mixed mode apps. you only must add this line to your main .prg:
REQUEST HB_GT_WIN_DEFAULT
Code: Select all
function Main()
SetMode(25,80)
CLS
@ 10,10 say 'Hello'
alert('Hello')
return nil
By default two gt drivers are ALWAYS linked: GTGUI (as default) and GTWIN (Windows console). To create console/mixed mode apps. you only must add this line to your main .prg:
REQUEST HB_GT_WIN_DEFAULT
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
-
- Posts: 10
- Joined: Sat Dec 18, 2010 2:04 pm
Re: Compile Console Mode
Dear Mr.Rathinagiri#include "hmg.ch"
REQUEST HB_GT_WIN_DEFAULT
Function Main
DEFINE WINDOW Win_1 ;
ROW 0 ;
COL 0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE 'Hello World!' ;
WINDOWTYPE MAIN
DEFINE BUTTON Button_1
ROW 180
COL 160
CAPTION 'Console'
ACTION Test_console()
END BUTTON
END WINDOW
Win_1.Center
Win_1.Activate
Return
Function Test_console
SetMode(25,80)
CLS
@ 10,10 say 'Hello'
alert('Hello')
CLS
quit
Return
Thanks for your immediate response.
I have tried a mixed with this, Am I doing it correct?
with regards,
Sankarasubramanian
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Compile Console Mode
I think you are doing correct.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.