- Code: Select all Expand view RUN
#include "Fivewin.ch"
Function Main()
local oWnd
local oBar
local oBtt1
local oBtt2
local oSay1
local oSay2
local oSay3
local oFontText1
local oFontBar
local oFontBar1
// local cCode := "12345678"
// Codigo de Barrasÿ:
local cCode := "7896714231143" // Produto Farmaceutico.
// C:\FWH1701\SAMPLES\EAN-13.TTF funciona perfecto
AddFontResource( ".\Ean-13.ttf" )
DEFINE FONT oFontText1 NAME "Arial" SIZE 00, -36
DEFINE FONT oFontBar NAME "EAN-13" SIZE 00, -36
DEFINE FONT oFontBar1 NAME "EAN-13" SIZE 20, -36
DEFINE WINDOW oWnd FROM 0, 0 TO 660, 660 TITLE "Teste con EAN13.TTF" PIXEL
oWnd:SetFont( oFontText1 )
DEFINE BUTTONBAR oBar SIZE 48, 48 OF oWnd //2007
DEFINE BUTTON oBtt1 PROMPT "Salir" OF oBar ACTION oWnd:End() TOOLTIP "Salir" CENTER
oBtt1:nWidth := 96
//oBar:aControls[ 1 ]:nWidth := 96
@ 060, 100 SAY oSay1 PROMPT "Produto: " PIXEL FONT oFontText1 SIZE 150, 40
@ 100, 100 SAY oSay1 PROMPT cCode PIXEL FONT oFontText1 SIZE 260, 40
@ 160, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar SIZE 210, 60
@ 240, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar1 SIZE 210, 60
ACTIVATE WINDOW oWnd
oFontText1:End()
oFontBar:End()
oFontBar1:End()
Return NIL
Regards, saludos.