topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
texto en buttonbmp | oBtnBmp2:SetText("RO") |
texto en buttonbmp | Francisco,
Puedes indicar su texto en el recurso, igual que si fuese un botón estandard |
texto en buttonbmp | Hola a todos ...
Estoy usando FWH 7.04, el problema con los buttonbmp es que el texto sale en el medio del boton y el bmp al costado, haciendo que el texto no aparezca completo, uso workshop.
No hay manera de que el texto del boton salga mas a la derecha del boton, es decir que no salga centrado, para poder visualizar mejor el bmp y el texto del boton...
Cuando usaba tsbuton no habia problema, pero quiero usar esta clase propia de fwh en mis sistemas....
Salu2
Francis |
texto en buttonbmp | Añádele espacios vacios a la izquierda del texto |
texto en buttonbmp | Master Antonio...
Asi " Grabar".
Salu2
Francis |
texto en buttonbmp | Si |
texto en buttonbmp | Gracias Master Antonio
Funciono ok
Salu2
Francis |
tfilexls cantidad max. de filas 65000... | Hola a todos
Tengo un problema con algunos clientes que usan office 2010 y al exportar hacia excel no permite superar dicho limite
Se podrá mejorar? existe alguna solución planteada?
Gracias de antemano.
/julio |
tfilexls y texcel - SOLUCIONADO | Por vez primera debo exportar datos de un Browse (NO XBROWSE) a Excel. De acuerdo a los post antiguos aparentemente las librerias tFileXLS o tEXCEL son las adecuadas para exportar datos de DBF a XLS. Agradecería mucho me indicaran donde ubicar estas librerias y, si es posible un ejemplo de codigo.
Gracias por adelantado
Armando |
tfilexls y texcel - SOLUCIONADO | Saludos Le envio la clase FileXls
[url]
<!-- m --><a class="postlink" href="http://www.4shared.com/file/TDxywmf6/xlslib.html">http://www.4shared.com/file/TDxywmf6/xlslib.html</a><!-- m -->
[/url] |
tfilexls y texcel - SOLUCIONADO | Ruben Darío
Gracias por la librería. Voy a generarlo para la versión de FWH que poseo. Mil gracias. Pregunta: ¿Tienes algún codigo donde lo hayas aplicado?... para compartirlo en este foro? |
tfilexls y texcel - SOLUCIONADO | Armando, aqui hay un post anterior donde hay ejemplos de FileXls y tExcelScript :
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=18360&p=96313&hilit=creacion+excel#p96313">viewtopic.php?f=6&t=18360&p=96313&hilit=creacion+excel#p96313</a><!-- l --> |
tfilexls y texcel - SOLUCIONADO | Enrique
¿TOleAuto pertenece a una clase de FWH o a una independiente? En las rutinas se especifica este objeto y entonces me salta la duda.
Armando |
tfilexls y texcel - SOLUCIONADO | Amando hasta donde recuerdo TOle viene con (x)Harbour
El FileXls si es externo y hay que incluir los .PRG que lo componen en tu proyecto. |
tfilexls y texcel - SOLUCIONADO | Ok Enrique
Voy a probar los ejemplos adaptados a lo que intento hacer.
armando |
tfilexls y texcel - SOLUCIONADO | Te Envio Ejemplo, No te olvides de Incluir al inicio de tu preg el #include "FileXLS.ch"
[code=fw:u11yga9k]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> Filexls := <span style="color: #ff0000;">"test2.xls"</span><br /> <span style="color: #0000ff;">DEFINE</span> XLS <span style="color: #0000ff;">FONT</span> nFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> HEIGHT <span style="color: #000000;">12</span> BOLD <br /> <span style="color: #0000ff;">DEFINE</span> XLS <span style="color: #0000ff;">FONT</span> nFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <br /> <span style="color: #0000ff;">DEFINE</span> XLS FORMAT nFormat1 <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'dd-mmm-yyyy'</span> <br /> <span style="color: #0000ff;">DEFINE</span> XLS FORMAT nFormat2 <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'#,##0'</span> <br /> <span style="color: #00C800;">if</span> memvar->x_xlsaut=<span style="color: #000000;">1</span><br /> XLS oFileXLS FILE &Filexls <span style="color: #B900B9;">//AUTOEXEC //PROTECT AUTOEXEC NO AUTOEXEC hace que se habra en automatico , no automatico</span><br /> <span style="color: #00C800;">else</span><br /> XLS oFileXLS FILE &Filexls <span style="color: #B900B9;">//AUTOEXEC // no se habre automaticamente</span><br /> <span style="color: #00C800;">endif</span><br /><br /> XLS COL <span style="color: #000000;">1</span> WIDTH <span style="color: #000000;">15</span> <span style="color: #0000ff;">OF</span> oFileXLS <br /> XLS COL <span style="color: #000000;">2</span> WIDTH <span style="color: #000000;">15</span> <span style="color: #0000ff;">OF</span> oFileXLS <br /><br /><br /> @ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> XLS <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Codigo"</span> <span style="color: #0000ff;">FONT</span> nfont2 <span style="color: #0000ff;">OF</span> oFileXLS <span style="color: #B900B9;">//BORDER BORDER_UP ALIGNAMENT ALING_CENTER ALIGNAMENT ALING_LEFT </span><br /> @ <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span> XLS <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Nombre"</span> <span style="color: #0000ff;">FONT</span> nfont2 <span style="color: #0000ff;">OF</span> oFileXLS <span style="color: #B900B9;">//BORDER BORDER_DOWN ALIGNAMENT ALING_CENTER </span><br /> nXlsLine:=<span style="color: #000000;">3</span><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> .Not. <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>aContl<span style="color: #000000;">[</span><span style="color: #000000;">20</span><span style="color: #000000;">]</span>,oDbfxls:<span style="color: #000000;">EOF</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,EOF<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> @ nXlsLine,<span style="color: #000000;">1</span> XLS <span style="color: #0000ff;">SAY</span> oDbfxls:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"tipmod"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">OF</span> oFileXLS <br /> @ nXlsLine,<span style="color: #000000;">2</span> XLS <span style="color: #0000ff;">SAY</span> oDbfxls:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"nombre"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">OF</span> oFileXLS <br /> oDbfxls:<span style="color: #000000;">MoveNext</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> lin++<br /> <span style="color: #B900B9;">// oMeter:Set( lin ) // oProg:nPosition += 1</span><br /> ::<span style="color: #000000;">loMeter</span>:<span style="color: #000000;">Set</span><span style="color: #000000;">(</span> oDbfxls:<span style="color: #000000;">AbsolutePosition</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// oMeter:Set( oDbfxls:AbsolutePosition )</span><br /> nXlsLine++ <br /><br /> <br /><span style="color: #00C800;">EndDo</span> <br /><br /> SET XLS <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">DISPLAY</span> ;<br /> <span style="color: #0000ff;">OF</span> oFileXLS <br /> ENDXLS oFileXLS <br /><br /> </div>[/code:u11yga9k] |
tfilexls y texcel - SOLUCIONADO | :Gracias Dario y Enrique
Pude enviar los datos de una tabla directamente a Excel sin mucha complicacion gracias a TExcelScript. los "defectillos" son que los datos aparecen en la Hoja Electrónica de forma lenta. No he podido comprobar si se requiere tener instalado el MS-excel, pero como digo, son solamente cosas que no creo molesten mucho al cliente.
Esta es la rutina que escribi para este tema:
#include "fivewin.ch"
* Usando TEXCELSCRIPT
FUNCTION Cierre2XLS(dFecha)
Local cAlias := SELECT()
LOCAL xlsFile := oApp:Pathwork + "\" + DTOS(dFecha)+".XLS" //donde voy a grabar el archivo excel
Local oExcel
Local nRow, nCol, N := 1
Local aHeads := {}
*
Local nIMPORTE := 0 // VALOR FACTURA
Local nPENDIENTE := 0 // PENDIENTE INICIA
Local nACUENTA := 0 // PAGOS A CUENTA
Local nSALDO := 0 // SALDOS
*
oExcel := TExcelScript():New()
oExcel:create(xlsFile)
oExcel:visualizar(.T.)
*
* Cabeceras de columna
AADD( aHeads, "TIENDA") // NUMERO DE TIENDA
AADD( aHeads, "OT No.") // NUMERO DE TRANSACCION - NUMERO OT
AADD( aHeads, "CLIENTE") // ID DE CLIENTE
AADD( aHeads, "SERVICIO") // TIPO DE SERV.
AADD( aHeads, "IMPORTE") // VALOR FACTURA )
AADD( aHeads, "PENDIENTE") // PENDIENTE INICIAL
AADD( aHeads, "A CUENTA") // PAGOS A CUENTA
AADD( aHeads, "SALDO") // SALDOS
AADD( aHeads, "H.RECEP") // HORA DE RECEPCION
AADD( aHeads, "F.ENTR.") // FECHA DE ENTREGA
AADD( aHeads, "H.ENTR.") // HORA DE ENTREGA
AADD( aHeads, "ENTR. EN") // ID DE ENTREGA=01->TIENDA / 02->DOMICILIO
*
oExcel:Say( 1, 1, "CIERRE DE OPERACIONES - "+DTOS(dFecha),"Tahoma", 25, .T.,,,,,)
nRow := 2
for n=1 to LEN(aHeads)
oExcel:Say( nRow, N, aHeads[N],,,.T.,,,7,,)
next N
*
oExcel:borders("A2:L2",nRow,N,1)
nRow++
DO WHILE ! EOF()
*
oExcel:Say( nRow, 1 , (cAlias)->NUMTIEND,,,,,,7,,)
oExcel:Say( nRow, 2 , IIF( VALTYPE( (cAlias)->NUMTRANS)<>"C", ;
TRANSFORM( (cAlias)->NUMTRANS, "999999"),(cAlias)->NUMTRANS),,,,,,7,,)
oExcel:Say( nRow, 3 , (cAlias)->ID_CLIEN,,,,,,7,,)
oExcel:Say( nRow, 4 , (cAlias)->ID_SERVI,,,,,,7,,)
oExcel:Say( nRow, 5 , (cAlias)->VALFACTU,,,,,,7,,)
oExcel:Say( nRow, 6 , (cAlias)->COB_PEND,,,,,,7,,)
oExcel:Say( nRow, 7 , (cAlias)->COB_CNTA,,,,,,7,,)
oExcel:Say( nRow, 8 , (cAlias)->COB_SALD,,,,,,7,,)
oExcel:Say( nRow, 9 , (cAlias)->HR_RECEP,,,,,,7,,)
oExcel:Say( nRow, 10, (cAlias)->FECENTRE,,,,,,7,,)
oExcel:Say( nRow, 11, (cAlias)->HR_ENTRE,,,,,,7,,)
oExcel:Say( nRow, 12, (cAlias)->ID_ENTRE,,,,,,7,,)
*
nIMPORTE += (cAlias)->VALFACTU // VALOR FACTURA
nPENDIENTE += (cAlias)->COB_PEND // PENDIENTE
nACUENTA += (cAlias)->COB_CNTA // PAGOS A CUENTA
nSALDO += (cAlias)->COB_SALD // SALDOS
*
SKIP
nRow++
ENDDO
*
oExcel:Say( nRow, 1 , "TOTALES",,12,.T.,,,7,,)
oExcel:Say( nRow, 5 , nIMPORTE,,,,,,7,,)
oExcel:Say( nRow, 6 , nPENDIENTE,,,,,,7,,)
oExcel:Say( nRow, 7 , nACUENTA,,,,,,7,,)
oExcel:Say( nRow, 8 , nSALDO,,,,,,7,,)
*
oExcel:Save()
*
RETURN |
tfilexls y texcel - SOLUCIONADO | Armando;
Uno de los motivos por loque deje TExcelScript fue porque no le encontré la vuelta para que no sea lenta la composición de la hoja.
TFileXLS, es bastante mas sencilla de usar, y con posibilidades de campos calculados. si las pretenciones no son muy profundas, para hojas sencillas la salida es practicamente inmediata.
Esta es la última version que tengo: (con ejemplos)
[url:3oz5ar82]http://www.box.net/shared/vkc2nu2yj70bit697ll8[/url:3oz5ar82]
Saludos |
tfilexls y texcel - SOLUCIONADO | Mario
Gracias por el aporte. Voy a probar el código que me alcanzas. Pregunta ¿requiere que se enlace el aporte de la clase OLE de Avendaño o no es necesario? (en algún escrito, que leí, indicaba que hacia uso de algo relacionado con OLE de Ramón Avendaño).
De acuerdo a los ejemplos que me envías, parece bien sencillo de aplicar. Voy a hacer las pruebas para ver si le alcanzo al cliente, una nueva versión de su aplicación, con esta clase adentro.
Mil gracias. Te comentaré lo que sucede.
Un abrazo
Armando |
tfilexls y texcel - SOLUCIONADO | Armando;
No es necesario usar la clase OLE, al menos si compilas con xHarbour.
Si mal no recuerdo en algún momento lei que era necesario si compilabas con Harbour
Asi es que, quizas, si alguien usa ambos compiladores podrá sacarnos la duda
Saludos |
tfilexls y texcel - SOLUCIONADO | Mario
¡Pues sí! La clase TfileXLS también es simple de aplicar. Su principal carencia, muchas veces no necesaria (hasta que se encuentre con un cliente "colorido"), es el hecho que no tiene posibilidades de colorear las fuentes o el fondo de las celdas, con la excepción de darle atributos de "sombra". Te agradezco mucho que me hayas proporcionado la clase.
Este es el codigo que he generado con tfileXLS
**************************************************************************
* Exportar datos de la BD hacia una hoja Electronica de Excel *
* A. Picón S., Lima, Perú *
* 18.09.2011 *
* Uso de la Clase tfileXLS *
* Gracias a la Colaboración de Mario G., Foro Fivetechsoft *
***************************************************************************
#include "FileXLS.ch"
FUNCTION ExpCierreXLS(dFecha)
Local cAlias := SELECT()
LOCAL xlsFile := ""
Local aHeads := {}
Local nIMPORTE := 0 // VALOR FACTURA
Local nPENDIENTE := 0 // PENDIENTE
Local nACUENTA := 0 // PAGOS A CUENTA
Local nSALDO := 0 // SALDOS
* variables de la clase FileXLS
Local oFileXLS
local nFormat1
local nFont1, nFont2, nFont3, nFont4
* Variables para filas y columnas
Local nRow, nCol, N := 1
*
* Formato para numeros
DEFINE XLS FORMAT nFormat1 PICTURE '#,##0.00' // para importes
* Fuentes y tamaños
DEFINE XLS FONT nFont1 NAME "Arial" HEIGHT 16 BOLD // titulo general
DEFINE XLS FONT nFont2 NAME "Arial" HEIGHT 12 BOLD // titulo de campos
DEFINE XLS FONT nFont3 NAME "Arial" HEIGHT 10 // Valores del contenido
* Titulo general
cTitulo := "CIERRE DE OPERACIONES - "+DTOS(dFecha)
* Cabeceras de columna
AADD( aHeads, "TIENDA") // NUMERO DE TIENDA
AADD( aHeads, "OT No.") // NUMERO DE TRANSACCION - NUMERO OT
AADD( aHeads, "CLIENTE") // ID DE CLIENTE
AADD( aHeads, "SERVICIO") // TIPO DE SERV.
AADD( aHeads, "IMPORTE") // VALOR FACTURA
AADD( aHeads, "PENDIENTE") //PENDIENTE INICIAL
AADD( aHeads, "A CUENTA") //PAGOS A CUENTA
AADD( aHeads, "SALDO") //SALDOS
AADD( aHeads, "H.RECEP") //HORA DE RECEPCION
AADD( aHeads, "F.ENTR.") //FECHA DE ENTREGA
AADD( aHeads, "H.ENTR.") //HORA DE ENTREGA
AADD( aHeads, "ENTR. EN") // ID DE ENTREGA=01->TIENDA / 02->DOMICILIO
*
* Nombre del archivo Excel a generarse
xlsFile := oApp:Pathwork + "\" + (cAlias)->NUMTIEND + DTOS(dFecha)+".XLS"
XLS oFileXLS FILE (xlsFile) AUTOEXEC
* Anchos de las columnas
XLS COL 1 WIDTH 1 OF oFileXLS // primera columna en blanco como margen
FOR N=1 TO LEN(aHeads)
XLS COL (N+1) WIDTH ((LEN(aHeads[N]) * 1.8 ) + 2 ) OF oFileXLS // 1.8 por el ancho de la fuente
// a utlizar (Font2)
NEXT
* Titulos
nRow := 2
@ nRow, 2 XLS SAY (cTitulo) FONT nfont1 OF oFileXLS
nRow += 2
N := 1
FOR N=1 TO LEN(aHeads)
@ nRow, (N+1) XLS SAY (aHeads[N]) FONT nfont2 ;
BORDER 120 ;
SHADED ;
ALIGNAMENT 2 ;
OF oFileXLS
NEXT N
nRow++
DO WHILE !EOF()
*
@ nRow, 2 XLS SAY (cAlias)->NUMTIEND FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 3 XLS SAY (cAlias)->NUMTRANS FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 4 XLS SAY (cAlias)->ID_CLIEN FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 5 XLS SAY (cAlias)->ID_SERVI FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 6 XLS SAY (cAlias)->VALFACTU FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 7 XLS SAY (cAlias)->COB_PEND FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 8 XLS SAY (cAlias)->COB_CNTA FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 9 XLS SAY (cAlias)->COB_SALD FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 10 XLS SAY (cAlias)->HR_RECEP FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 11 XLS SAY (cAlias)->FECENTRE FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 12 XLS SAY (cAlias)->HR_ENTRE FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
@ nRow, 13 XLS SAY (cAlias)->ID_ENTRE FONT nfont3 ;
ALIGNAMENT 2 ;
OF oFileXLS
*
nIMPORTE += (cAlias)->VALFACTU // TOTAL IMPORTES FACTURA
nPENDIENTE += (cAlias)->COB_PEND // TOTAL PENDIENTES X POR COBRAR
nACUENTA += (cAlias)->COB_CNTA // TOTAL PAGOS A CUENTA RECIBIDOS
nSALDO += (cAlias)->COB_SALD // SALDOS X COBRAR
*
SKIP
nRow++
N := 2
ENDDO
@ nRow, 2 XLS SAY "TOTALES" FONT nfont2 ;
ALIGNAMENT 2 ;
SHADED ;
OF oFileXLS
* Say en blanco, solo para poder "sombrear" la columna
@ nRow, 3 XLS SAY "" FONT nfont2 ;
SHADED ;
OF oFileXLS
@ nRow, 4 XLS SAY "" FONT nfont2 ;
SHADED ;
OF oFileXLS
@ nRow, 5 XLS SAY "" FONT nfont2 ;
SHADED ;
OF oFileXLS
*
@ nRow, 6 XLS SAY (nIMPORTE) FONT nfont2 ;
ALIGNAMENT 2 ;
SHADED ;
OF oFileXLS
@ nRow, 7 XLS SAY (nPENDIENTE) FONT nfont2 ;
ALIGNAMENT 2 ;
SHADED ;
OF oFileXLS
@ nRow, 8 XLS SAY (nACUENTA) FONT nfont2 ;
ALIGNAMENT 2 ;
SHADED ;
OF oFileXLS
@ nRow, 9 XLS SAY (nSALDO) FONT nfont2 ;
ALIGNAMENT 2 ;
SHADED ;
OF oFileXLS
* Say en blanco, solo para poder "sombrear" la columna
@ nRow, 10 XLS SAY "" FONT nfont2 ;
SHADED ;
OF oFileXLS
@ nRow, 11 XLS SAY "" FONT nfont2 ;
SHADED ;
OF oFileXLS
@ nRow, 12 XLS SAY "" FONT nfont2 ;
SHADED ;
OF oFileXLS
@ nRow, 13 XLS SAY "" FONT nfont2 ;
SHADED ;
OF oFileXLS
*
XLS PAGE BREAK AT nRow OF oFileXLS
*
SET XLS TO DISPLAY ;
NOGRIDLINES ;
OF oFileXLS
*
ENDXLS oFileXLS
RETURN NIL |
tfilexls y texcel - SOLUCIONADO | Me alegra que te sea util
Como siempre, lo que se puede con uno, no lo tiene el otro y visceversa <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
tfolder | Is it possible to color the dialogs and tabs of the folder class (not tfoldex) ? |
tfolder | Dear Silvio,
It is not easy as it is a standard Windows control |
tfolder | Resolved!!! ( with tfoldex)
[img:8a8kvna7]https://i.postimg.cc/bwvMc6VY/reso.png[/img:8a8kvna7]
thanks to cmsoft ([url:8a8kvna7]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=42652&hilit=folderex&sid=3f0fb4a23cd19635423b01465152a105&sid=3f0fb4a23cd19635423b01465152a105#p256796[/url:8a8kvna7]) |
tfolder | [code=fw:1fz3unvi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\PROJECT.PRG</span><br /><span style="color: #B900B9;">// original:</span><br /><span style="color: #B900B9;">// <!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?f=3&t=18167&p=111528&hilit=aGradSel&sid=76f47b766de9c18f4bf4beffea25c135#p111528">viewtopic.php?f=3&t=18167&p=111528&hilit=aGradSel&sid=76f47b766de9c18f4bf4beffea25c135#p111528</a><!-- l --></span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> hDC, oWndMain, oFont1<br /><span style="color: #00C800;">STATIC</span> c_path<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oBar, aColors1, aColors2, aColors3, oAlpha<br /> <span style="color: #00C800;">LOCAL</span> oBtn1, oBtn2, oBtn3, oBtn4<br /> <span style="color: #00C800;">LOCAL</span> oTmp, oBrush1, oBrush2, oBrush3, oBrush4<br /> <span style="color: #00C800;">LOCAL</span> aRect3 := GetSysmetrics<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Screen-Height</span><br /> <span style="color: #00C800;">LOCAL</span> aRect4 := GetSysmetrics<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Screen-Width</span><br /><br /> <span style="color: #B900B9;">// c_path := CURDRIVE() + ":\" + GETCURDIR() // five antiguo</span><br /> c_path := GETCURDIR<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont1 := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Arial"</span>, <span style="color: #000000;">0</span>, - <span style="color: #000000;">14</span>, .F., .T., <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, .T., .F. <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// ? c_path</span><br /><br /> SetBalloon<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /> SkinButtons<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// ---- MDI - FRAME -----------</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oTmp FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\B</span>ack.bmp"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush1 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>ea.bmp"</span> RESIZE<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndMain <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> aRect3, aRect4 ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Window - and Dialog-test"</span> <span style="color: #0000ff;">BRUSH</span> oBrush1 <span style="color: #0000ff;">PIXEL</span><br /><br /> oWndMain:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont1 <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> BITMAP oAlpha FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\L</span>ogo.bmp"</span><br /><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">TO</span> FWVERSION + <span style="color: #ff0000;">" TechData Software "</span> ;<br /> <span style="color: #0000ff;">CENTERED</span> <span style="color: #000000;">2007</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndMain <span style="color: #0000ff;">MAXIMIZED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> MDI_DIALOG<span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> ABPaint<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">30</span>, <span style="color: #000000;">380</span>, oAlpha:<span style="color: #000000;">hBitmap</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Horiz / Vertical</span><br /><br /> oFont1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrush1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oTmp:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">// --------- DIALOG ----------</span><br /><span style="color: #00C800;">FUNCTION</span> MDI_DIALOG<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oWndDlg, oFld, hDC, oBtn1, oTmp, oBrush3, nTabPos<br /> <span style="color: #00C800;">LOCAL</span> oSay1, oSay2, oRadio1, oRadio2, oCheck1, oCheck2<br /> <span style="color: #00C800;">LOCAL</span> nRadio1 := <span style="color: #000000;">1</span>, nRadio2 := <span style="color: #000000;">1</span>, lCheck1 := .T., lCheck2 := .T.<br /> <span style="color: #00C800;">LOCAL</span> aGradSel, aGradUnSel, aGradOverUnSel, aGradOver, aGradDis<br /> <span style="color: #00C800;">LOCAL</span> aS, aUS, aOU, aO, aD<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oTmp FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\B</span>ack1.jpg"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush3 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>ea.bmp"</span> RESIZE<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWndDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">180</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">580</span>, <span style="color: #000000;">880</span> <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">PIXEL</span> ;<br /> TRANSPARENT <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dialog-Test"</span> <span style="color: #0000ff;">BRUSH</span> oBrush3<br /><br /> oWndDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br /> <span style="color: #B900B9;">// error</span><br /> <span style="color: #B900B9;">//oBrush3 := TBrush():new( ,,,, ResizeBmp( oTmp:hBitmap, 700, 480, .T. ) )</span><br /> <span style="color: #B900B9;">//oWndDlg:Setbrush( oBrush3 )</span><br /><br /> @ <span style="color: #000000;">65</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> oSay1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Transparent Say"</span> <span style="color: #0000ff;">OF</span> oWndDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> oSay1:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #000000;">65535</span>, <span style="color: #000000;">)</span><br /> oSay1:<span style="color: #000000;">lTransparent</span> := .T.<br /><br /> @ <span style="color: #000000;">85</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">RADIO</span> oRadio1 <span style="color: #0000ff;">VAR</span> nRadio1 <span style="color: #0000ff;">OF</span> oWndDlg <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ITEMS</span> <span style="color: #ff0000;">"Option &1"</span>, <span style="color: #ff0000;">"Option &2"</span> _3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">65535</span> ;<br /> HELPID <span style="color: #000000;">100</span>, <span style="color: #000000;">101</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> MsgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oRadio1:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont1 <span style="color: #000000;">)</span><br /><br /> AEval<span style="color: #000000;">(</span> oRadio1:<span style="color: #000000;">aItems</span>, <span style="color: #000000;">{</span>| oRad | oRad:<span style="color: #000000;">lTransparent</span> := .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">130</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">CHECKBOX</span> oCheck1 <span style="color: #0000ff;">VAR</span> lCheck1 <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">65535</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Checkbox"</span> <span style="color: #0000ff;">OF</span> oWndDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">15</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oCheck1:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"New Text"</span> <span style="color: #000000;">)</span><br /><br /> oCheck1:<span style="color: #000000;">lTransparent</span> := .T.<br /> oCheck1:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont1 <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">68</span>, <span style="color: #000000;">130</span> FOLDEREX oFld <span style="color: #0000ff;">OF</span> oWndDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">120</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"T&est"</span>, <span style="color: #ff0000;">"&Tabs"</span>, <span style="color: #ff0000;">"&Bmp"</span>, <span style="color: #ff0000;">"Br&ush"</span> ;<br /> <span style="color: #0000ff;">BITMAPS</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6Edit.bmp"</span>, ;<br /> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6Edit.bmp"</span>, ;<br /> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6Edit.bmp"</span>, ;<br /> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6Edit.bmp"</span> ;<br /> <span style="color: #0000ff;">ROUND</span> <span style="color: #000000;">5</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> nTabPos := <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /><br /> oFld:<span style="color: #000000;">lTransparent</span> := .T.<br /> oFld:<span style="color: #000000;">nFolderHeight</span> := <span style="color: #000000;">25</span><br /> oFld:<span style="color: #000000;">nSeparator</span> := <span style="color: #000000;">5</span><br /> oFld:<span style="color: #000000;">bClrText</span> := <span style="color: #000000;">{</span>| o, n | <span style="color: #000000;">65535</span> <span style="color: #000000;">}</span><br /> oFld:<span style="color: #000000;">oFont</span> := oFont1<br /><br /> <span style="color: #B900B9;">// aGradSel, aGradUnSel, aGradOverUnSel, aGradOver, aGradDis</span><br /> aS := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> aUS := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">8388608</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> aOU := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">32768</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> aO := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> aD := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">12566463</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">// .or.</span><br /> <span style="color: #B900B9;">/*<br /> aGradSel := { { 0.5, nRGB( 150, 215, 0 ), nRGB( 100, 173, 0 ) },;<br /> { 0.75, nRGB( 150, 255, 255 ), nRGB( 150, 255, 255 ) } }<br /><br /> aGradUnSel := { { 0.5, nRGB( 255, 255, 255 ), nRGB( 240, 240, 240 ) },;<br /> { 0.5, nRGB( 240, 240, 240 ), nRGB( 200, 200, 200 ) } }<br /><br /> aGradOverUnSel := { { 0.25, nRGB( 100, 149, 237 ), nRGB( 100, 149, 237 ) },;<br /> { 0.75, nRGB( 255, 255, 255 ), nRGB( 200, 200, 200 ) } }<br /><br /> aGradOver := { { 0.5, nRGB( 200, 200, 200), nRGB( 240, 240, 240 ) },;<br /> { 0.5, nRGB( 240, 240, 240 ), nRGB( 255, 255, 255 ) } }<br /><br /> aGradDis := { { 1, nRGB( 211, 211, 211 ), nRGB( 190, 190, 190) } }<br /><br /> aS := aGradSel<br /> aUS := aGradUnSel<br /> aOU := aGradOverUnSel<br /> aO := aGradOver<br /> aD := aGradDis<br /> */</span><br /><br /> oFld:<span style="color: #000000;">SetDefColors</span><span style="color: #000000;">(</span> aS, aUS, aOU, aO, aD <span style="color: #000000;">)</span><br /> oFld:<span style="color: #000000;">bClrTabs</span> := <span style="color: #000000;">{</span>| o, n | oFld:<span style="color: #000000;">SetFldColors</span><span style="color: #000000;">(</span> o, n <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">15</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> oSay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Transparent Say"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> oSay2:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #000000;">65535</span>, <span style="color: #000000;">)</span><br /> oSay2:<span style="color: #000000;">lTransparent</span> := .T.<br /><br /> @ <span style="color: #000000;">35</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">RADIO</span> oRadio2 <span style="color: #0000ff;">VAR</span> nRadio2 <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ITEMS</span> <span style="color: #ff0000;">"Option &1"</span>, <span style="color: #ff0000;">"Option &2"</span> _3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">65535</span> ;<br /> HELPID <span style="color: #000000;">100</span>, <span style="color: #000000;">101</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> MsgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oRadio1:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont1 <span style="color: #000000;">)</span><br /> AEval<span style="color: #000000;">(</span> oRadio1:<span style="color: #000000;">aItems</span>, <span style="color: #000000;">{</span>| oRad | oRad:<span style="color: #000000;">lTransparent</span> := .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">CHECKBOX</span> oCheck1 <span style="color: #0000ff;">VAR</span> lCheck1 <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">65535</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Checkbox"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">15</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oCheck1:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"New Text"</span> <span style="color: #000000;">)</span><br /><br /> oCheck1:<span style="color: #000000;">lTransparent</span> := .T.<br /> oCheck1:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont1 <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">200</span>, <span style="color: #000000;">250</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">OF</span> oWndDlg ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">35</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont1 ;<br /> TOP ;<br /> NOBORDER ;<br /> FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\E</span>xit.bmp"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> oWndMain:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oBtn1:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">)</span><br /> oBtn1:<span style="color: #000000;">cTooltip</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Close"</span> + CRLF + ;<br /> <span style="color: #ff0000;">"MDI-test"</span>, <span style="color: #ff0000;">"Exit"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWndDlg <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> SHOW_BAR<span style="color: #000000;">(</span> oWndDlg <span style="color: #000000;">)</span>, oFld:<span style="color: #000000;">SetOption</span><span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> F_BACKGRD<span style="color: #000000;">(</span> <span style="color: #000000;">3</span>, oFld, hDC, <span style="color: #000000;">0.50</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">16312263</span>, .T., <span style="color: #ff0000;">"..<span style="color: #000000;">\B</span>ack1.bmp"</span>, <span style="color: #ff0000;">"..<span style="color: #000000;">\B</span>ack1.jpg"</span> <span style="color: #000000;">)</span><br /><br /> oBrush3:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oTmp:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SHOW_BAR<span style="color: #000000;">(</span> oWndDlg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oBar, oBarButt1, oBarButt2, oBarButt3<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">50</span> _3D <span style="color: #0000ff;">OF</span> oWndDlg <span style="color: #000000;">2007</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBarButt1 <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\E</span>xit.bmp"</span> <span style="color: #0000ff;">LEFT</span> NOBORDER ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" &Exit "</span> TOOLTIP <span style="color: #ff0000;">"Preview"</span> <span style="color: #0000ff;">FONT</span> oFont1 ;<br /> <span style="color: #0000ff;">ACTION</span> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Bartest"</span>, <span style="color: #ff0000;">"Attention"</span> <span style="color: #000000;">)</span><br /><br /> oBarButt1:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">50</span>, .T. <span style="color: #000000;">)</span><br /> oBarButt1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBarButt2 <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\P</span>review.bmp"</span> <span style="color: #0000ff;">LEFT</span> NOBORDER ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" &Preview "</span> TOOLTIP <span style="color: #ff0000;">"Exit BarPainter"</span> <span style="color: #0000ff;">FONT</span> oFont1 ;<br /> <span style="color: #0000ff;">ACTION</span> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Bartest"</span>, <span style="color: #ff0000;">"Attention"</span> <span style="color: #000000;">)</span><br /><br /> oBarButt2:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">50</span>, .T. <span style="color: #000000;">)</span><br /> oBarButt2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> NEW_BRUSH<span style="color: #000000;">(</span> oWndDlg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hDC1, aColors, hBmp, hBmpOld<br /><br /> aColors := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">16312263</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>, <span style="color: #000000;">16312263</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> hDC1 = CreateCompatibleDC<span style="color: #000000;">(</span> oWndDlg:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> hBmp = CreateCompatibleBitMap<span style="color: #000000;">(</span> oWndDlg:<span style="color: #000000;">hDC</span>, oWndDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWndDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">25</span> <span style="color: #000000;">)</span><br /><br /> hBmpOld = SelectObject<span style="color: #000000;">(</span> hDC1, hBmp <span style="color: #000000;">)</span><br /><br /> GradientFill<span style="color: #000000;">(</span> hDC1, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oWndDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWndDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, aColors, .T. <span style="color: #000000;">)</span><br /><br /> DeleteObject<span style="color: #000000;">(</span> oWndDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span><br /><br /> oWndDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> = hBmp<br /> oWndDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> = CreatePatternBrush<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDC1, hBmpOld <span style="color: #000000;">)</span><br /><br /> oWndDlg:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oWndDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PaintTab<span style="color: #000000;">(</span> o, nOption <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hBrush, hBmp, nLastRow<br /><br /> <span style="color: #00C800;">IF</span> nOption == o:<span style="color: #000000;">nOver</span> .OR. nOption == o:<span style="color: #000000;">nOption</span><br /> o:<span style="color: #000000;">SetAlphaLevel</span><span style="color: #000000;">(</span> nOption, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> o:<span style="color: #000000;">SetAlphaLevel</span><span style="color: #000000;">(</span> nOption, <span style="color: #000000;">50</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">IF</span> nOption == o:<span style="color: #000000;">nOption</span> .AND. nOption == <span style="color: #000000;">3</span><br /> hBmp = ReadBitmap<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\M</span>arble.bmp"</span> <span style="color: #000000;">)</span><br /> hBrush = CreatePatternBrush<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> o:<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">2</span><br /> nLastRow = o:<span style="color: #000000;">aPos</span><span style="color: #000000;">[</span> o:<span style="color: #000000;">aLines</span><span style="color: #000000;">[</span> o:<span style="color: #000000;">aOrder</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> + o:<span style="color: #000000;">nFolderHeight</span><br /> SetBrushOrgEx<span style="color: #000000;">(</span> o:<span style="color: #000000;">hDC</span>, nLastRow + <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> SetBrushOrgEx<span style="color: #000000;">(</span> o:<span style="color: #000000;">hDC</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">RETURN</span> hBrush<br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> o:<span style="color: #000000;">SetFldColors</span><span style="color: #000000;">(</span> o, nOption <span style="color: #000000;">)</span><br /><span style="color: #B900B9;">// -------- Folder - Background ---------------</span><br /><span style="color: #00C800;">FUNCTION</span> F_BACKGRD<span style="color: #000000;">(</span> nStyle, oFld, hDC, nMove, nColor1, nColor2, lDirect, cBrush, cImage <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> n, oDlg, oBrush2, oBrush3, oImage2, hDC1<br /> <span style="color: #00C800;">LOCAL</span> aColors := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> nMOVE, nCOLOR1, nCOLOR2 <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> nMOVE, nCOLOR2, nCOLOR1 <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> aRect := GetClientRect<span style="color: #000000;">(</span> oFld:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> hBmp, hBmpOld<br /><br /> <span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">(</span> oFld:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">)</span><br /><br /> oDlg := oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span><br /><br /> hDC1 = CreateCompatibleDC<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> hBmp = CreateCompatibleBitMap<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hDC</span>, oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> hBmpOld = SelectObject<span style="color: #000000;">(</span> hDC1, hBmp <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush2 FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\"</span> + cBrush<br /><br /> FillRect( hDC1, aRect, oBrush2:hBrush )<br /><br /> DeleteObject( oDlg:oBrush:hBrush )<br /><br /> oDlg:oBrush:hBitmap = hBmp<br /> oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )<br /><br /> SelectObject( hDC1, hBmpOld )<br /><br /> oDlg:ReleaseDC()<br /><br /> NEXT<br /><br />RETURN( NIL )<br /><br />// fin / end<br /></span></div>[/code:1fz3unvi]
Regards, saludos. |
tftp class | Antonio
Do you plan to make tftp class available for fwppc ?
I neeed to retreive the content of a ftp directory .
This is straight from tftp class, if not i have to figure out another way.
Thanks for your reply
Richard |
tftp class | Richard,
It seems that wininet.dll is available for Windows Mobile, so it should not be difficult to port the code to FWPPC. We are going to check it. |
tftp class | [quote="Antonio Linares":3dm2sqx9]Richard,
It seems that wininet.dll is available for Windows Mobile, so it should not be difficult to port the code to FWPPC. We are going to check it.[/quote:3dm2sqx9]
Antonio <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Gracias,
This issue is not critical for me, i can wait.
I am much more interested in Msgrun replacement , spinners and curiously scopes (i thought this one depending on harbour ???).
Msgrun is as far as i am concerned, the most critical point missing today. I have not found a replacement for it, probably out of ideas on the subject.
Do you have an idea of any replacement ?
Thank you
Richard
Keep faith, FWPPC is a fantastic tool. |
tftp class | Richard,
There is already available a new FWPPC build to be downloaded with MsgRun() support. There is a working sample at samples\TestMRun.prg.
It seems to work well but we appreciate your feedback. Thanks,
> spinners
its on our todo list.
> and curiously scopes (i thought this one depending on harbour ???).
Yes, we upgrade Harbour for Pocket PC every few months from Harbour CVS. We may upgrade it in short. |
tftp class | Antonio,
You already have a forecast of when you will have TFTP and TFTPFILE for FwPpc? |
tftp class | Vilian,
Its on our todo list, though actually we are busy building a new Harbour for Pocket PC build, using the most recent Harbour CVS files. |
tftp class | Antonio,
I know that the friend must is full of things to make, but to conclude our first application with FWPPC, lacks only the sending and act of receiving of data saw ftp, thus would be grateful if the implementation of class ftp could place enters its priorities. |
tftp class | Hi Antonio,
Without wanting to pressure you, but necessary to inform a date for conclusion of the system for my customer. How I am depending only on the support the ftp, you has some forecast pra to have this concluded class? |
tftp class | Vilian,
We are finishing the new FWPPC build (much improved memory management and use of current Harbour CVS files). In a matter of two or three days we may be able to continue development with WinINet.dll |
tftp class | Antonio,
Thanks,
I am here counting the minutes while I wait. |
tftp class | Hi Antonio,
You already have a date to complete this development? |
tftp class | Vilian,
It is almost finished. It may be ready for tomorrow, probably. |
tftp class | Vilian,
First tests are working fine: samples\ftpdir.prg:
[code:4pkvq9my]
// Testing the FiveWin Internet Classes
#include "FWCE.ch"
function Main()
local oInternet := TInternet():New()
local oFTP := TFTP():New( "ftp.microsoft.com", oInternet ) // Microsoft FTP
local aFiles
if ! Empty( oFTP:hFTP )
aFiles = oFTP:Directory( "*.*" )
MsgInfo( Len( aFiles ) )
AEval( aFiles, { | aFile | MsgInfo( aFile[ 1 ] ) } )
else
MsgAlert( "oFTP:hFTP is null" )
endif
oInternet:End()
MsgInfo( "Done!" )
return nil
[/code:4pkvq9my]
[url=http://imageshack.us:4pkvq9my][img:4pkvq9my]http://img150.imageshack.us/img150/1328/pocketzd9.png[/img:4pkvq9my][/url:4pkvq9my]
From XP:
[url=http://imageshack.us:4pkvq9my][img:4pkvq9my]http://img244.imageshack.us/img244/6328/xpuy7.png[/img:4pkvq9my][/url:4pkvq9my] |
tftp class | Hi, Antonio,
Congratulations, but when you intend to liberate this new version? |
tftp class | Vilian,
We have already published it though we have not tested it 100%, so in case there is a required little fix, we may do it asap. |
tftp class | Antonio,
You already have a forecast to launch the version with the class tFtp finished? |
tftp class | Vilian,
Its already published in FWPPC December 2006 build. |
tftp class | Hi Antonio,
I made the update for version 7.01, but I continue with problems to send archives saw ftp! Class FtpFile is not available? |
tftp class | Vilian,
What problems do you have ? Can you post a sample ? thanks |
tftp class | The problem is the lack of class TFtpFile, it still is not ready? |
tftp class | Vilian,
Please download FWPPC again, we missed to include it. Thanks |
tftp class | Antonio,
I received the new update, but now it appears the following error:
FiveCE.lib(TFTPFILE.obj) : error LNK2001: unresolved external symbol HB_FUN_INTERNETSETFILEPOINTER
FiveCE.lib(TFTPFILE.obj) : error LNK2001: unresolved external symbol HB_FUN_INTERNETREADFILE
FiveCE.lib(TFTPFILE.obj) : error LNK2001: unresolved external symbol HB_FUN_INTERNETWRITEFILE
FiveCE.lib(TFTPFILE.obj) : error LNK2001: unresolved external symbol HB_FUN_FTPOPENFILE |
tftp class | Vilan
Make sure you are linking wininet.lib
echo $(VCDIR)\lib\arm\wininet.lib >> msvc.tmp
Richard |
tftp class | Hi Richard,
yes, I am including wininet.lib in the generation of my application. |
tftp class | Vilian,
Please link inet.lib too |
tftp class | Antonio,
where I find inet.lib? |
tftp class | Vilian,
My mistake, inet.lib is not needed. You have to link wininet.lib |
tftp class | Antonio,
I am including wininet.lib(04/06/2003) in the generation of my application <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> |
tftp class | Vilian
This are the libs i am linking and i use tftp with success
echo $(VCDIR)\lib\arm\coredll.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\corelibc.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\aygshell.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ws2.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\mfcce400.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ole32.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ceshell.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\commctrl.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\wininet.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\cellcore.lib >> msvc.tmp
Hth
Richard |
tftp class | Hi Richards,
I am using same libs that you. The error appears when use class tFtpFile in the function below:
STATIC FUNCTION MandaArq(cArquivo,cRemote,nTam)
LOCAL n,hSource,cBuffer:=Space( 6400 ),nBufSize:=6400,oFile
IF (hSource := FOpen( cArquivo )) < 0
RETURN .F.
ELSE
cBuffer := Space( 6400 )
nBufSize := 6400
SysRefresh()
oFile := [b:18a8ecbq]TFtpFile[/b:18a8ecbq]():New( cRemote, oFTP )
IF Empty(oFile)
RETURN .F.
ELSE
oFile:OpenWrite()
FSeek( hSource, 0, 0 )
nTotal := 0
DO WHILE ( nBytes := FRead( hSource, @cBuffer, nBufSize ) ) > 0
nFeito := oFile:Write( SubStr( cBuffer, 1, nBytes ) )
SysRefresh()
nTotal += nBytes
ENDDO
oFile:End()
FClose( hSource )
ENDIF
ENDIF
RETURN .T. |
tftp class | tftpfile() seems to bethe problem
I do not use it personnally, i use ftpgetfile and ftpputfile
Antonio ? |
tftp class | Vilian,
Please download FWPPC again, it should be ok now |
tftp class | Antonio,
Now it is generating the Exe, but when I try to connect it appears the following error:
Argument error
STR
Args:
[ 1] = U
stack calls:
STR(0)
INTERNETOPEN(0)
TINTERNET:NEW(0) |
tftp class | Vilian,
Please check if you are have an InternetOpen() in your code |
tftp class | Antonio,
I do not have a InternetOpen() in my code. |
tftp class | Vilian,
Please download FWPPC again, thanks for your feedback |
tftp class | Antonio,
Now the message is "cannot load WinInet.dll". I looked for in the Pocket for this archive but I did not find!
thanks for help. |
tftp class | Vilian,
Please try this:
MsgInfo( LoadLibrary( "wininet.dll" ) )
and let us know what value you get, thanks |
tftp class | Antonio,
This value is -2017256648 |
tftp class | Vilian,
Though you get the msg "cannot load WinInet.dll", does the application work fine ? |
tftp class | Antonio,
The execution continues, but the archive is not sent for the site. |
tftp class | Vilian,
Could you please post the code that you are testing ? thanks |
tftp class | Antonio,
This code is
FUNCTION EnvArqFtp(cArq)
LOCAL oInternet,oFtp,nVezes:=0,lInter:=.F.
oInternet := TInternet():New()
oFTP := TFTP():New( "ip by server", oInternet,"usr","pass" )
MandaArq(CurDir()+"\"+cArq,"/public_html/sav/"+cArq,500,oFTP)
RETURN NIL
STATIC FUNCTION MandaArq(cArquivo,cRemote,nTam,oFtp)
LOCAL n,hSource,cBuffer:=Space( 6400 ),nBufSize:=6400,oFile
IF (hSource := FOpen( cArquivo )) < 0
RETURN .F.
ELSE
cBuffer := Space( 6400 )
nBufSize := 6400
SysRefresh()
oFile := TFtpFile():New( cRemote, oFTP )
IF Empty(oFile)
RETURN .F.
ELSE
oFile:OpenWrite()
FSeek( hSource, 0, 0 )
nTotal := 0
DO WHILE ( nBytes := FRead( hSource, @cBuffer, nBufSize ) ) > 0
nFeito := oFile:Write( SubStr( cBuffer, 1, nBytes ) )
SysRefresh()
nTotal += nBytes
ENDDO
oFile:End()
FClose( hSource )
ENDIF
ENDIF
RETURN .T. |
tftp class | Vilian,
We have tested your sample and checked these values:
MsgInfo( oFTP:hFTP )
MsgInfo( oFile:hFile )
they look ok, but InternetWriteFile() (oFile:Write()) is returning 0x87 for GetLastError(): ERROR_INVALID_PARAMETER
We don't know why it reports such value <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Have you tried to use FtpPutFile() instead of sending blocks ? |
tftp class | Antonio,
I Tried to use FtpPutFile, but the system stops to answer without giving error message. You have an example of the use of this function? |
tftp class | Vilian,
Please review FWPPC\samples\Ftp.prg |
tftp class | Antonio,
The FWPPC\samples\Ftp.prg does not function. The file is created in directory FTP but it is with size zero and program congeals. |
tftp class | Vilian,
Enrico developed ftp.prg sample, we may ask him. Enrico ? |
tftp class | It should work fine, as far as I know. Sorry, I haven't a pocket PC to test it. My friend Andrea Bruni tested it. Let me ask him... Done. I will report any answer here.
EMG |
tftp class | Vilian
This is a working sample <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
My app uses ftp very intensively and it works OK.
FUNCTION RLOGTRN(TPAR,TFICLOG) // Récupérer FICHIERS LOGTRN QUI INDIQUENT CE QU'IL Y A à TéLécharger
LOCAL hInternet,DFIC,DFICL,DFICR, ;
I := 0, ;
J := 0, ;
DSITE := SPACE(100), ;
DUSER := SPACE(30), ;
DPASS := SPACE(10), ;
DDIR := SPACE(100), ;
HCON
local oInternet
local oFTP
local aFiles
DSITE := ALLTRIM(TPAR[08])
DUSER := ALLTRIM(TPAR[09])
DPASS := ALLTRIM(TPAR[10])
DDIR := ALLTRIM(TPAR[11])
oInternet := TInternet():New()
oFTP := TFTP():New( DSITE, oInternet, DUSER, DPASS )
if ! Empty( oFTP:hFTP )
aFiles = oFTP:Directory(DDIR)
endif
if ! Empty( oFTP:hFTP )
aFiles = oFTP:Directory( ddir + "LOGTRN*.*" )
endif
oInternet:End()
hInternet := InternetOpen( "Anystring", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 ) // pocket connexion gprs
IF hINTERNET = 0
MSGINFO("ERREUR CONNEXION INTERNET")
RETURN NIL
ENDIF
hCon = INTERNETCONNECT( hInternet, DSITE,INTERNET_INVALID_PORT_NUMBER, DUSER, DPASS, INTERNET_SERVICE_FTP, 0,0 )
IF HCON = 0
MSGSTOP("Trop de connexion en cours, essayez plus tard !")
RETURN NIL
ENDIF
J := 0
FOR I = 1 TO LEN(AFILES)
IFILE := AFILES[I]
DFIC := ALLTRIM(IFILE[1])
IF SUBS(DFIC,1,1) = "." .OR. ASC(SUBS(DFIC,1,1)) = 0
ELSE
DFICL := CurDir() + "\ENTRANT\" + alltrim(dfic) // LOCAL FILE
DFICR := ALLTRIM(DDIR ) + alltrim(dfic) // REMOTE FILE
AADD(TFICLOG,DFIC) // STOCKER NOM FICHIER DANS TABLEAU POUR EFFACER APRES SYNCRO
FTPGETFILE( hCon, DFICR , DFICL, 0,FILE_ATTRIBUTE_ARCHIVE, 0, 0 )
ENDIF
NEXT
INTERNETCLOSEHANDLE( hCon )
INTERNETCLOSEHANDLE( hInternet )
return nil
PS : if you need other samples, please let me know
HTH
Richard
Ps : For ANTONIO
Enrico's sample is excellent but it will not work together with tftp class (using the same function names) |
tftp class | Richard,
We removed Enrico's sample function names as now wininet.prg is inside FWPPC |
tftp class | Richard,
I need a example of the FtpPutFile function. You have? |
tftp class | Here you have it
FUNCTION EINTERN(TPAR,TFIC,LOGOUT) // ENVOI SYNCRO PAR INTERNET DU POCKET VERS LE PC DOSSIER CURDIR() + "\SORTANT\*.* a syncroniser vers dest dans aval (tpar))
LOCAL hInternet,DFICL,DFICR, ;
HCON := {}, ;
I := 0, ;
CTR := 0, ;
DSITE := SPACE(100), ;
DUSER := SPACE(30), ;
DPASS := SPACE(10), ;
DDIR := SPACE(100), ;
HCON1
// TPAR[01] := PKID->IDCBATIPK
// TPAR[02] := PKID->PKPC
// TPAR[03] := PKID->PKPCSITE
// TPAR[04] := PKID->PKPCUSER
// TPAR[05] := PKID->PKPCPASS
// TPAR[06] := PKID->PKPCDIR
// TPAR[07] := PKID->PCPK
// TPAR[08] := PKID->PCPKSITE
// TPAR[09] := PKID->PCPKUSER
// TPAR[10] := PKID->PCPKPASS
// TPAR[11] := PKID->PCPKDIR
DSITE := ALLTRIM(TPAR[03])
DUSER := ALLTRIM(TPAR[04])
DPASS := ALLTRIM(TPAR[05])
DDIR := ALLTRIM(TPAR[06])
hInternet := InternetOpen( "Anystring", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 ) // pocket connexion gprs
hCon1 = INTERNETCONNECT( hInternet, DSITE,0, DUSER, DPASS, INTERNET_SERVICE_FTP, 0,0 )
IF HCON1 = 0
MSGINFO("ERREUR Création CONNEXION FTP ... Abandon transmission ")
RETURN .F.
ENDIF
FOR I = 1 TO LEN(TFIC)
DFICL := CurDir() + "\SORTANT\" + ALLTRIM(TFIC[I]) // Fichier local
DFICR := ALLTRIM(DDIR) + ALLTRIM(TFIC[I]) // FICHIER REMOTE
IF FTPPUTFILE( hCon1, DFICL, DFICR, 0, 0 )
AADD(LOGOUT,TFIC[I])
ENDIF
NEXT
INTERNETCLOSEHANDLE( hCon1 )
INTERNETCLOSEHANDLE( hInternet )
RETURN .T.
Regards
Richard |
tftp class | You may need this also
#include "C:\FWPPC\INCLUDE\FWCE.ch"
#define FILE_ATTRIBUTE_READONLY 1
#define FILE_ATTRIBUTE_HIDDEN 2
#define FILE_ATTRIBUTE_SYSTEM 4
#define FILE_ATTRIBUTE_DIRECTORY 16
#define FILE_ATTRIBUTE_ARCHIVE 32
#define FILE_ATTRIBUTE_NORMAL 128
#define FILE_ATTRIBUTE_TEMPORARY 256
//
// access types for InternetOpen()
//
#define INTERNET_OPEN_TYPE_PRECONFIG 0 // use registry configuration
#define INTERNET_OPEN_TYPE_DIRECT 1 // direct to net
#define INTERNET_OPEN_TYPE_PROXY 3 // via named proxy
#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 4 // prevent using java/script/INS
//
// manifests
//
#define INTERNET_INVALID_PORT_NUMBER 0 // use the protocol-specific default
#define INTERNET_DEFAULT_FTP_PORT 21 // default for FTP servers
#define INTERNET_DEFAULT_GOPHER_PORT 70 // " " gopher "
#define INTERNET_DEFAULT_HTTP_PORT 80 // " " HTTP "
#define INTERNET_DEFAULT_HTTPS_PORT 443 // " " HTTPS "
#define INTERNET_DEFAULT_SOCKS_PORT 1080 // default for SOCKS firewall servers.
//
// service types for InternetConnect()
//
#define INTERNET_SERVICE_FTP 1
#define INTERNET_SERVICE_GOPHER 2
#define INTERNET_SERVICE_HTTP 3
//
// flags for FTP
//
#define INTERNET_FLAG_TRANSFER_ASCII 1
#define INTERNET_FLAG_TRANSFER_BINARY 2 |
tftp class | Richard,
The file is created in directory FTP but it is with size zero and program congeals. |
tftp class | [quote="EnricoMaria":rcsdsklp]It should work fine, as far as I know. Sorry, I haven't a pocket PC to test it. My friend Andrea Bruni tested it. Let me ask him... Done. I will report any answer here.
EMG[/quote:rcsdsklp]
Andrea Bruni confirmed that my sample works fine.
EMG |
tftp class | Vilian
Make sure you have the correct access on the server where you want to put the file and that there is no "Disk Quota" or something similar.
The code i sent you works OK.
We have several customers that use it, they send maintenance data from their pocket (via our application) to our server and receive back some other data. FWPPC works OK on this.
The only problem i can not handle properly at the moment is closing the gprs connexion (when used) "Always" . From time to time it remains open. I am working on it.
Hth
PS : What type of server are you uisng ? Linux ? Plex system ?
If using a plex system, make sure you address the main domain "userid and password", if not create sub domains
Richard |
tftp class | Richard,
We use Windows 2003 server. We are using the Activesync to connect the Pocket our net.
We obtain to have access directory ftp through IExplorer the Pocket. |
tftp class | Richard,
It forgives the insistence, but still I did not obtain to send archives saw ftp.
I have that to make some special configuration in mine pocket ?
You can execute in its pocket the example that I mounted to see if the archive arrives complete in my site? |
tftp class | Hello Vilian
Sorry i was on vacation for the last week. Needed some sunshine...
Back to FTP,
If you are connected to the PC (window 2003 server) from your pocket, then you are on a "local" connexion, in this case, ftp wil not work. You will need just a copy file to copy from the pocket to windows 2003 server. This is what we do when the pocket is local (never use ftp in local mode, we use cecopy instead to copy from the PC to the pocket)
Just make sure your pocket is "not connected" to the pc when you want to use ftp.
HTH
Richard |
tftp class | Vilian
Are you able now to use ftp ?
If not, do you want to try a sample program i can send you that will upload a test file on our server and check that it has been correctly updated ?.
I can set a special directory for you if you want to test and make sure it works.
Let me know by email,
Regards
Richard
My email is <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> |
tftp class | Richards,
Debtor, already I obtained to send the archives. Now it would like to know if I have as to set in motion the connection irda(infrared) through my program? |
tftp class | Vilian
I do not know about IRDA, i do not use it.
I use Bluetooth for outside connection.
There has been some posts on IRDA in this forum (or maybe spanish one)
Richard |
tgantt class | Does anyone have a copy or the .PRG plus some examples (hopefully in English) of the [color=blue:1f2feg5p][b:1f2feg5p]tgantt [/b:1f2feg5p][/color:1f2feg5p]class.
Cheers
Gerry |
tgantt class | I have a copy of the Gantt chart software. I need your email address to send it.
Regards,
James |
tgantt class | Thanks James see your private email.
Much appreciated.
Gerry |
tgantt class | Hi, James
You can send thies software for me, too?
My congratulations. |
tgantt class | [quote="James Bott":14h63rq9]I have a copy of the Gantt chart software. I need your email address to send it.
[/quote:14h63rq9]
James,
can you please send me a copy, too ?
My Email is <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> or <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
Thanks
Stefan |
tgantt class | Hi, James
Please copy to me again.Thank you.
Your file support 32bit FWH?
Regards,
Richard
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> |
tgantt class | Friends
This aplication is 16bits compatible.
But, Super Browse, have examples to simulate this feature.
SBTEST.PRG contains a example.
Compatible in 16 and 32bits.
You can download Super Browse( TSBROWSE ) in Patrick Mast Site, in <!-- m --><a class="postlink" href="http://www.fivewin.info/html/downloads.php?category=FiveWin%20users%20contributions">http://www.fivewin.info/html/downloads. ... tributions</a><!-- m --> |
tgantt class | Hello Rochinha
Thank you.I will try it later.
Regards,
Richard |
tgantt class | Dear James,
May I have Tgantt chart code too?
Thanks,
Dutch
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> |
tgantt class | I made a Class 32 bit
It is called Tplan and it is created seeing the Tgant class 16 bit
I need it for my application, But Arthuro does not have never intentional to give sources to me and I have created it
I'm working because there is still something that does not work
I tried to use the tgant's sample of Arthuro and already looked at turns out
if you want see my work :
<!-- m --><a class="postlink" href="http://hyperupload.com/download/8c9da930/tgantwithTplan.zip.html">http://hyperupload.com/download/8c9da93 ... n.zip.html</a><!-- m -->
I do not want to give to all this my class why Arthur has not never given it to the community...
I have worked for years creating classes but nobody has never intentional to recognize my creativity |
tgantt class | Now I terminate Tplan class
READ this message : <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=4249">http://fivetechsoft.com/forums/viewtopic.php?t=4249</a><!-- m -->
-------------------------------- |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.