Billing system

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Billing system

Post by Rathinagiri »

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: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Billing system

Post by mol »

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: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Billing system

Post by mol »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Billing system

Post by Rathinagiri »

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: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Billing system

Post by bpd2000 »

Dear Marek

Interest to see Billing system source code
BPD
Convert Dream into Reality through HMG
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Billing system

Post by mol »

I've send you link in private message. So, happy testing!
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Billing system

Post by bpd2000 »

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: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Billing system

Post by mol »

It's my pleasure to help you!
Best regards, Marek
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Billing system

Post by mol »

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

Re: Billing system

Post by mrduck »

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

Francesco
Post Reply