Lib Calc

HMG Samples and Enhancements

Moderator: Rathinagiri

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

Lib Calc

Post by Vanguarda » Wed Feb 10, 2010 11:12 pm

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 467 times
Calc.rar
Sample for ShowCalc() function
(584.73 KiB) Downloaded 663 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: 5210
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 155 times
Been thanked: 144 times
Contact:

Post by Rathinagiri » Thu Feb 11, 2010 1:54 am

Super! Thanks Vanguarda.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
danielcrocciari
Posts: 16
Joined: Thu Feb 11, 2010 12:56 am
Location: Catanduva - São Paulo - Brasil
Contact:

Post by danielcrocciari » Thu Feb 11, 2010 2:32 am

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.ceuazultecnologia.com.br

User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Post by swapan » Thu Feb 11, 2010 6:17 am

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: 2977
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 158 times
Been thanked: 85 times
Contact:

Post by mol » Thu Feb 11, 2010 6:26 am

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
Been thanked: 1 time
Contact:

Post by Vanguarda » Thu Feb 11, 2010 12:26 pm

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: 652
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 68 times

Post by mustafa » Thu Feb 11, 2010 1:02 pm

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 3253 times

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

Post by Vanguarda » Thu Feb 11, 2010 1:51 pm

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 373 times
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/

User avatar
mustafa
Posts: 652
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 68 times

Post by mustafa » Thu Feb 11, 2010 3:41 pm

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 372 times

User avatar
Alex Gustow
Posts: 290
Joined: Thu Dec 04, 2008 1:05 pm
Location: Yekaterinburg, Russia
Contact:

Post by Alex Gustow » Thu Feb 11, 2010 5:32 pm

Hi Vanguarda! Thanks for very good and useful thing!

Post Reply