Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Barcode from Codeplex
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01499507
Message ID:
01499519
Views:
72
>I executed the class as you said, but mismach error at gpimage2.prg
>
>CASE num < 0
>
>
>
>
>FUNCTION Int2Float(num) && By Anatoly Mogylevets - found in www.fox.wikis.com
>  * converts FoxPro numeric to 32-bit float form
>  #DEFINE REAL_BIAS 127
>  #DEFINE REAL_MANTISSA_SIZE 23
>  #DEFINE REAL_NEGATIVE 0x80000000
>  #DEFINE EXPONENT_MASK 0x7F800000
>  #DEFINE MANTISSA_MASK 0x7FFFFF
>  LOCAL sgn, exponent, mantissa
>  DO CASE
>    CASE num < 0   ****************************************************  OPERATOR TYPE MISMATCH
>      sgn = REAL_NEGATIVE
>      num = -num
>    CASE num > 0
>      sgn = 0
>    OTHERWISE
>      RETURN 0
>  ENDCASE
>
>
Run this example:
SET PROCEDURE TO LOCFILE("Source\FoxBarcode.prg"), LOCFILE("Source\gpImage2.prg") ADDITIVE

*--- Create FoxBarcode Object
LOCAL loFbc
loFbc = CREATEOBJECT("FoxBarcode")

*-- Set the properties
WITH loFbc
  .cImageType = "BMP"
  .nBarcodeType = 110 && Code 128
  .cSet128 = "C" && Set 128 C
  .nImageHeight = 100
  .nFactor = 2
ENDWITH

*-- Generate image
lcImage = loFbc.BarcodeImage("123456789012")

*-- Create form
LOCAL loForm AS FORM
loForm = CREATEOBJECT("Form")
loForm.CAPTION = "FoxBarcode example"
loForm.WIDTH = 800
loForm.HEIGHT = 400
loForm.AUTOCENTER = .T.
loForm.ADDOBJECT("Image1", "Image")
loForm.Image1.PICTURE = lcImage
loForm.Image1.VISIBLE = .T.
loForm.SHOW(1)
loForm = NULL
loFbc = NULL

RETURN
Or better, run Main.prg to show you the form FoxBarcode Demo.
DO Main.prg
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform