Is anyone printing QR codes with Fivewin?

Is anyone printing QR codes with Fivewin?

Postby nicolas.dps » Mon Aug 02, 2021 5:05 pm

Hello
Is anyone printing QR codes with Fivewin?
If so, I would be grateful if you could tell me
1. Libraries to link
2. .CH files to include in the compilation
3. Some PRG example of how the function would be called where you can see what parameters are passed.
nicolas.dps
 
Posts: 2
Joined: Mon Aug 02, 2021 3:10 pm

Re: Is anyone printing QR codes with Fivewin?

Postby leandro » Mon Aug 02, 2021 6:28 pm

barcod01.prg
Code: Select all  Expand view

#include "fivewin.ch"

REQUEST FWZEBRA

static cName, cCity, cCountry, cItem

//----------------------------------------------------------------------------//

function Main()

   local oDlg, oCode, oSay, oSay2, oSay3, oFont

   SetGetColorFocus()

   cName    := PadR( "Antonio Linares", 20 )
   cCity    := PadR( "Marbella", 20 )
   cCountry := PadR( "Spain", 20 )
   cItem    := "123456789012"

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 600,800 PIXEL TRUEPIXEL FONT oFont ;
      TITLE "TSAYBARCODE CONTROL"

   @ 080, 40 SAY "PDF417" SIZE 100,26 PIXEL OF oDlg

   @ 050,150 SAYBARCODE oSay2 ;
      TEXT "Address :" + CRLF + cName - CRLF - cCity - CRLF - cCountry ;
      TYPE "PDF417" SIZE 400,80 PIXEL OF oDlg UPDATE

   @ 240, 40 SAY "Name    :" GET cName    SIZE 300,24 PIXEL OF oDlg VALID ( oDlg:Update(), .t. )
   @ 270, 40 SAY "City    :" GET cCity    SIZE 300,24 PIXEL OF oDlg VALID ( oDlg:Update(), .t. )
   @ 300, 40 SAY "Country :" GET cCountry SIZE 300,24 PIXEL OF oDlg VALID ( oDlg:Update(), .t. )
   @ 330, 40 SAY "Item    :" GET cItem    SIZE 200,24 PIXEL OF oDlg VALID ( oDlg:Update(), .t. ) ;
                                          PICTURE "999999999999" RIGHT
   @  230,450 SAYBARCODE oSay ;
      TEXT "Address :" + CRLF + cName - CRLF - cCity - CRLF - cCountry ;
      TYPE "QR-CODE" SIZE 100,100 PIXEL OF oDlg ;
      UPDATE

   @ 400,040 SAYBARCODE TEXT cName - "," - cCity ;
      TYPE "CODE128" SIZE 500,50 PIXEL OF oDlg UPDATE

   @ 480,040 SAY "CODE128" SIZE 520,24 PIXEL OF oDlg CENTER

   @ 550,040 BTNBMP PROMPT "PRINT" SIZE 200,60 PIXEL OF oDlg FLAT ACTION PrintBarCodes()

   @ 650,350 SAY "Item : EAN13" SIZE 200,24 PIXEL OF oDlg CENTER

   @ 700,350 SAYBARCODE TEXT cItem ;
      TYPE "EAN13" SIZE 200,50 PIXEL OF oDlg UPDATE

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil

//----------------------------------------------------------------------------//

function PrintBarCodes()

   local oPrn, oFont

   PRINT oPrn PREVIEW
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 OF oPrn

   PAGE

   @ 1, 1 PRINT TO oPrn TEXT "PDF417" INCHES FONT oFont

   @ 1.25, 1 PRINT TO oPrn TEXT "Address :" + CRLF + cName - CRLF - cCity - CRLF - cCountry ;
      AS BARCODE TYPE "PDF417" SIZE 4, 0.75 INCHES

   @ 3.00, 1 PRINT TO oPrn TEXT cName    INCHES FONT oFont
   @ 3.30, 1 PRINT TO oPrn TEXT cCity    INCHES FONT oFont
   @ 3.60, 1 PRINT TO oPrn TEXT cCountry INCHES FONT oFont
   @ 3.90, 1 PRINT TO oPrn TEXT cItem    INCHES FONT oFont

   @ 3.00,5.00 PRINT TO oPrn TEXT "Address :" + CRLF + cName - CRLF - cCity - CRLF - cCountry ;
      AS BARCODE TYPE "QR-CODE" SIZE 1.2,1.2 INCHES

   @ 5.5, 1 PRINT TO oPrn TEXT TRIM( cName ) ;
      AS BARCODE TYPE "CODE128" SIZE 4,1 INCHES

   @ 9, 4 PRINT TO oPrn TEXT cItem AS BARCODE TYPE "EAN13" ;
      SIZE 4,1 INCHES

   ENDPAGE

   ENDPRINT

   RELEASE FONT oFont

return nil

//----------------------------------------------------------------------------//

 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests