Hello everyone
This is a great forum and a great help and who want to learn HMG, I'm one of them
I think we need to show and present a program that can be useful to others
I wrote Clipper programs and a problem to enable the user to easily start up, I see this as a solution
Use: Start Amenu, edit menu that you want to have on the menu, start Generate and receive mainmenu.prg / hbp / rc
Just build mainmenu.hbp and have menu for your programs
Company logo and icon put whatever you like, you have demo pictures now
menu program
Moderator: Rathinagiri
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
menu program
- Attachments
-
- source.zip
- (40.98 KiB) Downloaded 429 times
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: menu program
Hola amigos:
Felicidades por el programa, es muy interesante , me he permitido modificar su codigo fuente
del fichero "mnuGEN.PRG" para que al generar el nuevo codigo fuente automaticamente
se genere con distinto nombre, le añado la fecha y la hora al nombre del nuevo programa
ejemplo:
main_22122013_1326.hbp
main_22122013_1326.prg
main_22122013_1326.rc
Los nuevos ficheros entran en Carpeta ------- > "New_Program" que tiene que crear donde está su programa "amenu.exe"
espero que les pueda servir mi aportación
un saludo
Mustafa
*------------------------------------------------------------------------------------------------------------------*
Hello friends:
Congratulations on the program, is very interesting, I've allowed to modify its source code
File "mnuGEN.PRG" for generating new source code automatically
is generated with a different name, I add the date and time to the name of the new program
eg
main_22122013_1326.hbp
main_22122013_1326.prg
main_22122013_1326.rc
New file enter folder -------> New_Program you have to create as your program "amenu.exe"
I hope I can serve you my contribution
a greeting
Mustafa
Felicidades por el programa, es muy interesante , me he permitido modificar su codigo fuente
del fichero "mnuGEN.PRG" para que al generar el nuevo codigo fuente automaticamente
se genere con distinto nombre, le añado la fecha y la hora al nombre del nuevo programa
ejemplo:
main_22122013_1326.hbp
main_22122013_1326.prg
main_22122013_1326.rc
Los nuevos ficheros entran en Carpeta ------- > "New_Program" que tiene que crear donde está su programa "amenu.exe"
espero que les pueda servir mi aportación
un saludo
Mustafa
*------------------------------------------------------------------------------------------------------------------*
Hello friends:
Congratulations on the program, is very interesting, I've allowed to modify its source code
File "mnuGEN.PRG" for generating new source code automatically
is generated with a different name, I add the date and time to the name of the new program
eg
main_22122013_1326.hbp
main_22122013_1326.prg
main_22122013_1326.rc
New file enter folder -------> New_Program you have to create as your program "amenu.exe"
I hope I can serve you my contribution
a greeting
Mustafa
- Attachments
-
- mnuGEN.zip
- (1.47 KiB) Downloaded 347 times
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
menu program
Nice examples. Thank you Dragan for sharing and Mustafa for your new changes.
To Mustafa, I would suggest to you, to make generate files with names sequencially. You can count with this routine, if you considere for better use:
I also suggest Mustafa, you garantee the creation os sub-folder New_Program before crwation with DirMake().
And I would use FOPEN/FWRITE functions to write in the file in place of set device to printer and set printer to.
Another great idea is t implement for building prg and excuting after generating. I made with this:
MsgInfo ( "Generate "+GetCurrentFolder()+"\New_Program\"+newprg+" !")
hb_run("C:\hmg.3.2\Build "+GetCurrentFolder()+"\New_Program\"+newprg)
I hope to contribute with improvements.
To Mustafa, I would suggest to you, to make generate files with names sequencially. You can count with this routine, if you considere for better use:
Code: Select all
Function Next_PRG()
Local aDir:=cPath+"\main_*.prg")
Local cRet:="main_", cNum:="", nNum:=0, I, nLen:=Len(aDir)
For I=1 To nLen
cNum:=HB_USubStr(aDir[I,1],HB_UAt(aDir[I,1],cRet)+1,3)
If Val(cNum)+1>999
nNum:=0
Endif
Next
cRet:=cRet+AllTrim(Str(nNum+1))+".prg"
Return cRet
And I would use FOPEN/FWRITE functions to write in the file in place of set device to printer and set printer to.
Another great idea is t implement for building prg and excuting after generating. I made with this:
MsgInfo ( "Generate "+GetCurrentFolder()+"\New_Program\"+newprg+" !")
hb_run("C:\hmg.3.2\Build "+GetCurrentFolder()+"\New_Program\"+newprg)
I hope to contribute with improvements.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: menu program
Thanks for the suggestions, but my idea is a little different, I guess I did not give a good example, not all programs are in the same folder
Comes a new year and a new (old) applications, they probably have a few, financial and (fin), department (Rob), payroll (salaries), taxes (POR), statistics (BI), etc.
The organization is the folder 2013 subfolders FIN, ROB, PLA, POR, BI ... same as for the previous year and the previous
And then mainmenu from one place to run these applications
Comes a new year and a new (old) applications, they probably have a few, financial and (fin), department (Rob), payroll (salaries), taxes (POR), statistics (BI), etc.
The organization is the folder 2013 subfolders FIN, ROB, PLA, POR, BI ... same as for the previous year and the previous
And then mainmenu from one place to run these applications
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: menu program
I fix/update the program and made a better example
source.zip the program
manu.zip example
source.zip the program
manu.zip example
- Attachments
-
- menu.zip
- (22.81 KiB) Downloaded 433 times
-
- source.zip
- (41.23 KiB) Downloaded 433 times