Project BusiCalc ----------------- BusiCalc-nnn.Zip Contents: ------------------------- Requires: Project : BusiCalc.xpj Class : BusCalcCls.prg Program : BusiCalc.prg Include : BusiCalc.ch Rates (*): BusiCalc.xch Resource : BusiCalc.arc ResFiles : Resource.zip (All Icons,Bitmaps,Pointers) Misc: Blank_PB-BM.zip contains blank buttons. (In Resource.zip) !ReadMe.txt This file. Creates: (*) If not exist: BusiCalc.xch Extract BusiCalc-nnn.zip contents to a directory. Extract Resource.zip (in BusiCalc-nnn.zip) to the same directory. Compile : PBuild BusiCalc EXE : BusiCalc.exe Requires: (NOT INCLUDED IN ZIPFILE) RunTime: ASRDBC10.DLL SOM.DLL XPPNAT.DLL XPPRT1.DLL XPPUI1.DLL Designed for: 1024x768+ resolution. Is ok at lower, but bigger ... What it is: ----------- A Business Calculator with the normal Operators of Add, Subtract, Multiply and Divide and also includes Reciprocal, Negate, Percent, Square, Square Root, nth. Power, nth. Root, Factorial, PI and Bracketed Operations. Currency conversion for Dollars, Pounds and Euro, Memory store, Import and Export values, Set Decimals, Audit trail and Help file. See the built in Help File for what the calculator can do and how it treats calculations, for example, bracketed operations. You are free to modify this calculator as you wish but please retain the original copyright and disclaimer information found in the headers of Busicalc.prg and BusCalcCls.prg. PNG FILES: Because this program uses PNG files the addresses for these files have to be explicity stated in BusiCalc.arc. To avoid difficulties in compilation all of the resource files have been placed in the same directory as the program code. If you want to place them in your normal resource directory it will be necessary to provide the full path address for the PNG files in BusiCalc.arc. Can you change the currency buttons? -------------------------------------- The answer is yes, and it is relatively simple, it is a text and bitmap change only. For example, if you want to change the Pounds to Pesos and have a Peso-Euro-Dollar calculator all you need to do is search through the BusiCalc.prg and replace every occurance of the word 'Pound' with 'Peso'. Be Careful!! or you will replace Pound in XBP_PP_COMPOUNDNAME. Having done that, just modify or create using the blank buttons supplied, new currency buttons with 'P' replacing the Pound symbol and the two bitmaps for screen display. It is not necessary to make any other changes, other than the exchange rate! But verify that the text in the Help File is correct. Some Code Features: ------------------- 1. Using a moveable Window with no Titlebar. 2. Using Bitmaps, Icons, Statics 3. Using API DLL Functions 4. Handling Mouse and Keyboard keystrokes. 5. Accessing and using the Clipboard. 6. Using a derived Window dialog Class and modal windows. 7. Using FOpen,FWrite,FRead,FCreate etc. (No DBE). 8. Using Arrays in normal and unconventional ways. (e.g. aBmps in help) 9. Preventing a second instance of an Application. 10. Pseudo disable/enable buttons. 11. Minimises and 'Lives' at the Top Titlebar spot. 12. Extensive and pre-emptive error trapping. Blank buttons are included lest you want to 'roll-your-own' flavour. (In BLANK_PB-BM.Zip in Resource.zip in BusiCalc.zip - Font 9.Arial) Note that this calculator only requires a limited number of RT DLLs and they are listed in the header of BusiCalc.prg Even if you do not want a calculator the code provides a good source of 'HowTo' do various things in Xbase++, that was the original challenge. BusiCalc Background. --------------------- Originally written as an excercise in getting to grips with Xbase++ in a GUI/OOP environment, this project is one of three calculators that grew with my understanding and mastering the elements of the subject. It represents a learning curve which all newcomers to Xbase++ more than likely have to climb, and as such, it answers a number of 'How-To' questions that arise from time to time. So if you are a newbie and don't want a calculator, at least it is a reasonable source of how to achieve certain goals in programming with Xbase++, and may be of some assistance in that respect. It does not use a DBE nor does it use any SLEs or Gets and the code is fully commented (my memory is woeful). The Legal bit -------------- Copyright (c) Greg J Doran. 2001-2003 GDO @ eircom.net The code is released under the GNU General Public Licence and is governed by the conditions and protocols setout therein. The code is provided "as is", without warranty of any kind, either expressed, or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality of the software, its use or misuse, modified or otherwise, lies with you, the recipient. For details regarding the GNU General Public Licence visit Phil Ide's Xbase++ FAQ.s at: http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm Happy Programming. Greg Doran, Dublin Ireland. gdo @ eircom.net