FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Inherit a class from another to add new methods for FW WIKI
Posts: 845
Joined: Sun Oct 09, 2005 05:36 PM
Inherit a class from another to add new methods for FW WIKI
Posted: Wed Nov 08, 2006 04:51 AM

Arvisnet,
si es DBF ai te va: esta el Advanced DBF repair
salu2
paco

____________________

Paco
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Imprimir en la Impresora - ELTRON-2642
Posted: Wed Mar 28, 2007 10:34 PM
Manuel Valdenebro wrote:
karinha wrote:
Necesito un ejemplo de como se imprime en esta impresora.
ELTRON TLP 2642.


Utilice esta impresora en un viejo programa en Clipper 5.3, para imprimir etiquetas con código de barras. Te envio las funciones que deberás adaptarlas a FiveWin:

***************************************
*** funciones para imprimir etiquetas
*** en impresora ELTRON / ZEBRA
***************************************
FUNC ETIQUETA(nRepe) // nRepe = numero de etiquetas a imprimir

TipImp = 'S'
LNarrow = IF ( TipImp = 'S', 2, 1 )
LWide = IF ( TipImp = 'S', 1, 2 )

WHILE !FT_ISPRINT(TRIM(impresor->CBARRAS)) .AND. SUBS(impresor->LISTADOS,1,1) # "C"
nLen := VALERT ("IMPRESORA DE ETIQUETAS;;NO PREPARADA.",{"Aceptar","Cancelar"},11)
IF nLen<>1
RETURN(0)
ENDI
ENDD
nLen = LEN(NOMBRE)
SET PRINTER TO (TRIM(impresor->CBARRAS)) // nombre impresora codigo barras
SET DEVI TO PRINT // impresora
FOR I = 1 TO nRepe
VACIA_ETI ()
TAMANO_ETI ()
** imprime_cod columna
** fila
** rotation 0 = no
** tipo BarCode (segun tabla) E30 = EAN 13
** LNarrow = anchura
** Lwide
** altura
** N
** Cod_bar = codigo de barra
IMPRIME_COD ( 155, 6, 0, 'E30', LNarrow, LWide, 50, 'N', Cod_Bar )
IMPRIME_TEXTO ( 305, 10, 0, 4, 1, 1, 'N', cPvP )
IMPRIME_TEXTO ( 390, 14, 0, 2, 1, 1, 'N', 'Eur' )
IMPRIME_TEXTO ( 325, 35, 0, 2, 1, 1, 'N', cCam )
IMPRIME_TEXTO ( 390, 35, 0, 2, 1, 1, 'N', 'Pts' )
IMPRIME_TEXTO ( 163, 60, 0, 2, 1, 1, 'N', LEFT ( Referencia, 9 ) )
IMPRIME_TEXTO ( 260, 60, 0, 2, 1, 1, 'N', STR ( Proveedor, 5 ) )
IMPRIME_TEXTO ( 310, 60, 0, 2, 1, 1, 'N', Ref_Pro )
IMPRIME_TEXTO ( 165, 85, 0, 2, 1, 1, 'N', LEFT ( Nombre, 30 ) )
@ PROW () , 0 say 'P1' + CHR (13) + CHR (10)
next
set printer to // (LPTX) impresora normal
set device to SCREEN // pantalla
SET CURSOR ON
Return(0)

func VACIA_ETI
@ PROW () , 0 say 'N' + CHR (13) + CHR (10)
return(0)

func TAMANO_ETI

Rel = IF ( TipImp = 'S', 11.5 / 8, 1 )
Largo = STR ( INT ( 240 * Rel ), 3 )
Sep = STR ( INT ( 24 * Rel ), 2 )
@ PROW () , 0 say 'Q' + Largo + ',' + Sep + CHR (13) + CHR (10)
return(0)

func IMPRIME_COD ( Col, Lin, Rot, CBar, Narrow, Ancho, Alto, Num, Codigo )

Rel = IF ( TipImp = 'S', 11.5 / 8, 1 )

@ PROW () , 0 say 'B' + CAM ( Col * Rel ) + ',' + ;
CAM ( Lin * Rel ) + ',' + ;
CAM ( Rot ) + ',' + ;
CBar + ',' + ;
CAM ( Narrow ) + ',' + ;
CAM ( 2 ) + ',' + ; && Ancho * Rel
CAM ( Alto * Rel ) + ',' + ;
Num + ',' + '"' + Codigo + '"' + CHR (13) + CHR (10)
return(0)

func IMPRIME_TEXTO ( Col, Lin, Rot, Fuente, MulCol, MulLin, Rev, Cadena )

Rel = IF ( TipImp = 'S', 11.5 / 8, 1 )

@ PROW () , 0 say 'A' + CAM ( Col * Rel ) + ',' + ;
CAM ( Lin * Rel ) + ',' + ;
CAM ( Rot ) + ',' + ;
CAM ( Fuente ) + ',' + ;
CAM ( MulCol ) + ',' + ;
CAM ( MulLin ) + ',' + ;
Rev + ',' + '"' + ;
Cadena + '"' + CHR (13) + CHR (10)
return(0)

func CAM (Num)
cxx=ALLTRIM ( STR ( Num, 10 ) )
return(cxx)


Gracias, Manuel


Voy compilar en XHARBOUR modo CONSOLE si funcionar, adapto a FIVEWIN.

Muchas gracias.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 107
Joined: Tue Apr 11, 2006 04:36 PM
Inherit a class from another to add new methods for FW WIKI
Posted: Sat Sep 08, 2007 10:19 PM

Rene, where i down funcky? this is free? thanks

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Inherit a class from another to add new methods for FW WIKI
Posted: Wed Jul 16, 2008 06:08 PM

Rick,

The fix is explained here:

http://forums.fivetechsoft.com/viewtopic.php?t=11385

Yes, you can easily implement it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Inherit a class from another to add new methods for FW WIKI
Posted: Sat Dec 06, 2008 09:13 PM

OK, I solved the problem by renaming the first two functions. It is unfortunate that FWH's functions don't support the same parameters.

Antonio, a possible solution might be to use Enrico's functions (with a different name) and then create a FWH functions just to change the order of the parameters and pass them on to Enrico's functions. This would prevent existing code from breaking and still allow us to use the extra parameters.

Of course, this assumes that Enrico will allow his functions to be used.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: HTTP Post, and Get
Posted: Mon Jul 27, 2009 11:33 AM

Byron,

This may help you:

viewtopic.php?p=63257#p63257

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Harbour 2.1 for Windows Mobile / CE
Posted: Wed Feb 17, 2010 04:29 PM

Pablo,

Aun no se ha decidido como lo vamos a hacer. Pero buscaremos la solución más ventajosa para todos :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM
Combox and escape
Posted: Wed Mar 24, 2010 10:42 AM

Hello,
I have 3 combo in a dialog .
When the user select a combo to view all the items and then press Esc,
all the dialog is closed and not only the combo list .

How to close only the combo List ??

REDEFINE COMBOBOX oCb8 VAR wG[36] ITEMS VPROBA ;
STYLE CBS_DROPDOWN ;
COLOR "B*/W+" ;
ID 131 OF oDlgrv

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Possible to calc. Right/Bottom Btn-Pos on diff. Dlg-Sizes ?
Posted: Tue Aug 10, 2010 12:50 AM
William, James

I tested with the Factor-calculation. The Position is non-linear to the Dialog-Size.
It seems, to move the Button to the Left / upper-corner, will be the only Solution.



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 95
Joined: Fri Nov 23, 2007 04:43 AM
Re: How to get 2 lines for button
Posted: Mon Apr 11, 2011 06:33 AM
Try to do it with SBUTTON

Robert Frank
Posts: 190
Joined: Tue Mar 14, 2006 01:59 AM
Re: Recompiling mapi.c
Posted: Tue May 17, 2011 05:59 PM

Lapsus: How do I recompile a C module with xH/Bcc5.5 (FWH 9.05) ?

Tnx,
Davide

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio:
Posted: Tue Apr 03, 2012 08:06 AM
Pedro,

Here you have it, press F2 on each GET and different actions will be executed:

Code (fw): Select all Collapse
// Testing Keyboard management

#include "FiveWin.ch"

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

function Main()

   local oDlg
   local oGet1, cFirst := "Hello    "
   local oGet2, cLast := "World    "

   DEFINE DIALOG oDlg TITLE "Function Keys for each GET"

   @ 1, 1 GET oGet1 VAR cFirst SIZE 80, 12 OF oDlg

   oGet1:bKeyDown = { | nKey | If( nKey == VK_F2, MsgInfo( "An action for GET 1" ), ) }

   @ 2, 1 GET oGet2 VAR cLast SIZE 80, 12 OF oDlg

   oGet2:bKeyDown = { | nKey | If( nKey == VK_F2, MsgInfo( "An action for GET 2" ), ) }

   @ 3, 6 BUTTON "Ok" ACTION oDlg:End()

   @ 3, 14 BUTTON "Cancel" ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED
   
return nil

//----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Last FWH version. Memory leak.
Posted: Sat Feb 02, 2013 05:06 PM

Maurizio,

If Marco had his app working fine with FWH 10.10 that would be a good starting point.

Could someone else report a FWH more recent version where this error does not happen ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 129
Joined: Sun Oct 09, 2011 03:50 PM
cDevice in TPrinter
Posted: Mon Sep 02, 2013 04:33 PM

Hi! The DATA ::cDevice in this class in fact doesnt exist. How can I get device name?

Posts: 99
Joined: Thu Aug 02, 2012 03:21 PM
Help on authenticating user thru windows domains
Posted: Mon Nov 24, 2014 02:59 PM
Hi everybody, I need some help to translate this VB code I found on MS-VB forum, i put the next function on Excel and Worked very well, but I'm unable to translate to (x)Harbour. Pleas any help/advice that lead me to the right direction?
thanks in advance,

Hebert Vargas
Code (fw): Select all Collapse
Function Authenticated(strUserID As String, strPassword As String, Optional strDNSDomain As String = "") As Boolean
         If strDNSDomain = "" Then
            Set objRootDSE = GetObject("LDAP://RootDSE")
            strDNSDomain = objRootDSE.Get("defaultNamingContext")
         End If

         'Authenticate
         Set dso = GetObject("LDAP:")
         On Error Resume Next
         Err.Clear
         Set ou = dso.OpenDSObject("LDAP://" & strDNSDomain, strUserID, strPassword, 1)
         Authenticated = (Err.Number = 0)
End Function
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20141106)

FiveWin Version: FWHX 15.01

BCC 5.8.2