Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing bar codes
Message
 
To
02/07/2011 18:55:04
David Greene
Productive Solutions, LLC
California, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01505317
Message ID:
01517291
Views:
74
>Luis:
>
>I am enhancing a VFP 6.0 app and saw that foxbarcode, available from codeplex, runs in VFP 6 forward. I downloaded the file, installed with subfolders, ran main.prg and the foxbarcode window appears. Great work. But when changing to UPC-A, an error occurs indicating MultiByteToWideChar.prg does not exist. I can see the DECLARE for the function but VFP can't seem to find it when it's needed. Is there a setting I need to change in config.fpw for the app so it will run normally?
>
>The error appears two or three times if Ignore is selected, leading to Error code 2 appearing for a GDI+ error in GRAPHICS1.DRAWSTRING (Invalid Parameter).
>
>Am I missing a setting in config.fpw perhaps? Your comments would be deeply appreciated.
>
>Dave

David, try this workaround to VFP6 adding to the beginning of the function IsGdipFont (in FoxBarcode.PRG) the following lines of code:
IF VERSION (5) <700
  RETURN. T.
ENDIF
The function becomes:,
  *---------------------------------------------------------
  * PROCEDURE IsGdipFont(tcFontName, tcFontStyle)
  *---------------------------------------------------------
  * Validates that the font and style are permitted by GDI+
  * Thanks to Cesar Chalom (Brazil)
  *---------------------------------------------------------
  PROCEDURE IsGdipFont(tcFontName, tcFontStyle)
    * The Gdi+ API declarations were "Aliased" to avoid problems
    * with other possible Gdi+ classes working at the same time

    IF VERSION(5) < 700
      RETURN .T.
    ENDIF

    IF EMPTY(tcFontName)
      RETURN .F.
    ENDIF

    IF EMPTY(tcFontStyle)
      tcFontStyle = "N"
    ENDIF
...
...
... continues to function
Please keep me informed of the results.

Thanks for the feedback.
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform