Billing system

HMG Samples and Enhancements

Moderator: Rathinagiri

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

Re: Billing system

Post by Rathinagiri » Mon Oct 10, 2011 4:06 pm

Yes. This I have used in many projects. If a grid is focused and an user presses DEL key, I will delete the row. However, if he presses DEL key outside the grid, the normal operation will continue.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

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

Post by mol » Mon Oct 10, 2011 5:36 pm

rathinagiri wrote:I too get this problem Esgici.

But I have avoided by using like this.

Code: Select all

public lFocused := .f.

define window blah blah

   define grid blah
      row 10
      col 10
      on gotfocus lFocused := .t.
      on lostfocus lFocused := .f.
   end grid
   on key DOWN action doarrowaction()
end window

function doarrowaction
if lFocused



endif
return nil
By this way, we can restrict the key usage to a single control.
very smart and interesting idea !
I'll try to implement it... It's easy because all buttons are defined in the loop, so few lines of code will be enough to realise it.
THX Rathi!

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

Post by mol » Mon Oct 10, 2011 6:19 pm

I've modified code, but ... Main menu doesn't take focus from other controls ... :(
So, this idea is not for use...
Maybe I'll find something different.
Best regards, Marek

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

Post by Rathinagiri » Mon Oct 10, 2011 6:52 pm

I will try a small sample Marek.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
bpd2000
Posts: 1088
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 197 times
Been thanked: 102 times

Post by bpd2000 » Sat Oct 22, 2011 1:22 pm

Dear Marek

Interest to see Billing system source code
BPD
Convert Dream into Reality through HMG

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

Post by mol » Mon Oct 24, 2011 6:12 am

I've send you link in private message. So, happy testing!

User avatar
bpd2000
Posts: 1088
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 197 times
Been thanked: 102 times

Post by bpd2000 » Tue Oct 25, 2011 5:26 am

Dear Marek

No word for your Excellant code
It is not code but, is BIBLE for me to learn somthing
Thank you for sharing your hard work
BPD
Convert Dream into Reality through HMG

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

Post by mol » Tue Oct 25, 2011 7:28 am

It's my pleasure to help you!
Best regards, Marek

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

Post by mol » Tue Nov 08, 2011 1:37 pm

I've made some changes in function displaying table of invoices. It's incredible, how relations can slow down the program in the network environment:
You can watch old version with relations and filter:
http://www.molsystemy.pl/hmg/1-stara-wersja.avi

and quick new version:
http://www.molsystemy.pl/hmg/2-nowa-wersja.avi

mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Post by mrduck » Tue Nov 08, 2011 1:52 pm

Hi Malek,
it would be nice to know which are the changes you did in the code :-)

Francesco

Post Reply