Lib Calc

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Lib Calc

Post by Vanguarda »

Hello my friends,

Well, some time later... I create a calculator that can be added into my aplications with HMG. This calc can return the value of operation and/or return the same value to Clipboard.

For me it is very useful, i hope that be for you too.

The original source, was of Marcos Antonio Gambeta. I get it your sample and did a lot of new little functions, and update this for my needs.

In fisrt file "Calc Lib.RAR" you will find the source for recompile and create your lib. You can add the file "Calc.PRG" in you HMG project, if you not want use a lib for that.

In file "Calc.Rar", have a little project with HMG IDE for show this.

My best regards,

PS: Sorry my bad english
Attachments
Calc Lib.rar
Source code, for create your lib
(3.85 KiB) Downloaded 720 times
Calc.rar
Sample for ShowCalc() function
(584.73 KiB) Downloaded 919 times
Last edited by Vanguarda on Thu Feb 11, 2010 1:59 pm, edited 3 times in total.
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
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: Lib Calc

Post by Rathinagiri »

Super! Thanks Vanguarda.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
danielcrocciari
Posts: 22
Joined: Thu Feb 11, 2010 12:56 am
DBs Used: DBF, MySQL, SQLite
Location: Nagano - Japão
Contact:

Re: Lib Calc

Post by danielcrocciari »

Muito boa esta LIB.
Daniel Crocciari
Brasil - Japan
Projetos HMGLights

HMGLights Site
http://hmglights.wordpress.com/


Canal do YouTube
http://www.youtube.com/hmglights


Céu Azul Tecnologia & Software
http://www.ceuazul.net
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: Lib Calc

Post by swapan »

Great Vanguarda! Thanks for sharing!!
It can turn out to be handy tool for our applications.
BTW, we are having one special thread where we are uploading our UDFs, this routine should be incorporated there also for future reference.

Regards,

Swapan
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Lib Calc

Post by mol »

Super work! You saved a lot of my time! I've got such a calculator in my old dos programs, but no time to move it to windows. Now, it's ready. Best regards,

Marek
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: Lib Calc

Post by Vanguarda »

Hi all,

Thanks all friends for your kind words.

I´m so glad for this lib be usefull for you as was useful for me.

My best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Lib Calc

Post by mustafa »

Hello Vanguarda
The calculator we needed to put in the applications
you report a mistake that I detected in the MC Button pointing
I think this part of source code.
*----------------------------------------------*
//---------------------------------------------------------------------------//
// This function clean the variable used for add value into memory
//---------------------------------------------------------------------------//
Static Function CancelMemo_Click
nMemo := 0
SetProperty("Form1","btnMS","FontBold",.F.)
Calc.ReadHide.SetFocus()
Return Nil
*-----------------------------------------------*
Also if you followed keyboard operations ie without
do it for the mouse all buttons work but want ciando
make no pretense mutiplicación this keyboard is
example 10 * 5 + = 10 when 50 would give
Regards

Hola Vanguarda
La calculadora nos hacia falta para poner en la aplicaciones
te reporto un error que he detectado en el Boton MC que apunta
yo creo a esta parte de codigo fuente.
Tambien si haces operaciones por teclado seguidas es decir sin
hacerlo por el raton todas las teclas funcionan pero ciando quieres
hacer una mutiplicación esta no finciona por teclado es decir
ejemplo 10 * 5 + = 10 cuando tendria de dar 50

Un cordial saludo

Mustafa :oops:
Attachments
error.jpg
error.jpg (64.7 KiB) Viewed 7511 times
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: Lib Calc

Post by Vanguarda »

You all right my friend Mustafa.

It is my mistake, please so kind, make download of the new version in bellow, and recompile the library.

Thanks for the info.

My best regards
Attachments
Calc Lib.rar
(3.85 KiB) Downloaded 598 times
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Lib Calc

Post by mustafa »

Hello friend Vanguarda
I too have made the correction in
this piece from the list changing "Form_1" by
"Calc" and seems to work.

//---------------------------------------------------------------------------//
// This function clean the variable used for add value into memory
//---------------------------------------------------------------------------//
Static Function CancelMemo_Click
nMemo := 0
SetProperty("Calc","btnMS","FontBold",.F.) // Error -- > Form1
Calc.ReadHide.SetFocus()
Return Nil

I have made an example to get the Calculator
simply from a menu.
Regards
*----------------------*
Hola amigo Vanguarda
Yo tambien he efectuado la correccion en
este trozo del listado cambiando "Form_1" por
"Calc" y parece que funciona.
He efectuado un ejemplo para llamar la Calculadora
sencillamente desde un menu.
Un cordial saludo

Mustafa :?: :idea:
Attachments
Calc.zip
(698.75 KiB) Downloaded 587 times
User avatar
Alex Gustow
Posts: 290
Joined: Thu Dec 04, 2008 1:05 pm
Location: Yekaterinburg, Russia
Contact:

Re: Lib Calc

Post by Alex Gustow »

Hi Vanguarda! Thanks for very good and useful thing!
Post Reply