CDF.OCX ActiveX Control (Rev. 1.24) for Win 9x. ============================================================================================ === SCOPE ================================================================================== ============================================================================================ The CDF.OCX ActiveX Control for Win 9x is a Custom Control for Italian Fiscal Code. The Italian Fiscal Code is an unique number associated to each Italian Fiscal Citizen. It is generally used for finance scopes , invoicing and payments (similar to the VAT number for the companies). The Italian Government assigns it. The fiscal code has a fixed format and length and, for error check, the last letter is a CRC character. This control doesn't assign it, but it allows to perform error checks in order to avoid wrong inputs in any program using this code. ============================================================================================ === DISCLAIMS ============================================================================== ============================================================================================ This package may be distributed on the condition that it is distributed in full and unchanged, with all the files and that no fee is charged for such distribution. The OCX may also be distributed with any programs you write that use it on the condition that you do not hold the authors or whoever provided it liable for any liabilities incurred as a result of such programs. In addition, any program using this control may be distributed in compiled form without payment of royalties. The authors provide this software "as is" with no warranty of any kind. We make no other claims with regards to this software including claims that this documentation is accurate. Use this software and documentation at your own risk. ============================================================================================ === USE ==================================================================================== ============================================================================================ Important: ========== You have to load the control in the design environment to have it available in the ToolBox and load it in your application (as any other Custom Control). es. Menu': Project > Components | Controls. Browse (to locate it on your HD) then Check the Box. The CDF.OCX ActiveX Control (Rev. 1.00) for Win 9x has the following: Properties: =========== - CodFiscErrorCode as Integer Returns the Error code (if any) Design: ReadOnly, RunTime: ReadOnly Valid values: from 0 to 5 - CodFiscErrorText as String Returns the description of the Error in the language selected (see CodFiscErrorLanguage) Design: ReadOnly, RunTime: ReadOnly Values: CodFiscErrorCode | CodFiscErrorText 0 = No Error 1 = Code Too Long 2 = Code Too Short 3 = No Capital Letters 4 = Bad CRC 5 = Wrong Letter/Number Sequence (xxxxxx34x567x) (Error 5 tells that a Digit has been found in place of a Letter, or vice-versa) - CodFiscErrorLanguage as Integer Sets the language of the Error Message Design: Read/Write, RunTime: Read/Write Valid Values: 0=Italian (Default), 1=English - CodFiscMaskEdit as String Contains the Input Mask that can be used with the standard MS Control MaskEdBox Design: N/A, RunTime: ReadOnly Value: ??????##?##?###? es. MaskEdBox.Mask = CDF1.CodFiscMaskEdit - CodiceFiscale as string Used to set the value of the Fiscal Code. This value is used by the CodFiscError Method to carry out the check. Design: Read/Write, RunTime: Read/Write Valid Values: any string (to be verified). - CodFiscRegCode as String Used to input the Registration Code to avoid the About form to be displayed the first time the CDF.CodFiscTestError Method is run. Design: Read/Write, RunTime: N/A. > see below. Methods: ======== - Function CodFiscTestError () as Integer Check the Fiscal Code written in the property CodiceFiscale for errors. Returns: 0 if No Error found <> 0 if any error, according to the following: -1 (True) if CodFiscErrorCode from 0 to 4 n ( >0 ) if CodFiscErrorCode = 5 (Wrong Letter/Number Sequence (xxxxxx34x567x)) where n is the position of the first character found in the wrong place es. given ABCDEF67P11F205F the right Fiscal Code, ABCDEFG7P11F205F would give CodFiscError = 7 (position of letter G) with CodFiscErrorCode = 5 Events: ======= None ============================================================================================ === HOW TO PREVENT THE ABOUT FORM TO BE DISPLAYED (Revised) ================================ ============================================================================================ To use CDF.OCX ActiveX Control free from the About form (displayed only one time) you need to register it. Registration is FREE and its only purpose is get some feedback about the use. Add the CDF.OCX Control on a form at Design time. The About form will be diplayed, showing at the bottom the Registration ID label and a 5 letters String. (es. Registration ID: ABCDE) Send by e-mail the 'ABCDE' string at the following address: e-mail: somic@libero.it You will get FREE by return the CodFiscRegCode. Enter this code in the CodFiscRegCode Property textbox of the control at design time. The control will work without prompting the About form in Design and Runtime mode. This is all. ============================================================================================ === REVISION HISTORY ======================================================================= ============================================================================================ ver. 1.00 (Dec-00) First issue ver. 1.24 (Apr-01) Revised registration procedure and revision counter Fell free to send any bug, feedback or suggestion. Regards, C. Somigliana e-mail: somic@libero.it