How To Help Clipper & Foxpro Users Catch Harbour-HMG ASAP!

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

User avatar
Clip2Mania
Posts: 99
Joined: Fri Jun 13, 2014 7:16 am
Location: Belgium
Been thanked: 1 time

Re: How To Help Clipper & Foxpro Users Catch Harbour-HMG ASA

Post by Clip2Mania » Tue Sep 16, 2014 11:46 am

Hi,
use:
#ifdef __XHARBOUR__
oSheet := oExcel:Get( "ActiveSheet" )
#ELSE
oSheet := oExcel:ActiveSheet()
#ENDIF
Ah, didn't know that one. I saw from other code that there was a difference. ;)
You may alternatively include library xHB.
Can you please tell me how to do that (in some .hbc file)?

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Tue Sep 16, 2014 1:37 pm

Many thanks to Rathinagiri, Jayadevu, Clip2Mania

I'll exercise with what you showed to me. And I'll be back soon.

This function I need to provide reports on worksheet version for sum guys ( in my office) who need them to work on. And to make sure that I can present valuable data from DBF to XLS and vice-versa.

Next question:

I've been using HMG-IDE in recent days to create form-template (file *.fmg) to generate screen input design, instead of working on traditional coding job. To my supprise, so many unnecessary lines of codes found, written down automatically within the *.fmg file. What I consider unnecessary is: lines of codes consisting of Window-properties which are set their values by default to NIL.

Is there any option to avoid that (whenever possible to make them disppear) ? Once more, many thanks.

Regards,
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
mol
Posts: 3253
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 235 times
Been thanked: 132 times
Contact:

Post by mol » Tue Sep 16, 2014 4:02 pm

You've really don't need to watch .fmg files.
Besides, a definition of control in .fmg file is complete and contains all features of described control.

User avatar
esgici
Posts: 4519
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 392 times
Been thanked: 112 times
Contact:

Post by esgici » Tue Sep 16, 2014 4:26 pm

Agil wrote:Is there any option to avoid that (whenever possible to make them disappear) ?
mol wrote:You've really don't need to watch .fmg files.
Besides, a definition of control in .fmg file is complete and contains all features of described control.
+1

@Agil :
Really, there isn't any reason to avoid "defaulted" statements produced by IDE or else; unless using 360 KB floppies :lol:

In contrast, they are useful to see details in the syntax, I think.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D

User avatar
dragancesu
Posts: 722
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 24 times
Been thanked: 151 times

Post by dragancesu » Wed Sep 17, 2014 9:35 am

I think you're a bit crashed, if it's any consolation I've been there last year, HMG is excellent but there are many possibilities that as a beginner I met so I wandered around and asked all sorts of things

Transferring data from DBF to KLS it's easy

Solution to already have, look at \HB30\contrib\hbwin\tests\testole.prg

Clipper had no tools for application development and has been used, it's a done HMG-IDE and yet many are not happy, honestly I did not either. Working with one form is not exactly the happiest, I expected at least a template

HMG-IDE is an excellent program, try a little more and see what helps you, and to find his way to what he is missing

I am beginning to be in a dilemma whether to use FMG or PRG format of the program, I decided to PRG and made a tool that helps me, looking HMGCASE on the forum used to create forms, reports, based on the structure dbf who have it, will make me and facilitate something more

But HMG-IDE support and has developed, now thinking of the right generator for FMG version of the program after it is easier to touch up with HMG-IDE than the editor by code

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Mon Sep 22, 2014 4:28 am

Many thanks for advices by Mol, Esgicy, Dragencesu

1) Basically I agree with you all, although as beginner to HMG, I have alot of questions in my mind which need explanation.

2) Sorry for my late reply.

3) Permit me to show you a screenshoot of my first project (office business application) in my office developed with HMG.3.3.1. This portofolio looks Very nice and amazing to me and to my collegues. What I've done is to collect all samples available and then make them work in one apps-system. I love this!

Cheers.... SALAM HANGAT from Jakarta.
Attachments
Kemstudio Project 2014.jpg
My first project with HMG.3.3.1
Kemstudio Project 2014.jpg (300.79 KiB) Viewed 2619 times
Kemstudio Project 2014.jpg
Kemstudio Project 2014.jpg (300.79 KiB) Viewed 2619 times
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Mon Sep 22, 2014 4:30 am

Sorry, The above image should have been one uploaded, not two...

Admin, pls remove the second one. Tks
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Rathinagiri
Posts: 5266
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 171 times
Been thanked: 173 times
Contact:

Post by Rathinagiri » Mon Sep 22, 2014 6:59 am

You can remove by yourself by editing the post Agil. If you can't do that, please let me know, I will do.

By the way, the software looks just great! What does this software do? Link all the programs or what?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines
Been thanked: 2 times

Post by dhaine_adp » Mon Sep 22, 2014 7:54 am

Hi Agil,

Here's a tutorial for HMG written by Giovanni (HMG Forum Member):

http://www.elektrosoft.it/tutorials/hmg/hmg.asp

And the best way to learn HMG is to write your code from it. HMG (Official at HMG Forum) and HMG Extended (http://www.hmgextended.com" onclick="window.open(this.href);return false;), which is fork out of HMG Official and both use Harbour Compiler. Both distribution contains samples from basic to advance. You can use those samples as basis to get started. You may also consider downloading the Harbour nightly build and browse the codes. The link is:
http://harbour.github.io/ The manuals at elektrosoft.

There are also other variants as well apart from HMG Official and HMG Extended like HwGUI (from which HMG Official has been forked out), ooHG and HBQt.

Basically there's 20% to 30% difference between Clipper code and HMG code. Those are the codes associated with events and control objects actions. The rest remains Clipper code except the control flow (logic).

I basically used the PRG format of form layout and sometimes used the FMG forms. I tucked them inside a zip file and expand to a temporary folder when the program starts and erased them when the program terminates. Well, I did that to hide it from curious end users who in one way or the other finds it amusing to mess with the program and always come-up with the famous innocent phrase, "I don't know, a while ago its working fine".

Good luck,

Danny
Regards,

Danny
Manila, Philippines

User avatar
esgici
Posts: 4519
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 392 times
Been thanked: 112 times
Contact:

Post by esgici » Mon Sep 22, 2014 10:18 am

Agil Abdullah wrote:...Permit me to show you a screenshoot of my first project (office business application) in my office developed with HMG.3.3.1. This portofolio looks Very nice and amazing to me and to my collegues. What I've done is to collect all samples available and then make them work in one apps-system. I love this!

Cheers.... SALAM HANGAT from Jakarta.
Salam Abdullah

Your project has a perfect UI; congrats to your performance (again) such a short time :o 8-)

And a bigger congrats, if works all buttons ( in toolbar and sidebar ) :)

Please continue to work and notify us :)

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D

Post Reply