||Size: 90 KB
||Sergey V Natarov
||This package contains a business calculator that can be easily included in your programs.
Business Calculator (rev. 1.0.5 Beta)
"It may be better, than Excel!" %-)
Here's a screenshot of the business calculator in action.
This Calculator was created for Business applications.
This is a simple, but very powerfull tool.
Name of component.. Business Calculator
Internal Revision.. 1.0.5b
Author............. Sergey V. Natarov
Company............SCR, 1998 - 2000
Date of Changes.... 16/02/2000 (February 16, 2000)
Component Type..... Dialog
File Name.......... Calctr.dg
VDF Revision....... VDF 6.0 (Compiled & Tested)
VDF IDE............ IDE 6.00.14
Package Compressed with WinZip 6.3.
Legend: + added,
* Updated the code to VDF6 and VdfQuery 1.3b
+ Added support to invoke the calculator from the toolbar.
+ Graph representation of history list
+ Auto filling of History List with pointed values
+ Convert History List values to numeric values (NUM)
+ Set Memory cells on loading History List
+ User defined buttons for History List (array processing)
+ Simple/Advanced Mode of Calculator,
+ Source code optimization,
+ Input from keyboard,
+ Function "Average" in Array Calculations,
* Calculator's components redesigned,
- Fixed some bugs,
+ Added new bugs :-).
* Support basic operations [+-/*],
* Percent computations [267 -25%],
* Simple/Advanced Mode,
* Math Functions support [Sin,Cos,Tan,Sqrt,1/x,^2,n!,Rnd,Log,Exp,Abs],
* Pi embedded as constant [3,1415926...],
* Two memory cells support [M,M1],
* All ariphmetic calculations with memory cells [+-/*],
* Result window supports both results of operations and
Expressions Entry [ (25+56)-32... ],
* Current Operation Indicator Window,
* History List [History,Save,Load,Calculate,Delete,Import,Sort,Graph,
Min,Max,Ave,Num,Fil,Custom Actions,Buttons define].
At present does not work "Import" button.
- Input value,
- press '%',
- input percent value,
- press '='
(find percent from value)
- Input value,
- press +/-*,
- press %,
- press value of percent,
- press =
(Its looks like 100 - 25% = 75)
All operations with calculator are stored in "History List". So, any
calculated value can be imported to Result Window. Operations like
SIN/COS... are inserted in History List as "Sin(25)=123456", but import
works only with results (123456).
Also, you can use History List as unlimited additional memory cells
for sub totals.
You can save/load your results with History List. All data are stored
in file "calctr.hst". Now you can start your calculations and finish
it later. History file is a usual ASCII file. Strings with '#' sign
responsed as comments. You can create such file and load it in this
If you have some values in memory cells, History List will save it
Set Memory To 123,45
in history file on "Save" action:
Set Memory1 To -321,45
To define Custom buttons for stream array processing, please insert
Set Label_Of_UDB1 To "Button 1 Label"
in History file (Calctr.hst) following lines:
Set Action_Of_UDB1 To "(Expression)"
You can define up to 3 custom buttons (UDB1, UDB2, UDB3).
Also, you can define new labels for standard buttons:
Set Label_Of_NUM To "Label"
Set Label_Of_AZ To "Label"
Set Label_Of_ZA To "Label"
Set Label_Of_MIN To "Label"
Set Label_Of_MAX To "Label"
Set Label_Of_AVE To "Label"
Set Label_Of_FIL To "Label"
Set Label_Of_GRP To "Label"
Set Label_Of_SUM To "Label"
(Expression) must be standard VDF expression like "((21*5)-12)". To
detrminate values from array, please insert "@_" signs at your
If you have in the History List: 1, 2, 3... The Custom Button will work
1: ((1* 1 )-2) = -1
2: ((1* 2 )-2) = 0
3: ((1* 3 )-2) = 1
After pressing of button, the History List will be: -1, 0, 1...
Remember! Empty string and strings with "#" at any point are ignored!
# Our budget for September, 1999
# Stuff's Salary:
# Office Rent:
# End of Budget
You can Add any specific constant in History List. Input any constant
to Result Window, then press "Enter". Inputed value will be stored
in History List like: (-12345,67)=-12345,67. This result you can use
later for calculations.
History List has a second function. You can use this list for array
1. Press 'Clear' button, if History List has some entries,
2. Click on the body of History List to Activate him,
3. Input value and press 'Enter',
4. Input new value and press 'Enter' again,
Press 'SUM' button:
Result Window: .
"Save" - Save current content of History List
"Load" - Load saved content of History List
"Delete" - Delete current row in History List
"Clear" - Delete current content (clear) of History List
"Import" - Import current row to Result Window of Calculator
"Button" - Dialog for defining buttons
"NUM" - Convert all entries of History List to numeric values
"A-Z" - Sorting numeric values for ascending
"Z-A" - Sorting numeric values for descending
"MIN" - Find minimal value of array
"MAX" - Find maximal value of array
"AVE" - Find average value of array
"SUM" - Find a summ of array values
"GRP" - Array graphical representation
"FIL" - Fill array with specific values [from, to, step, f(x)]
- Does not work "Import" Button. I can't determinate the invoking onject. Prior_Level, when chain Calculator from
Any field, has ID=0.
- Incorrectly work "," key, when input from keyboard.
I do not know: what physical key name for "," (like KEY_PLUS).
Enjoy with my job,
I'm wait any (bad or good) comments, ideas, help...
Sergey V. Natarov
- Copy the files Calctr.dg, Calctr.hst, cGraphu.pkg, dfcalcbtn.pkg, Fillhl.dg, udpinp.dg into the order\appsrc folder
Object ProgramWorkspace is a Workspace
- Copy Calctr.bmp to the order\bitmaps folder.
- Open the IDE in the order entry sample workspace
- Select 'Register external component' from the 'Components'-menu
- In the dropdown box select a tool-bar object
- Now click on the prompt button of item package name and select the file dfcalcbtn.pkg. This will throw up a errorbox that complains about an incompatible fileformat that you will not be able to visually edit this package in the IDE. This is perfectly allright, so hit the Ok button on this errorbox.
- Enter 'Calculator toolbar' in the description field and press the <Enter> key. The external component registratioin is complete and now you are ready to include it into the application.
- Open the program 'order entry sample appplication'.
- In the treeview on the lefthand side click on 'Standard toolbar (DfStdBtn.pkg)' and after that select the button 'Change toolbar'. This wil
Set WorkspaceName to CURRENT$WORKSPACE
Set ModuleName to 'Order'
Set HelpName to 'OrdEntry.hlp'
Use Help_Ids.inc Developer should provide this file of help context links.
- We advise you strongly not to use the files vdfgraph.utl and strings.utl that are included in the zipfile. These files are taken from the current version of vdfquery 1.3b2. Instead set up your makepath for the compiler to include the vdfquery files from your vdfquery folder. (In the IDE: File -> Configure -> Workspaces tabpage -> Add the path to top of the listbox on the righthand side.
This will guard you from hard to find problems due to changes in future vdfquery updates.
Calculator Version 1.0.5b (83 kB)