menu program

Utilities like DBU, Make, IDE written in HMG/ used to create HMG based applications

Moderator: Rathinagiri

Post Reply
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

menu program

Post by dragancesu »

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
Attachments
source.zip
(40.98 KiB) Downloaded 428 times
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: menu program

Post by dragancesu »

Demo data for menu
Attachments
menu.zip
(731 Bytes) Downloaded 367 times
User avatar
tonton2
Posts: 444
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Contact:

Re: menu program

Post by tonton2 »

thank's,
I'am going to try it
L'Algerie vous salut
Y.TABET
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: menu program

Post by serge_girard »

Thx for sharing!

Serge
There's nothing you can do that can't be done...
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: menu program

Post by mustafa »

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 :idea:
*------------------------------------------------------------------------------------------------------------------*
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 :idea:
Attachments
mnuGEN.zip
(1.47 KiB) Downloaded 346 times
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

menu program

Post by Pablo César »

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:

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
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. ;)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: menu program

Post by dragancesu »

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
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: menu program

Post by dragancesu »

I fix/update the program and made a better example

source.zip the program
manu.zip example
Attachments
menu.zip
(22.81 KiB) Downloaded 432 times
source.zip
(41.23 KiB) Downloaded 432 times
Post Reply