Page 1 of 1

HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Mon Dec 15, 2008 4:51 am
by dhaine_adp
FMG2PRG is HMG source code converter. FMG2PRG coverts the forms (.fmg) generated by HMG IDE into .prg source file.

FMG2PRG was my wife, Dorrie's, idea. Because I use to tell her that I like HMG because of its simplicity and it can run under linux. The problem is those long define statements that I have to translate manually to @ command syntax. So it's laborious most especially when it contains a complicated form. Her suggestion was, "if you can typed it manually perhaps you can make a converter that automates those things that you are supposed to typed".

Before you use the program, please make sure that you read first the README.TXT so that you'll be aware of the limitation and known bugs.

Source codes are included.

I will re-write the whole program again sometime in the near future but definitely not at this time.

I was a bit ashamed to post the program on it's current state but somehow I believed it can be of help.

Thanks,

Danny del Pilar

P.S.

I can't upload the compiled version of the program because of size limitation. However in source zip file you will find FMG2PRG.HPJ. So load that file and build the exe in order for you to try and use the utility. I don't have any other place to put the whole zip file for a complete download. If you wish to have the zip files in one archive including the binary I'll have it e-mail to you. Just send me an e-mail.

Re: HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Mon Dec 15, 2008 5:44 am
by Rathinagiri
Thank you for sharing. I think it would be of great help for me too. :)

And for your information, the maximum size of attachment has been increased to 2 MB per file.

Re: HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Mon Dec 15, 2008 6:00 am
by Rathinagiri
I think you had missed to upload "dale-aid.ch" :(

Re: HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Mon Dec 15, 2008 6:45 am
by dhaine_adp
Hi Mr. Rathinagiri,

Kya jal he bie (brother)? I'm sorry I forget to mention in the README.TXT to delete the line that says "dale-aid.ch". Please delete this line or comment it out. It has nothing to do with the program. Those are my definitions specific to my local language and for logical values such as: TRUE, FALSE, Success, Failure, CurrentRecord, BlankRecord.

Thank you very much for increasing the upload size.

Dale-Aid.CH only contain these definitions so you can safely delete that line.

//--------- Dbf and record manipulation constant

#define Shared .T.
#define Exclusive .F.
#define ReadOnly .T.
#define ReadWrite .F.
#define Enable .T.
#define Disable .F.
#define BlankRecord .T.
#define CurrentRecord .F.
#define FileNotEmpty ((.NOT. BOF() .AND. .NOT. EOF()) .AND. LASTREC() > 0)
#define FileEmpty (BOF() .OR. EOF())

//--------- Text Message to be used with MsgInfo()

#define DAD_OpenFailed_ {"Unable to Open the File","Open Failure"}


//---------- Logical Tagalog Manifest Constants

#define ISARADO .F.
#define IBUKAS .T.
#define AYOKONGA .F.
#define AYOSLANG .T.
#define HINDIAYOS .F.
#define WALA .F.
#define MAYROON .T.
#define TAMA .T.
#define MALI .F.
#define OO_NAMAN .T.
#define HINDI .F.
#define HINDI_PUWEDE .F.
#define Success .T.
#define Failure .F.

// -------- La DALE-Aid Color HMG Additional Color Defintions

#define SILVER {245,245,245}


//----------- Index Position Marker

#define INDEXMARKER CHR(0149)

#define DALE_AID_NEWLINE CHR(13)+CHR(10)

//----------- Others
#define CodeA ".AID"
#define CodeP ".PLR"

// -------- Microsoft Excel Constants - ALIGNMENT
#define xlLeft -4131
#define xlRight -4152
#define xlCenter -4108
#define xlWorkbookNormal -4143

// -------- Microsoft Excel Constants - BORDERS
#define xlAutomatic -4105
#define xlColorIndexNone -4142
#define xlUnderlineStyleNone -4142
#define xlUnderlineStyleDouble -4119
#define xlUnderlineStyleSingle 2
#define xlDiagonalDown 5
#define xlDiagonalUp 6
#define xlEdgeLeft 7
#define xlEdgeTop 8
#define xlEdgeBottom 9
#define xlEdgeRight 10
#define xlInsideVertical 11
#define xlContinuous 1
#define xlThin 2
#define xlThick 4
#define xlHairline 1
#define xlMedium -4138


Anyway, I re-upload the files in 1 zip files.

Re: HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Mon Dec 15, 2008 10:06 am
by esgici
dhaine_adp wrote:FMG2PRG is HMG source code converter. FMG2PRG converts the forms (.fmg) generated by HMG IDE into .prg source file.
...
Source codes are included.
Hi Danny

Good work, nice result :)

Many thanks for sharing.

Regards

--

esgici

Re: HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Mon Dec 15, 2008 1:41 pm
by luisvasquezcl
Hi,
Thanks you for this release.
Regards,
Luis Vasquez.

Re: HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Tue Dec 16, 2008 1:46 am
by jortega
Hi Danny
Thanks you for good work and thanks for sharing.
Regards
JOrtega

Re: HMG-IDE Form File to PRG Source Code (FMG2PRG) Converter

Posted: Sat Dec 20, 2008 12:50 pm
by dhaine_adp
I have a clarrification to be made:

For recompiling the FMG2PRG source code, that means to make an exe file out from the source code you would need "dale-aid.ch". The contents of these manifest is already posted on the placed from which you can download the FMG2PRG.ZIP

The reason why you would need the definition is I believed, I used TRUE instead of .T. or FALSE instead of .F. in source code . Please copy the definitions of the manifest constant and cut & paste and save as dale-aid.ch

However, whenever you convert an .fmg to .prg by using FMG2PRG and "dale-aid.ch" is included in the converted file, that means you can delete that #define statement. ( This is what I mean on my earlier posting.) Sorry for this.

Danny