topic
stringlengths
1
63
text
stringlengths
1
577k
xBRowser drag & drop question
Hello NageswaraRao, If the xBrowser is starting on the first page than it inserts and highlights one line before where you drop. If you are on the second or higher page it works perfectly. Maybe you have some more ideas to solve this. Thank you for your help. Regards, Otto
xBRowser drag & drop question
It has to be like that only. Suppose you dreg 5th item and drop on 10th item. Now 5th item will become 9th item. So the cursor has to move up to 9th row.
xBRowser drag & drop question
NageswaraRao, thank you very much. Best regards, Otto
xBRowser drag & drop question
Otto, can you create a small test of it and insert the sample on fwnips website?
xBRowser drag & drop question
Good evening,How can you know if the user is dropping in the same windows it was dragged from? In my program you can open several mdichild windows. I don't want the user to drag to a different window.Thank you very much.Alvaro
xBRowser drag & drop question
I found it.Passing the number oWnd:hWnd with uDropInfo information. Thank you,Alvaro
xBRowser drag & drop question
With the recent xbrowse ( FWH 8.05 ) the following lines[code:lq1zijkw] oBrw:lButtonDown( nRow, nCol, nFlags ) oBrw:lButtonUp( nRow, nCol, nFlags ) [/code:lq1zijkw] can be replaced with [code:lq1zijkw] oBrw:SetPos( nRow, nCol, .t. ) // .t. for pixel [/code:lq1zijkw]This is better and more reliable than the workaround I was using earlier.
xBRowser drag & drop question
UsingoBrw:SetPos( nRow, nCol, .t. )does not set the browse in the position where you drop.However it works with this 2 lines, am I missing something?oBrw:lButtonDown( nRow, nCol, nFlags )oBrw:lButtonUp( nRow, nCol, nFlags )Thank youAlvaro
xBackUpLite de xHarbour a Harbour con Browse de FW
Amigos: He visto esta utilidad que esta muy,muy bien. Seria posible que alguien la tenga ya para Harbour y con el Browse de FW o el de Hernan es lo mismo. Si es asi le agradezco me la envien. Gracias y saludos Ruben Fernandez.
xBackUpLite de xHarbour a Harbour con Browse de FW
hacer el cambio de xharbour a harbour no es muy dificil, ya que las variantes son que se utilizan ciertas extencions del lenguaje para dar un poco mas de velocidad a los procesos. ahora, que se use twbrowse no es que sea dificil, pero por que no continuar usando tsbrowse? en su momento, cuando se incio el trabajo de xbackuplite, hbzip de harbour tenia cirtas diferencias entre xharbour y harbour. a la fecha no se si ambos proyectos esten sincronizados. salu2 carlos vargas
xBackUpLite de xHarbour a Harbour con Browse de FW
Gracias Carlos. Saludos. Ruben Fernandez
xBackupLite
Por favor si alguien pudiera ayudarme Estoy tratando de compilar xBackuLite y no lo consigo imagen de proyecto <!-- m --><a class="postlink" href="https://1drv.ms/u/s!AgM94kAKnz9CkVTHXK_l2lYzns9A">https://1drv.ms/u/s!AgM94kAKnz9CkVTHXK_l2lYzns9A</a><!-- m --> consola de depuracion <!-- m --><a class="postlink" href="https://1drv.ms/u/s!AgM94kAKnz9CkVWX8bdy-4Oyg-Tr">https://1drv.ms/u/s!AgM94kAKnz9CkVWX8bdy-4Oyg-Tr</a><!-- m --> Codigo de entorno de xmate [code=fw:2nio149b]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #000000;">&#91;</span>Environment<span style="color: #000000;">&#93;</span><br />Description <span style="color: #000000;">1</span>=Xharbour <span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span> y FWH <span style="color: #000000;">13.01</span><br />Description <span style="color: #000000;">2</span>=<br />Description <span style="color: #000000;">3</span>=<br />PRG Compiler ver=<span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span><br />C compiler ver=<span style="color: #000000;">5.82</span><br />Subsystem=<br />Author=<br />Last <span style="color: #0000ff;">update</span>=<span style="color: #000000;">10</span>/<span style="color: #000000;">06</span>/<span style="color: #000000;">2011</span><br /><br /><span style="color: #000000;">&#91;</span>Advanced<span style="color: #000000;">&#93;</span><br />Command types=<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span><br /><br /><span style="color: #000000;">&#91;</span>Harbour<span style="color: #000000;">&#93;</span><br />HB_INSTALL=p:\32bits\<span style="color: #000000;">13.01</span>\xHarbour<br />HB_COMMAND=%HB_BIN_INSTALL%\Harbour.Exe %PRG% /m /n /es2 /i%HB_INC_INSTALL%<br />Option prefix=/<br /><br /><span style="color: #000000;">&#91;</span>C<span style="color: #000000;">&#93;</span><br />C_INSTALL=p:\32bits\Borland\bcc582<br />C_COMP_COMMAND=%C_BIN_INSTALL%\Bcc32.Exe -M -c -v -O2 -I%HB_INC_INSTALL% -I%C_INC_INSTALL%  -n%HOME%\Obj %C%<br />C_LIB_COMMAND=%C_BIN_INSTALL%\TLib.Exe %LIB% /P512 @%RSP% , %LST%<br />C_LINK_COMMAND=%C_BIN_INSTALL%\iLink32.Exe -Gn -aa -Tpe -s -v @%LNK%<br />C_RC_COMMAND=%C_BIN_INSTALL%\Brc32.Exe -r  -fo%RES%  %RC%<br />C_DLL_COMMAND=<br />Option prefix=-<br /><br /><span style="color: #000000;">&#91;</span>User<span style="color: #000000;">&#93;</span><br />POSTEXE_COMMAND=<br />POSTLIB_COMMAND=<br />POSTDLL_COMMAND=<br /><br /><span style="color: #000000;">&#91;</span>Files<span style="color: #000000;">&#93;</span><br />%C_LIB_INSTALL%\C0W32.OBJ=<span style="color: #000000;">1</span><br />P:\32bits\<span style="color: #000000;">13.01</span>\FWH\lib\Fivehx.lib=<span style="color: #000000;">2</span><br />P:\32bits\<span style="color: #000000;">13.01</span>\FWH\lib\Fivehc.lib=<span style="color: #000000;">3</span><br />%HB_LIB_INSTALL%\rtl.lib=<span style="color: #000000;">4</span><br />%HB_LIB_INSTALL%\vm.lib=<span style="color: #000000;">5</span><br />%HB_LIB_INSTALL%\gtgui.lib=<span style="color: #000000;">6</span><br />%HB_LIB_INSTALL%\lang.lib=<span style="color: #000000;">7</span><br />%HB_LIB_INSTALL%\macro.lib=<span style="color: #000000;">8</span><br />%HB_LIB_INSTALL%\rdd.lib=<span style="color: #000000;">9</span><br />%HB_LIB_INSTALL%\dbfcdx.lib=<span style="color: #000000;">10</span><br />%HB_LIB_INSTALL%\dbfntx.lib=<span style="color: #000000;">11</span><br />%HB_LIB_INSTALL%\dbffpt.lib=<span style="color: #000000;">12</span><br />%HB_LIB_INSTALL%\hbsix.lib=<span style="color: #000000;">13</span><br />%HB_LIB_INSTALL%\common.lib=<span style="color: #000000;">14</span><br />%HB_LIB_INSTALL%\pp.lib=<span style="color: #000000;">15</span><br />%HB_LIB_INSTALL%\pcrepos.lib=<span style="color: #000000;">16</span><br />%C_LIB_INSTALL%\cw32.lib=<span style="color: #000000;">17</span><br />%C_LIB_INSTALL%\import32.lib=<span style="color: #000000;">18</span><br />%C_LIB_INSTALL%\uuid.lib=<span style="color: #000000;">19</span><br />%C_LIB_INSTALL%\PSDK\odbc32.lib=<span style="color: #000000;">20</span><br />%C_LIB_INSTALL%\PSDK\rasapi32.lib=<span style="color: #000000;">21</span><br />%C_LIB_INSTALL%\PSDK\iphlpapi.lib=<span style="color: #000000;">22</span><br />%C_LIB_INSTALL%\PSDK\msimg32.lib=<span style="color: #000000;">23</span><br />%C_LIB_INSTALL%\PSDK\nddeapi.lib=<span style="color: #000000;">24</span><br />%HB_LIB_INSTALL%\ct.lib=<span style="color: #000000;">25</span><br />%C_LIB_INSTALL%\PSDK\psapi.lib=<span style="color: #000000;">26</span><br />%HB_LIB_INSTALL%\codepage.lib=<span style="color: #000000;">27</span><br /><br /><br /><span style="color: #000000;">&#91;</span>DLL Files<span style="color: #000000;">&#93;</span><br />%C_LIB_INSTALL%\C0W32.OBJ=<span style="color: #000000;">1</span><br />%HB_LIB_INSTALL%\rtl.lib=<span style="color: #000000;">2</span><br />%HB_LIB_INSTALL%\vm.lib=<span style="color: #000000;">3</span><br />%HB_LIB_INSTALL%\gtgui.lib=<span style="color: #000000;">4</span><br />%HB_LIB_INSTALL%\lang.lib=<span style="color: #000000;">5</span><br />%HB_LIB_INSTALL%\macro.lib=<span style="color: #000000;">6</span><br />%HB_LIB_INSTALL%\rdd.lib=<span style="color: #000000;">7</span><br />%HB_LIB_INSTALL%\dbfntx.lib=<span style="color: #000000;">8</span><br />%HB_LIB_INSTALL%\dbfcdx.lib=<span style="color: #000000;">9</span><br />%HB_LIB_INSTALL%\dbfdbt.lib=<span style="color: #000000;">10</span><br />%HB_LIB_INSTALL%\common.lib=<span style="color: #000000;">11</span><br />%HB_LIB_INSTALL%\ct.lib=<span style="color: #000000;">12</span><br />%HB_LIB_INSTALL%\pp.lib=<span style="color: #000000;">13</span><br />%C_LIB_INSTALL%\CW32.LIB=<span style="color: #000000;">14</span><br />%C_LIB_INSTALL%\IMPORT32.LIB=<span style="color: #000000;">15</span><br /> </div>[/code:2nio149b] xblite.prg [code=fw:2nio149b]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*-----------------------------------------------------------------------<br />Fichero : xBLite.prg<br />Proyecto: XBackupLite (utilidad de compresion para datos de aplicaicones)<br />Objetivo: Prueba del poder del compilador xHarbour<br />Fecha   : 2004.03.06<br />-----------------------------------------------------------------------*/</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xblite.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"tsbrowse.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PAGE1   oFolder:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br /><span style="color: #00D7D7;">#define</span> PAGE2   oFolder:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br /><span style="color: #00D7D7;">#define</span> PAGE3   oFolder:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br /><br /><span style="color: #B900B9;">/*Procedimiento principal*/</span><br /><span style="color: #B900B9;">/*PROCEDURE Main<br />    xblite()   //XBackupLite()<br />RETURN*/</span><br /><br /><span style="color: #B900B9;">/**/</span><br /><span style="color: #00C800;">FUNCTION</span> xblite<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//XBackupLite()</span><br />    <span style="color: #00C800;">LOCAL</span> oIcon<br />    <span style="color: #00C800;">LOCAL</span> oFont<br />    <span style="color: #00C800;">LOCAL</span> oFontT<br />    <span style="color: #00C800;">LOCAL</span> oDlg<br />    <span style="color: #00C800;">LOCAL</span> oFolder<br />    <span style="color: #00C800;">LOCAL</span> oBrowseZip<br />    <span style="color: #00C800;">LOCAL</span> oBrowseUnZip<br /><br />    <span style="color: #B900B9;">/*variables de seccion zip*/</span><br />    <span style="color: #00C800;">PRIVATE</span> oFolderSourceZip, cFolderSourceZip<br />    <span style="color: #00C800;">PRIVATE</span> oGetFolderSourceZip<br />    <span style="color: #00C800;">PRIVATE</span> oIncludeSubFolder, lIncludeSubFolder<br />    <span style="color: #00C800;">PRIVATE</span> oZipToFloppy, lZipToFloppy<br />    <span style="color: #00C800;">PRIVATE</span> oFolderTargetZip, cFolderTargetZip<br />    <span style="color: #00C800;">PRIVATE</span> oGetFolderTargetZip<br />    <span style="color: #00C800;">PRIVATE</span> oFilesCountZip, nFilesZipped, nTotalFilesToZip<br />    <span style="color: #00C800;">PRIVATE</span> nSizeFilesToZip<br />    <span style="color: #00C800;">PRIVATE</span> oDoCompress<br />    <span style="color: #00C800;">PRIVATE</span> acFilesToZip   := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">""</span>, <span style="color: #000000;">0</span>, ctod<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #B900B9;">/*variables de seccion unzip*/</span><br />    <span style="color: #00C800;">PRIVATE</span> oSourceUnZip, cSourceUnZip<br />    <span style="color: #00C800;">PRIVATE</span> oGetSourceUnZip<br />    <span style="color: #00C800;">PRIVATE</span> oUnZipWithPath, lUnZipWithPath<br />    <span style="color: #00C800;">PRIVATE</span> oGetFolderTargetUnZip<br />    <span style="color: #00C800;">PRIVATE</span> oFolderTargetUnZip, cFolderTargetUnZip<br />    <span style="color: #00C800;">PRIVATE</span> oFilesCountUnZip, nFilesUnZipped, nTotalFilesToUnZip<br />    <span style="color: #00C800;">PRIVATE</span> nSizeFilesToUnZip,nSizeFilesToUnZipC<br />    <span style="color: #00C800;">PRIVATE</span> oDoUnCompress<br />    <span style="color: #00C800;">PRIVATE</span> acFilesToUnZip := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">""</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ctod<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span>,  <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #B900B9;">/*valores inciaiales de seccion zip*/</span><br />    cFolderSourceZip    := <span style="color: #ff0000;">""</span><br />    cFolderTargetZip    := <span style="color: #ff0000;">""</span><br />    lIncludeSubFolder   := <span style="color: #00C800;">FALSE</span><br />    lZipToFloppy        := <span style="color: #00C800;">FALSE</span><br />    nTotalFilesToZip    := <span style="color: #000000;">0</span><br />    nSizeFilesToZip     := <span style="color: #000000;">0</span><br /><br />    <span style="color: #B900B9;">/*valores inciaiales de seccion unzip*/</span><br />    cSourceUnZip        := <span style="color: #ff0000;">""</span><br />    cFolderTargetUnZip  := <span style="color: #ff0000;">""</span><br />    lUnZipWhitPath      := <span style="color: #00C800;">TRUE</span><br />    nTotalFilesToUnZip  := <span style="color: #000000;">0</span><br />    nSizeFilesToUnZip   := <span style="color: #000000;">0</span><br />    nSizeFilesToUnZipC  := <span style="color: #000000;">0</span><br /><br />    <span style="color: #B900B9;">/*definiciones de objetos icon y font*/</span><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont  <span style="color: #0000ff;">NAME</span> GetSysFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-11</span><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontT <span style="color: #0000ff;">NAME</span> GetSysFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span> BOLD<br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIcon <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"XBACKUPLITE"</span><br /><br />    <span style="color: #B900B9;">/*definicion de dialogo*/</span><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"XBACKUPLITE"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"xBackup Lite - xHarbour Power"</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">ICON</span> oIcon<br /><br />    <span style="color: #B900B9;">/*logotipo del programa*/</span><br />    <span style="color: #0000ff;">REDEFINE</span> BITMAP ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg;<br />        <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"xbl_logo"</span>;<br />        <span style="color: #0000ff;">ADJUST</span><br /><br />    <span style="color: #B900B9;">/*redefinicion de folder con 2 paginas*/</span><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFolder;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg;<br />        <span style="color: #0000ff;">ITEMS</span>   <span style="color: #ff0000;">"Res&paldar"</span>,<span style="color: #ff0000;">"Res&taurar"</span>,<span style="color: #ff0000;">"&Acerca de"</span>;<br />        <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"PageBackup"</span>,<span style="color: #ff0000;">"PageRestore"</span>,<span style="color: #ff0000;">"PageAbout"</span><br /><br />    <span style="color: #B900B9;">/*redefinicion de controles de pagina #1*/</span><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oFolderSourceZip;<br />        <span style="color: #0000ff;">VAR</span> cFolderSourceZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> PAGE1;<br />        READONLY<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oGetFolderSourceZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> PAGE1;<br />        <span style="color: #0000ff;">ACTION</span> GetDirToZip<span style="color: #000000;">&#40;</span> oBrowseZip <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> oIncludeSubFolder;<br />        <span style="color: #0000ff;">VAR</span> lIncludeSubFolder;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> PAGE1;<br />        <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> GetFilesToZip<span style="color: #000000;">&#40;</span> cFolderSourceZip, oBrowseZip <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> BROWSE oBrowseZip ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> PAGE1 <span style="color: #0000ff;">FONT</span> oFont;<br />        <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_YELLOW01<br /><br />        oBrowseZip:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> acFilesToZip <span style="color: #000000;">&#41;</span><br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseZip ARRAY ELEMENT <span style="color: #000000;">1</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Nombre"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>;<br />            FOOTER <span style="color: #000000;">&#123;</span> || transform<span style="color: #000000;">&#40;</span> nTotalFilesToZip, <span style="color: #ff0000;">"99,999 Archivos"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseZip ARRAY ELEMENT <span style="color: #000000;">2</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Tamaño"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9,999,999.99 Kb"</span>;<br />            FOOTER <span style="color: #000000;">&#123;</span> || transform<span style="color: #000000;">&#40;</span> nSizeFilesToZip, <span style="color: #ff0000;">"9,999,999.99 Kb"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>;<br />            ALIGN DT_RIGHT<br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseZip ARRAY ELEMENT <span style="color: #000000;">3</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Fecha"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>;<br />            ALIGN DT_CENTER<br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseZip ARRAY ELEMENT <span style="color: #000000;">4</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ruta"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span><br /><br />        <span style="color: #B900B9;">/*propiedades de objeto browse*/</span><br />        WITH OBJECT oBrowseZip<br />            :<span style="color: #000000;">nFreeze</span>     := <span style="color: #000000;">1</span><br />            :<span style="color: #000000;">lNoVScroll</span>  := .F.<br />            :<span style="color: #000000;">nHeightHead</span> := <span style="color: #000000;">18</span><br />            :<span style="color: #000000;">nHeightCell</span> := <span style="color: #000000;">18</span><br />            :<span style="color: #000000;">nHeightFoot</span> := <span style="color: #000000;">18</span><br />            :<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> CLR_HEADF, CLR_FOOTF <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span>|| CLR_BLUE <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span>|| CLR_RED <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />        END WITH<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> oZipToFloppy;<br />        <span style="color: #0000ff;">VAR</span> lZipToFloppy;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> PAGE1;<br />        <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> cFolderTargetZip := <span style="color: #ff0000;">""</span>, oFolderTargetZip:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oFolderTargetZip;<br />        <span style="color: #0000ff;">VAR</span> cFolderTargetZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> PAGE1;<br />        READONLY<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oGetFolderTargetZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">107</span> <span style="color: #0000ff;">OF</span> PAGE1;<br />        <span style="color: #0000ff;">ACTION</span> SetFileZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    oFilesCountZip := TProgress<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">108</span>, PAGE1 <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oDoCompress;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> PAGE1;<br />        <span style="color: #0000ff;">ACTION</span> DoMakeZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">/*redefinicion de controles de pagina #2*/</span><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oSourceUnZip;<br />        <span style="color: #0000ff;">VAR</span> cSourceUnZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> PAGE2;<br />        READONLY<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oGetSourceUnZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> PAGE2;<br />        <span style="color: #0000ff;">ACTION</span> GetFileToUnZip<span style="color: #000000;">&#40;</span> oBrowseUnZip <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> BROWSE oBrowseUnZip ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> PAGE2 <span style="color: #0000ff;">FONT</span> oFont;<br />        <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_YELLOW01<br /><br />        oBrowseUnZip:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> acFilesToUnZip <span style="color: #000000;">&#41;</span><br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseUnZip ARRAY ELEMENT <span style="color: #000000;">1</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Nombre"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>;<br />            FOOTER <span style="color: #000000;">&#123;</span> || transform<span style="color: #000000;">&#40;</span> nTotalFilesToUnZip, <span style="color: #ff0000;">"99,999 Archivos"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseUnZip ARRAY ELEMENT <span style="color: #000000;">2</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Tamaño Normal"</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9,999,999.99 Kb"</span>;<br />            FOOTER <span style="color: #000000;">&#123;</span> || transform<span style="color: #000000;">&#40;</span> nSizeFilesToUnZip, <span style="color: #ff0000;">"9,999,999.99 Kb"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>;<br />            ALIGN DT_RIGHT<br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseUnZip ARRAY ELEMENT <span style="color: #000000;">3</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Tamaño Comp."</span> ;<br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>;<br />            <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9,999,999.99 Kb"</span>;<br />            FOOTER <span style="color: #000000;">&#123;</span> || transform<span style="color: #000000;">&#40;</span> nSizeFilesToUnZipC, <span style="color: #ff0000;">"9,999,999.99 Kb"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>;<br />            ALIGN DT_RIGHT<br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseUnZip ARRAY ELEMENT <span style="color: #000000;">4</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Fecha"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>;<br />            ALIGN DT_CENTER<br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> oBrowseUnZip ARRAY ELEMENT <span style="color: #000000;">5</span>;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ruta"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span><br /><br />        <span style="color: #B900B9;">/*propiedades de objeto browse*/</span><br />        WITH OBJECT oBrowseUnZip<br />            :<span style="color: #000000;">nFreeze</span>     := <span style="color: #000000;">1</span><br />            :<span style="color: #000000;">lNoVScroll</span>  := .F.<br />            :<span style="color: #000000;">nHeightHead</span> := <span style="color: #000000;">18</span><br />            :<span style="color: #000000;">nHeightCell</span> := <span style="color: #000000;">18</span><br />            :<span style="color: #000000;">nHeightFoot</span> := <span style="color: #000000;">18</span><br />            :<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> CLR_HEADF, CLR_FOOTF <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span>|| CLR_BLUE <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span>|| CLR_RED <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />        END WITH<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> oUnZipWithPath;<br />        <span style="color: #0000ff;">VAR</span> lUnZipWithPath;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> PAGE2<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oFolderTargetUnZip;<br />        <span style="color: #0000ff;">VAR</span> cFolderTargetUnZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> PAGE2;<br />        READONLY<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oGetFolderTargetUnZip;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> PAGE2;<br />        <span style="color: #0000ff;">ACTION</span> SetFolderUnZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    oFilesCountUnZip := TProgress<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">107</span>, PAGE2 <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oDoUnCompress;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">108</span> <span style="color: #0000ff;">OF</span> PAGE2;<br />        <span style="color: #0000ff;">ACTION</span> DoMakeUnZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">/*redefinicion de controles de pagina #3*/</span><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> PAGE3 <span style="color: #0000ff;">FONT</span> oFontT <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> PAGE3 <span style="color: #0000ff;">FONT</span> oFontT <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> PAGE3 <span style="color: #0000ff;">FONT</span> oFontT <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> PAGE3 <span style="color: #0000ff;">FONT</span> oFontT <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /><br />    <span style="color: #B900B9;">/*boton de cierre de dialogo*/</span><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oClose;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg;<br />        <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">/*activacion de dialogo*/</span><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br />    <span style="color: #B900B9;">/*eilminacion de font usadas*/</span><br />    oFont:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oFontT:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span>  <span style="color: #B900B9;">/*Fin*/</span><br /><br /><br />PROCEDURE GetDirToZip<span style="color: #000000;">&#40;</span> oBrowseZip <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> cDir := <span style="color: #ff0000;">""</span><br />    <span style="color: #00C800;">LOCAL</span> cFiles<br /><br />    <span style="color: #B900B9;">/*solicita directorio origen de ficheros a respaldas*/</span><br />    cDir := cGetDir<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Seleccione el directorio de datos a respaldar"</span> <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">/*si se selecciono un directorio*/</span><br />    <span style="color: #00C800;">IF</span> !empty<span style="color: #000000;">&#40;</span> cDir <span style="color: #000000;">&#41;</span><br /><br />        <span style="color: #B900B9;">/*obtiene los ficheros a respaldar*/</span><br />        GetFilesToZip<span style="color: #000000;">&#40;</span> cDir, oBrowseZip <span style="color: #000000;">&#41;</span><br /><br />        <span style="color: #B900B9;">/*actualiza nombre de directorio fuente*/</span><br />        cFolderSourceZip := cDir<br />        oFolderSourceZip:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />PROCEDURE GetFilesToZip<span style="color: #000000;">&#40;</span> cDir, oBrowseZip <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> aFile<br />    <span style="color: #00C800;">LOCAL</span> aFiles<br />    <span style="color: #00C800;">LOCAL</span> nFiles<br /><br />    <span style="color: #B900B9;">/*verifica si se paso el nombre de directorio fuente*/</span><br />    <span style="color: #00C800;">IF</span> empty<span style="color: #000000;">&#40;</span> cDir <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">RETURN</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br />    <span style="color: #B900B9;">/*verifica si se procesaran los subdirectorios, y se obtiene un arreglo on los ficheros a respaldar*/</span><br />    <span style="color: #00C800;">IF</span> !lIncludeSubFolder<br />        aFiles := directory<span style="color: #000000;">&#40;</span> cDir + <span style="color: #ff0000;">"<span style="color: #000000;">\*</span>.*"</span>,,, XBL_FILEWITHPATH <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">ELSE</span><br />        aFiles := directoryrecurse<span style="color: #000000;">&#40;</span> cDir + <span style="color: #ff0000;">"<span style="color: #000000;">\*</span>.*"</span>,, XBL_FILEWITHPATH <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">ENDIF</span><br /><br />    <span style="color: #B900B9;">/*si se obtivo algun fichero a respaldar*/</span><br />    nFiles := len<span style="color: #000000;">&#40;</span> aFiles <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> nFiles > <span style="color: #000000;">0</span><br /><br />        <span style="color: #B900B9;">/*asigna el numero de ficheros a respaldar a la var del control meter*/</span><br />        nTotalFilesToZip := nFiles<br />        nFilesZipped     := <span style="color: #000000;">0</span><br /><br />        <span style="color: #B900B9;">/*inicializa arreglo de ficheros y procesa cada uno, acumulando su tamaño*/</span><br />        acFilesToZip := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />        <span style="color: #00C800;">FOR</span> EACH aFile IN aFiles<br />            aadd<span style="color: #000000;">&#40;</span> acFilesToZip, <span style="color: #000000;">&#123;</span> cFileName<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> F_NAME <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>  ,;<br />                                  aFile<span style="color: #000000;">&#91;</span> F_SIZE <span style="color: #000000;">&#93;</span> / <span style="color: #000000;">1024</span>        ,;<br />                                  aFile<span style="color: #000000;">&#91;</span> F_DATE <span style="color: #000000;">&#93;</span>               ,;<br />                                  cFilePath<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> F_NAME <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br />            <span style="color: #B900B9;">/*acumula total de tamaños de archivos*/</span><br />            nSizeFilesToZip += aFile<span style="color: #000000;">&#91;</span> F_SIZE <span style="color: #000000;">&#93;</span><br /><br />        <span style="color: #00C800;">NEXT</span><br /><br />        <span style="color: #B900B9;">/*se obtiene la suma de los tamaños de ficheros a respaldar en KB*/</span><br />        nSizeFilesToZip /= <span style="color: #000000;">1024</span><br /><br />    <span style="color: #00C800;">ELSE</span><br /><br />        <span style="color: #B900B9;">/*por defecto un elemento en el arreglo para que no de problemas el browse*/</span><br />        acFilesToZip     := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">""</span>, <span style="color: #000000;">0</span>, ctod<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />        nSizeFilesToZip  := <span style="color: #000000;">0</span><br />        nTotalFilesToZip := <span style="color: #000000;">0</span><br /><br />    <span style="color: #00C800;">ENDIF</span><br /><br />    <span style="color: #B900B9;">/*pasa el arreglo al browse*/</span><br />    oBrowseZip:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> acFilesToZip <span style="color: #000000;">&#41;</span><br />    oBrowseZip:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">&#41;</span><br />    oBrowseZip:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">/*limpia arreglo y llama al colecor de basura de xharbour*/</span><br />    aFiles := <span style="color: #00C800;">nil</span><br />    hb_gcAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />PROCEDURE SetFileZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> cFile := <span style="color: #ff0000;">""</span><br /><br />    <span style="color: #B900B9;">/*si fichero de respaldo estara en disco duro y no en floppy*/</span><br />    <span style="color: #00C800;">IF</span> !lZipToFloppy<br />        <span style="color: #B900B9;">/*solicita el nombre con la unidad destino incluido*/</span><br />        cFile := cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ZipFile   | *.zip"</span>, <span style="color: #ff0000;">"Nombre de archivo de respaldo en Disco Duro"</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\"</span>, XBL_SAVEFILE, XBL_WITHLONGNAME )<br />        cFile := rtrim( cFile )<br /><br />        /*agrega la extencion ZIP de ser necesario*/<br />        IF empty( cFileExt( cFile ) )<br />            cFile += "</span>.zip<span style="color: #ff0000;">"<br />        ENDIF<br /><br />    ELSE<br />        /*solo pide nombre de archivo*/<br />        cFile := space(25)<br />        lOk := BoxGet( "</span>Introdusca dato<span style="color: #ff0000;">", "</span>Nombre del fichero de respaldo en unidad de diskette <A><span style="color: #ff0000;">", @cFile )<br /><br />        /*agrega al nombre de fichero de respaldo la unidad*/<br />        IF lOk<br />            /*TODO: establecer posible malas entradas por parte del usuario*/<br />            /*agrega unidad de diskette A al nombre de fichero dado, y de ser necesario*/<br />            cFile := "</span>A:\<span style="color: #ff0000;">" + rtrim( cFile )<br /><br />            /*agrega la extencion ZIP de ser necesario*/<br />            IF empty( cFileExt( cFile ) )<br />                cFile += "</span>.zip<span style="color: #ff0000;">"<br />            ENDIF<br /><br />        ENDIF<br /><br />    ENDIF<br /><br />    /*actualiza nombre de directorio fuente*/<br />    cFolderTargetZip := cFile<br />    oFolderTargetZip:refresh()<br /><br />RETURN<br /><br />PROCEDURE DoMakeZip()<br />    LOCAL lOkZip        := FALSE<br />    LOCAL acFiles       := {}<br />    LOCAL bOnZipFile    := { |cFile, nFile| UpdateMeterZip( nFile ) }<br />    LOCAL bOnSetDiskZip := { |nDisk| MsgInfo( "</span>Por favor inserte el disco # <span style="color: #ff0000;">" + str( nDisk,,, XBL_TRIM ) ) }<br /><br />    /*verifica que existan ficheros a respaldar y el nombre del fichero de respaldo se haya definido*/<br />    IF empty( cFolderSourceZip ) .or. empty( cFolderTargetZip ) .or. ( len( acFilesToZip ) = 1 .and. acFilesToZip[1,1] = "</span><span style="color: #ff0000;">" )<br />        MsgStop( "</span>Error, debe definir un nombre para fichero de respaldo, y al menos un fichero a respaldar!<span style="color: #ff0000;">")<br />        RETURN<br />    ENDIF<br /><br />    /*se extra solo el nombre de los ficheros a respaldar incuyendo su path*/<br />    aeval( acFilesToZip, { | aFile | aadd( acFiles, aFile[ XBL_FILEPATH ] + aFile[ XBL_FILENAME ] ) } )<br /><br />    /*establece limites de valores de control meter*/<br />    oFilesCountZip:SetRange( 0, nTotalFilesToZip )<br />    oFilesCountZip:SetPos( 0 )<br /><br />    /*desactiva botones*/<br />    oGetFolderSourceZip:disable()<br />    oGetFolderTargetZip:disable()<br />    oDoCompress:disable()<br />    oClose:disable()<br /><br />    /*realiza la compresion de los ficheros*/<br />    IF lZipToFloppy<br />        hb_SetDiskZip( bOnSetDiskZip )<br />        lOkZip := hb_ZipFileByPKSpan( cFolderTargetZip  ,;<br />                                      acFiles           ,;<br />                                      HBL_ZIPLEVEL      ,;<br />                                      bOnZipFile        ,;<br />                                      XBL_ZIPOVERWRITE  ,;<br />                                      NIL               ,;<br />                                      XBL_ZIPWITHPATH    )<br />    ELSE<br />        hb_SetDiskZip( {|| NIL } )<br />        lOkZip := hb_ZipFile( cFolderTargetZip  ,;<br />                              acFiles           ,;<br />                              HBL_ZIPLEVEL      ,;<br />                              bOnZipFile        ,;<br />                              XBL_ZIPOVERWRITE  ,;<br />                              NIL               ,;<br />                              XBL_ZIPWITHPATH    )<br />    ENDIF<br /><br />    /*verifica proceso e informa al usuario*/<br />    IF lOkZip<br />        MsgInfo("</span>La creación del fichero de respaldo fue exitosa!!!<span style="color: #ff0000;">")<br />    ELSE<br />        MsgStop("</span>La creación del fichero de respaldo fallo!!!<span style="color: #ff0000;">")<br />    ENDIF<br /><br />    /*activa botones*/<br />    oGetFolderSourceZip:enable()<br />    oGetFolderTargetZip:enable()<br />    oDoCompress:enable()<br />    oClose:enable()<br /><br />    /*reinicia contador de meter*/<br />    oFilesCountZip:SetPos( 0 )<br />    oFilesCountZip:refresh()<br /><br />    /*limpia arreglo y llama al colecor de basura de xharbour*/<br />    acFiles := NIL<br />    hb_gcAll()<br /><br />RETURN<br /><br />PROCEDURE UpdateMeterZip( nFile )<br /><br />    /*refresca sistema cada 10 ficheros procesados*/<br />    IF nFile % 10 = 0<br />        SysRefresh()<br />    ENDIF<br /><br />    oFilesCountZip:SetPos( nFile )<br /><br />RETURN<br /><br />PROCEDURE GetFileToUnZip( oBrowseUnZip )<br />    LOCAL cFile<br /><br />    /*pide al usuario que seleccione el fichero de respaldo*/<br />    cFile := cGetFile( "</span>ZipFile   | *.zip<span style="color: #ff0000;">", "</span>Nombre de archivo de respaldo a restaurar<span style="color: #ff0000;">", 1, "</span>c:\<span style="color: #ff0000;">", XBL_OPENFILE, XBL_WITHLONGNAME )<br /><br />    /*verifica si realmente se paso el fichero*/<br />    IF !empty( cFile )<br /><br />        /*muestra el nombre del fichero en el dialogo*/<br />        cSourceUnZip := cFile<br />        oSourceUnZip:refresh()<br /><br />        /*extrae informacion del fuchero de respaldo*/<br />        GetFilesFromZip( cFile, oBrowseUnZip )<br /><br />    ENDIF<br /><br />RETURN<br /><br />PROCEDURE GetFilesFromZip( cFile, oBrowseUnZip )<br />    LOCAL aFiles := hb_GetFilesInZip( cFile, XBL_GETFULL_INFOZIP )<br />    LOCAL aFile<br /><br />    /*vereficia el valor retornado por la funcion, si es arreglo y si tiene elementos*/<br />    IF valtype( aFiles ) = "</span>A<span style="color: #ff0000;">" .and. len( aFiles ) > 0<br /><br />        /*inicializa arreglo en cero*/<br />        acFilesToUnZip := {}<br />        nTotalFilesToUnZip := len( aFiles )<br /><br />        /*procesa cada fichero extrayendo la informacion que interesa*/<br />        FOR EACH aFile IN aFiles<br />            aadd( acFilesToUnZip, { cFileName( aFile[ XBL_IZNAME ] )    ,;<br />                                    aFile[ XBL_IZSIZEN ] / 1024         ,;<br />                                    aFile[ XBL_IZSIZEC ] / 1024         ,;<br />                                    aFile[ XBL_IZDATE ]                 ,;<br />                                    cFilePath( aFile[ XBL_IZNAME ] )    })<br /><br />            /*acumula totales de tamaños de archivos - normal y comprimido*/<br />            nSizeFilesToUnZip  += aFile[ XBL_IZSIZEN ]<br />            nSizeFilesToUnZipC += aFile[ XBL_IZSIZEC ]<br /><br />        NEXT<br /><br />        /*obtiene los totales en Kb*/<br />        nSizeFilesToUnZip  /= 1024<br />        nSizeFilesToUnZipC /= 1024<br /><br />    ENDIF<br /><br />    /*pasa el arreglo al browse*/<br />    oBrowseUnZip:SetArray( acFilesToUnZip )<br />    oBrowseUnZip:refresh( TRUE )<br />    oBrowseUnZip:SetFocus()<br /><br />    /*limpia arreglo y llama al colecor de basura de xharbour*/<br />    aFiles := nil<br />    hb_gcAll()<br /><br />RETURN<br /><br />PROCEDURE SetFolderUnZip()<br />    LOCAL cDir := "</span><span style="color: #ff0000;">"<br /><br />    /*pide al usuario de el directorio destino de los datos*/<br />    cDir := cGetDir( "</span>Seleccione el directorio donde se restauraran los ficheros respaldados<span style="color: #ff0000;">" )<br /><br />    /*verifica si se selecciono un directorio*/<br />    IF empty( cDir )<br />        MsgStop( "</span>Error, defina un directorio destino de datos!<span style="color: #ff0000;">" )<br />        RETURN<br /><br />    ELSE<br />        /*muestra el nombre del directorio seleccionado*/<br />        cFolderTargetUnZip := cDir<br />        oFolderTargetUnZip:refresh()<br /><br />    ENDIF<br /><br />RETURN<br /><br />PROCEDURE DoMakeUnZip()<br />    LOCAL lOkUnZip      := FALSE<br />    LOCAL acFiles       := {}<br />    LOCAL bOnUnZipFile  := { |cFile, nPos| UpdateMeterUnZip( cFile, nPos ) }<br />    LOCAL bOnSetDiskZip := { |nDisk| MsgInfo( "</span>Por favor inserte el disco # <span style="color: #ff0000;">" + str( nDisk,,, XBL_TRIM ) ) }<br /><br />    /*verifica que existan ficheros a respaldar y el nombre del fichero de respaldo se haya definido*/<br />    IF empty( cSourceUnZip ) .or. empty( cFolderTargetUnZip ) .or. ( len( acFilesToUnZip ) = 1 .and. acFilesToUnZip[1,1] = "</span><span style="color: #ff0000;">" )<br />        MsgStop( "</span>Error, debe definir un fichero de respaldo valido y un directorio destino!<span style="color: #ff0000;">")<br />        RETURN<br />    ENDIF<br /><br />    /*se extra solo el nombre de los ficheros a respaldar incuyendo su path*/<br />    aeval( acFilesToUnZip, { | aFile | aadd( acFiles, aFile[ XBL_UZFILEPATH ] + aFile[ XBL_UZFILENAME ] ) } )<br /><br />    /*establece limites de valores de control meter*/<br />    oFilesCountUnZip:SetRange( 0, nTotalFilesToUnZip )<br />    oFilesCountUnZip:SetPos( 0 )<br /><br />    /*desactiva botones*/<br />    oGetSourceUnZip:disable()<br />    oGetFolderTargetUnZip:disable()<br />    oDoUnCompress:disable()<br />    oClose:disable()<br /><br />    /*realiza la compresion de los ficheros*/<br />    hb_SetDiskZip( bOnSetDiskZip )<br />    lOkUnZip := hb_UnZipFile( cSourceUnZip      ,;<br />                              bOnUnZipFile      ,;<br />                              lUnZipWithPath    ,;<br />                              NIL               ,;<br />                              cFolderTargetUnZip + "</span>\<span style="color: #ff0000;">" )<br /><br />    /*verifica proceso e informa al usuario*/<br />    IF lOkUnZip<br />        MsgInfo("</span>La creación del fichero de respaldo fue exitosa!!!<span style="color: #ff0000;">")<br />    ELSE<br />        MsgStop("</span>La creación del fichero de respaldo fallo!!!<span style="color: #ff0000;">")<br />    ENDIF<br /><br />    /*activa botones*/<br />    oGetSourceUnZip:enable()<br />    oGetFolderTargetUnZip:enable()<br />    oDoUnCompress:enable()<br />    oClose:enable()<br /><br />    /*reinicia contador de meter*/<br />    oFilesCountUnZip:SetPos( 0 )<br />    oFilesCountUnZip:refresh()<br /><br />    /*limpia arreglo y llama al colecor de basura de xharbour*/<br />    acFiles := NIL<br />    hb_gcAll()<br /><br />RETURN<br /><br />PROCEDURE UpdateMeterUnZip( cFile, nPos )<br />    #ifdef BUG_IN_HBZIP<br /><br />    STATIC n := 0<br /><br />    IF n > nTotalFilesToUnZip<br />        n := 0<br />    ENDIF<br /><br />    ++n<br />    IF n % 10 = 0<br />        SysRefresh()<br />    ENDIF<br /><br />    oFilesCountUnZip:SetPos( n )<br /><br />    #else<br /><br />    oFilesCountUnZip:SetPos( nPos )<br /><br />    #endif<br /><br />RETURN<br /><br />FUNCTION loadmsg()<br />   RETURN nil<br /></span></div>[/code:2nio149b] boxget.prg [code=fw:2nio149b]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*-----------------------------------------------------------------------<br />Fichero : BoxGet.prg<br />Proyecto: XBackupLite (utilidad de compresion para datos de aplicaicones)<br />Objetivo: Prueba del poder del compilador xHarbour<br />Fecha   : 2004.03.06<br />-----------------------------------------------------------------------*/</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xblite.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> BoxGet<span style="color: #000000;">&#40;</span> cTitle, cText, uVar, cPicture, oWnd <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> oDlgBG,;<br />          oGet  ,;<br />          oSay<br /><br />    <span style="color: #00C800;">LOCAL</span> uTemp := uVar<br />    <span style="color: #00C800;">LOCAL</span> lOk   := .f.<br /><br />    <span style="color: #00C800;">DEFAULT</span> cText := <span style="color: #ff0000;">""</span>,;<br />            cTitle:= <span style="color: #ff0000;">"Buscar"</span>,;<br />            oWnd := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />            cPicture := <span style="color: #ff0000;">"@X"</span><br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgBG <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"DlgBoxGet"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TITLE</span> cTitle<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cText;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlgBG <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> uTemp;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlgBG ;<br />        <span style="color: #0000ff;">PICTURE</span> cPicture;<br />        <span style="color: #0000ff;">UPDATE</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlgBG ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlgBG:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lOk := .t. <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">DEFAULT</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> ;<br />        <span style="color: #0000ff;">ID</span> <span style="color: #000000;">202</span> <span style="color: #0000ff;">OF</span> oDlgBG ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlgBG:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lOk := .f. <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgBG <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oSay:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">IF</span> lOk<br />        uVar := uTemp<br />    <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> lOk<br /><br /><span style="color: #00C800;">FUNCTION</span> KDSDebug<span style="color: #000000;">&#40;</span> xVal <span style="color: #000000;">&#41;</span><br />    OutPutDebugStringC<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Debug : "</span> + cValtoChar<span style="color: #000000;">&#40;</span> xVal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapiitm.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapierr.h"</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> OUTPUTDEBUGSTRINGC <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    PHB_ITEM szMsg = hb_param<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span>, HB_IT_STRING <span style="color: #000000;">&#41;</span>;<br /><br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> szMsg != <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        OutputDebugStringA<span style="color: #000000;">&#40;</span> hb_itemGetC<span style="color: #000000;">&#40;</span> szMsg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:2nio149b] Estoy suponiendo que me falta alguna lib en el archivo de entorno De antemano muchas gracias Saludos
xBackupLite
Juan: Preguntonta, y para que necesitas xBackupLite? Saludos
xBackupLite
Armando [quote:32td3e1d]Preguntonta, y para que necesitas xBackupLite? [/quote:32td3e1d] Estoy utilizando esta aplicacion para hacer respaldo y restuaracion de archivos pero lo tengo como un exe adicional que ocupa mas o menos 1160 kb La intencion es ver si lo puedo incorporar como un prg mas a mis aplicaciones Saludos
xBackupLite
No falta incorporar la TsBrowse() del maestro Manuel Mercado? [url:1msu7v3w]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/viewtopic&#46;php?f=2&t=16893&start=0&hilit=blite[/url:1msu7v3w] Saludos.
xBackupLite
Puede usar el pBackup, mui bueno. [url:3gf22gec]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/viewtopic&#46;php?f=2&t=8731&hilit=backup+fivewin&start=15#p114846[/url:3gf22gec] Saludos.
xBackupLite
Karinha Gracias por responder Probé el pBackup y se ma hace muy bueno Quise respaldar los archivos de una carpeta con unas subcarpetas pero no encontré la manera de que esas subcarpetas no las incluyera en el respaldo Saludos
xBackupLite
Intenta asi: [code=fw:2qoscxko]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;#IFDEF __XHARBOUR__<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// if xHarbour</span><br />&nbsp; &nbsp; &nbsp; aFiles := DirectoryRecurse<span style="color: #000000;">&#40;</span> cSourceZip + <span style="color: #ff0000;">"<span style="color: #000000;">\*</span>.*"</span>,, .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;#ELSE<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// if harbour</span><br />&nbsp; &nbsp; &nbsp; aFiles := DirectoryRecurse<span style="color: #000000;">&#40;</span> cSourceZip + <span style="color: #ff0000;">"*"</span>,, .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;#ENDIF<br />&nbsp;</div>[/code:2qoscxko] Saludos
xBackupLite
Karinha [quote:37jkdrap]#IFDEF __XHARBOUR__ // if xHarbour aFiles := DirectoryRecurse( cSourceZip + "\*.*",, .F. ) #ELSE // if harbour aFiles := DirectoryRecurse( cSourceZip + "*",, .F. ) #ENDIF[/quote:37jkdrap] Disculpa mi ignorancia Ya logré compilar xbackup con xharbour Te comento Quiero respaldar una carpeta cuya estructura es esta Carpeta Subcarpeta Subcarpeta archivo archivo ------- ------- archivo Solo quiero respaldar archivos, no incluir las Subcarpetas Este es el codigo de pbackup [code=fw:37jkdrap]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*---------------------------------------------------------------------------------------*/</span><br />*        Archivo: <span style="color: #000000;">pBackup</span>.PRG                                                            *<br />*    Descripcion: <span style="color: #000000;">Programa</span> para Backup y Restores de copias de seguridad para            *<br />*                 formatos de fichero ZIP en nuestros programas.                         *<br />*          Fecha: <span style="color: #000000;">25</span><span style="color: #000000;">-01</span><span style="color: #000000;">-2012</span>                                                             *<br />*          Autor: <span style="color: #000000;">Jose</span> Javier LLoris Roig                                                *<br />*            Web: <span style="color: #000000;">http</span>:<span style="color: #B900B9;">//javierlloris.blogspot.com.es/                                   *</span><br />*            Msn: <span style="color: #000000;">fwh</span><!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->                                                     *<br />*                                                                                        *<br />*            Libreria: <span style="color: #000000;">FWH</span>/FWHX <span style="color: #000000;">11.09</span>                                                    *<br />*             Harbour: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">5.8</span><span style="color: #000000;">.2</span> <span style="color: #0000ff;">release</span> <span style="color: #000000;">20120330</span>                                    *<br />*          Compilador: <span style="color: #000000;">Borland</span> C++ <span style="color: #000000;">5.8</span><span style="color: #000000;">.2</span>                                                 *<br />*                 S.O: <span style="color: #000000;">Windows</span>                                                           *<br />*                                                                                        *<br />*  Los fuentes Harbour para el control de ZIP estan en:                                  *<br />*  C:\Compra FWH1108-FWH1109-fwh1110\Harbour <span style="color: #000000;">3.0</span> Fuentes\harbour<span style="color: #000000;">-3.0</span><span style="color: #000000;">.0</span>\contrib\hbziparc  *<br />*<br /><span style="color: #B900B9;">/*---------------------------------------------------------------------------------------*/</span><br />*  Modificado em: <span style="color: #000000;">28</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2017</span> Para FWHX <span style="color: #000000;">17.01</span> - Jan. <span style="color: #000000;">2017</span><br />*  xHarbour <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Build <span style="color: #000000;">20170215</span><span style="color: #000000;">&#41;</span> -> Para BCC72<br />*  Compilador: <span style="color: #000000;">Borland</span> C++ <span style="color: #000000;">7.2</span> - Joao Santos - <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --><br /><span style="color: #B900B9;">/*---------------------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> CLR_MENTA      nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">221</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">238</span><span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//-> Cor de Menta</span><br /><span style="color: #00D7D7;">#Define</span> CLR_HMENTA     nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">000</span>,<span style="color: #000000;">128</span>,<span style="color: #000000;">000</span><span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//-> Cor de Menta Light</span><br /><span style="color: #00D7D7;">#Define</span> CLR_SOFTYELLOW RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">251</span>,<span style="color: #000000;">225</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<br /><span style="color: #00C800;">STATIC</span> cWebBlog<br /><span style="color: #00C800;">STATIC</span> cMsn<br /><span style="color: #00C800;">STATIC</span> cTitle<br /><span style="color: #00C800;">STATIC</span> cAutor<br /><span style="color: #00C800;">STATIC</span> lExit<br /><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />   <span style="color: #00C800;">LOCAL</span> cFolder := StrCapFirst<span style="color: #000000;">&#40;</span> cFilePath<span style="color: #000000;">&#40;</span> GetModuleFileName<span style="color: #000000;">&#40;</span> GetInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"Backup"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> hDLL    := LoadLibrary<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Bwcc32.dll"</span> <span style="color: #000000;">&#41;</span><br /><br />   REQUEST HB_LANG_ES<br />   HB_LANGSELECT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ES"</span><span style="color: #000000;">&#41;</span><br /><br />   SET CONFIRM <span style="color: #0000ff;">ON</span><br />   SET DELETE <span style="color: #0000ff;">ON</span><br />   SET _3DLOOK <span style="color: #0000ff;">ON</span><br />   SET UNIQUE OFF<br />   SET DATE FORMAT <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"DD-MM-YYYY"</span><br />   SET MULTIPLE <span style="color: #0000ff;">ON</span><br /><br />   <span style="color: #00C800;">IF</span> ISEXERUNNING<span style="color: #000000;">&#40;</span> CFILENAME<span style="color: #000000;">&#40;</span> HB_ARGV<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      __Quit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   BWCCRegister<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">/* Activamos los mensajes tooltip en forma de balon */</span><br />   SetBalloon<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br />   SkinButtons<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">// Botoes Coloridos</span><br /><br />   SetGetColorFocus<span style="color: #000000;">&#40;</span> CLR_MENTA <span style="color: #000000;">&#41;</span><br /><br />   tGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">lDisColors</span>  := .F.<br />   tGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nClrTextDis</span> := CLR_HBLUE<br />   tGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nClrPaneDis</span> := CLR_SOFTYELLOW<br /><br />   <span style="color: #B900B9;">/* Sino existe la carpeta Backup, la creamos */</span><br />   <span style="color: #00C800;">IF</span> !lIsDir<span style="color: #000000;">&#40;</span> cFolder <span style="color: #000000;">&#41;</span><br />      lMkDir<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Backup"</span> <span style="color: #000000;">&#41;</span><br />   END<br /><br />   cWebBlog  := <span style="color: #ff0000;">"http://javierlloris.blogspot.com.es/"</span><br />   cTitle    := <span style="color: #ff0000;">"pBackup versión 2.0"</span><br />   cAutor    := <span style="color: #ff0000;">"José Javier Lloris Roig, 2012"</span><br />   cMsn      := <span style="color: #ff0000;">"[email protected]"</span><br />   lExit     := .F.<br /><br />   BWCCRegister<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   MainOpenWnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Abertura da janela(window)</span><br /><br />   FreeResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   FreeLibrary<span style="color: #000000;">&#40;</span> hDLL <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> MainOpenWnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oIcon, oMenu, oBmp<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIcon <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Icono"</span><br />   <span style="color: #0000ff;">DEFINE</span> BITMAP oBmp FILENAME <span style="color: #ff0000;">"Aranha.bmp"</span><br /><br />   oMenu := FrameMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span>;<br />          <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">51</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">51</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">51</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">51</span> <span style="color: #000000;">&#41;</span>;<br />          <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">TITLE</span> cTitle;<br />          <span style="color: #0000ff;">ICON</span>  oIcon;<br />          BORDER NONE NOMAXIMIZE<br /><br />   FrameBar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> cAutor <span style="color: #0000ff;">CENTER</span> NOINSET <span style="color: #000000;">2007</span> <span style="color: #B900B9;">//2010</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> MSGITEM <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgBar</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>;<br />          TOOLTIP <span style="color: #ff0000;">"Correo electrónico y messenger "</span>+cMsn;<br />          <span style="color: #0000ff;">PROMPT</span> cMsn<br /><br />   <span style="color: #0000ff;">DEFINE</span> MSGITEM <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgBar</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>;<br />          TOOLTIP <span style="color: #ff0000;">"Dirección web: "</span>+cWebBlog;<br />          <span style="color: #0000ff;">PROMPT</span> cWebBlog <span style="color: #0000ff;">ACTION</span> IrWeb<span style="color: #000000;">&#40;</span> cWebBlog <span style="color: #000000;">&#41;</span><br /><br />   oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">DateOn</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">ClockOn</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oWnd:<span style="color: #000000;">bInit</span> := <span style="color: #000000;">&#123;</span> || oWnd:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> lExit <span style="color: #000000;">&#41;</span>                                    ;<br />            <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> PalBmpDraw<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">075</span>, <span style="color: #000000;">000</span>, oBmp:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> <br /><br />   DeleteObject<span style="color: #000000;">&#40;</span> oIcon <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> FrameBar<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oCursor, oFont, oBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oCursor HAND<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar _3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #000000;">2007</span><br /><br />   oBar:<span style="color: #000000;">oFont</span> := oFont<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Backup"</span> NOBORDER <span style="color: #0000ff;">OF</span> oBar;<br />          TOOLTIP <span style="color: #ff0000;">"Hacer copia de seguridad"</span>;<br />          <span style="color: #0000ff;">ACTION</span> Backup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />          <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Backup"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Backup"</span> NOBORDER <span style="color: #0000ff;">OF</span> oBar;<br />          TOOLTIP <span style="color: #ff0000;">"Restaurar copias de seguridad"</span>;<br />          <span style="color: #0000ff;">ACTION</span> Restore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />          <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Restore"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"BotonSalir"</span> <span style="color: #0000ff;">OF</span> oBar NOBORDER GROUP;<br />          TOOLTIP <span style="color: #ff0000;">"Salir del Programa"</span>;<br />          <span style="color: #0000ff;">ACTION</span> Salir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />          <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span><br /><br />   AEval<span style="color: #000000;">&#40;</span> oBar:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">oCursor</span> := oCursor <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   oBar:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#125;</span><br /><br />   oBar:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> CLR_WHITE, CLR_HCYAN <span style="color: #000000;">&#41;</span><br /><br />   oBar:<span style="color: #0000ff;">Adjust</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   DeleteObject<span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />   DeleteObject<span style="color: #000000;">&#40;</span> oCursor <span style="color: #000000;">&#41;</span><br />   DeleteObject<span style="color: #000000;">&#40;</span> oBar <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> FrameMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oMenu<br /><br />   <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span> <span style="color: #B900B9;">//2010</span><br /><br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Servicios"</span><br />      <span style="color: #0000ff;">MENU</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Hacer copia de seguridad (Backup)"</span>      <span style="color: #0000ff;">ACTION</span> Backup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Restaurar copia de seguridad (Restore)"</span> <span style="color: #0000ff;">ACTION</span> Restore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #0000ff;">SEPARATOR</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Salir"</span> <span style="color: #0000ff;">ACTION</span> Salir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">ENDMENU</span><br /><br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Ayuda"</span><br />      <span style="color: #0000ff;">MENU</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Ir al Blog"</span> <span style="color: #0000ff;">ACTION</span> IrWeb<span style="color: #000000;">&#40;</span> cWebBlog <span style="color: #000000;">&#41;</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Acerca"</span>     <span style="color: #0000ff;">ACTION</span> AcercaDe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">ENDMENU</span><br /><br />   <span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span> oMenu <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> Salir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />   <span style="color: #00C800;">If</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"¿ Desea cerrar la aplicación ?"</span>,;<br />                OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Confirmar"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      lExit := .T.<br />      oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   End<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">Function</span> IrWeb<span style="color: #000000;">&#40;</span> cURL <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />   <span style="color: #B900B9;">/* comprobamos si tenemos conexion a internet */</span><br />   <span style="color: #00C800;">If</span> !IsInternet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      MsgAlert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Compruebe la conexión a Internet."</span>, <span style="color: #ff0000;">"Atención"</span> <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><br />   End<br /><br />   CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">// Funcion modificada para que funcione con Windows 7 y XP</span><br />   ShellExecute<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"open"</span>, cURL <span style="color: #000000;">&#41;</span><br /><br />   CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">Function</span> AcercaDe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oDlg, oBoton, oCursor, oFontA, oFontB, oWeb, oMsn, oAutor<br />   <span style="color: #00C800;">LOCAL</span> lValid  := .F.<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontA <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Tahoma"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span> BOLD<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oCursor HAND<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"BoxAcerca"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Acerca de..."</span> <span style="color: #0000ff;">FONT</span> oFontA<br /><br />   oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oAutor <span style="color: #0000ff;">VAR</span> cAutor   <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLUE, GetSysColor<span style="color: #000000;">&#40;</span> <span style="color: #000000;">15</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">FONT</span> oFontB<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oWeb   <span style="color: #0000ff;">VAR</span> cWebBlog <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLUE, GetSysColor<span style="color: #000000;">&#40;</span> <span style="color: #000000;">15</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">FONT</span> oFontB<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oMsn   <span style="color: #0000ff;">VAR</span> cMsn     <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLUE, GetSysColor<span style="color: #000000;">&#40;</span> <span style="color: #000000;">15</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">FONT</span> oFontB<br /><br />   <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP oBoton <span style="color: #0000ff;">ID</span> <span style="color: #000000;">610</span> <span style="color: #0000ff;">OF</span> oDlg     ;<br />            <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lValid := .T., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />            <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cerrar"</span>                    ;<br />            BITMAP <span style="color: #ff0000;">"SalirFtp"</span> TEXTRIGHT         ;<br />            TOOLTIP <span style="color: #ff0000;">"Cerrar"</span><br /><br />   oBoton:<span style="color: #000000;">oCursor</span>  := oCursor<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> lValid <span style="color: #000000;">&#41;</span><br /><br />   DeleteObject<span style="color: #000000;">&#40;</span> oFontA <span style="color: #000000;">&#41;</span><br />   DeleteObject<span style="color: #000000;">&#40;</span> oFontB <span style="color: #000000;">&#41;</span><br />   DeleteObject<span style="color: #000000;">&#40;</span> oCursor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br />DLL32 <span style="color: #00C800;">FUNCTION</span> BWCCRegister<span style="color: #000000;">&#40;</span> hInst AS LONG <span style="color: #000000;">&#41;</span> AS WORD PASCAL LIB <span style="color: #ff0000;">"BWCC32.DLL"</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br /><span style="color: #B900B9;">// FIN</span><br /><br /></div>[/code:37jkdrap] Donde va el codigo que me comentas ?
xBackupLite
[code=fw:20wse3pb]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> GetFilesToZip<span style="color: #000000;">&#40;</span> cSourceZip <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">/*------------------------------------------------------------------------------*/</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aFile &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aFiles &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nRetorna := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nSizeFiles := <span style="color: #000000;">0.000</span><br /><br />&nbsp; &nbsp;#IFDEF __XHARBOUR__<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// if xHarbour</span><br />&nbsp; &nbsp; &nbsp; aFiles := DirectoryRecurse<span style="color: #000000;">&#40;</span> cSourceZip + <span style="color: #ff0000;">"<span style="color: #000000;">\*</span>.*"</span>,, .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;#ELSE<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// if harbour</span><br />&nbsp; &nbsp; &nbsp; aFiles := DirectoryRecurse<span style="color: #000000;">&#40;</span> cSourceZip + <span style="color: #ff0000;">"*"</span>,, .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;#ENDIF<br /><br />&nbsp; &nbsp;aSize<span style="color: #000000;">&#40;</span> aFilesToZip, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> EACH aFile IN aFiles<br /><br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> aFilesToZip, <span style="color: #000000;">&#123;</span> StrCapFirst<span style="color: #000000;">&#40;</span> cFileName<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,; <span style="color: #B900B9;">// Archivo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dToC<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,; <span style="color: #B900B9;">// Fecha</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,; <span style="color: #B900B9;">// Hora</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Transform<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> / <span style="color: #000000;">1024</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"999,999,999,999.999 Kb"</span> <span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">// Tamaño</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cFilePath<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Path del fichero</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">/* Acumula total de tamaños de archivos */</span><br />&nbsp; &nbsp; &nbsp; nSizeFiles += aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; nRetorna := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">/* Acumulamos el tamaño de los ficheros en Kb */</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nRetorna == <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; nSizeFiles /= <span style="color: #000000;">1024</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">/* Controlamos que el fichero a crear no supere los 2GB ya que es la restriccion que tienen */</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">/* los ZIP */</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> nSizeFiles / <span style="color: #000000;">1024</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">1024</span> <span style="color: #000000;">&#41;</span> >= <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span> nRetorna <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:20wse3pb]
xBackupLite
Karinha Estas instrucciones estan en PROC9995.PRG Yo tenia aFiles := DirectoryRecurse( cSourceZip + "\*.*",, .T. ) Ya la cambie a aFiles := DirectoryRecurse( cSourceZip + "\*.*",, .F. ) y me sigue respaldando la carpeta y sus subcarpetas Ahora si pongo la instruccion como aFiles := DirectoryRecurse( cSourceZip + "\*.dbf",, .F. ) lo hace correctamente pero para dbf's solamente Yo quiero respaldar archivos dbf, cdx y fpt
xBackupLite
Juan, ? cSourceZip Que muestra para usted? Saludos.
xBackupLite
Karinha Para poder respaldar los archivos que necesito hice esta modificacion en PROC9995.PRG en Function GetFilesToZip( cSourceZip ) el IF rat... [code=fw:rws8up4k]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FOR</span> EACH aFile IN aFiles<br />                <br />        <span style="color: #00C800;">if</span> rat<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"DBF"</span>,upper<span style="color: #000000;">&#40;</span>aFile<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <> <span style="color: #000000;">0</span> .or. rat<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CDX"</span>,upper<span style="color: #000000;">&#40;</span>aFile<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <> <span style="color: #000000;">0</span> .or. rat<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"FPT"</span>,upper<span style="color: #000000;">&#40;</span>aFile<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <> <span style="color: #000000;">0</span><br /><br />            AAdd<span style="color: #000000;">&#40;</span> aFilesToZip, <span style="color: #000000;">&#123;</span> StrCapFirst<span style="color: #000000;">&#40;</span> cFileName<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>                      ,; <span style="color: #B900B9;">// Archivo</span><br />                                        dToC<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>                                          ,; <span style="color: #B900B9;">// Fecha</span><br />                                        aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>                                                  ,; <span style="color: #B900B9;">// Hora</span><br />                                        Transform<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> / <span style="color: #000000;">1024</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"999,999,999,999.999 Kb"</span> <span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">// Tamaño</span><br />                                        cFilePath<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>                                     <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Path del fichero</span><br /><br />            <span style="color: #B900B9;">/* Acumula total de tamaños de archivos */</span><br />            nSizeFiles += aFile<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />            nRetorna := <span style="color: #000000;">0</span><br /><br />            SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span> <br />      <br />   <span style="color: #00C800;">NEXT</span></div>[/code:rws8up4k] Yo respaldo unicamente dbf's, cdx's y fpt's Pero cuando hago el restore seleccionando la carpeta destino (la misma que en el respaldo), me crea una carpeta "ESA_13.01", se supone que al hacer el restore me debe sobreescribir los mismos arhivos. Te pego el link de la carpeta con las imagenes del restore <!-- m --><a class="postlink" href="https://1drv.ms/f/s!AgM94kAKnz9CkVZirt3PRDaesmVP">https://1drv.ms/f/s!AgM94kAKnz9CkVZirt3PRDaesmVP</a><!-- m --> saludos
xBase command
I need to know if that class found in fivewin or not I am seeing it a lot in many windows programs : It is like Combo box but small and filled with dots and works like as help for get/read entry .
xBase command
Ehab, You may place a small button with "..." as its caption, and assign it the action that you may want.
xBase documentor
In the early 1990s there was a DOS program called Snap Ver. 5.02 that displayed program flow through graphics lines, symbols (vars) used, where they were read, written, control structures, etc. Is there a program that documents xBase/FiveWin programs ?
xBase documentor
I've been looking for one too and came across [url=http&#58;//www&#46;xs4all&#46;nl/~rfsber/Robo/:nuirbdnr]RoboDoc[/url:nuirbdnr] but can't give you any feedback on it yet as I haven't started to play around with it.
xBase documentor
You will find Snap here: [url:gih0fq4s]http&#58;//www&#46;the-oasis&#46;net/ftpmaster&#46;php3?content=ftputils&#46;htm[/url:gih0fq4s] It is near the end of the page. Regards, James
xBase documentor
James: Thank you for your help and link. However, what I'm looking is a software that performs the same functions as the old SNAP but can recognize the extra keywords and new language syntax used with FiveWin / xHarbour / Harbour. Any suggestions ?
xBase documentor
Hunter, It has been a long time since I used it, but Snap does have keyword files for lots of libraries. I suspect you can create a new one for FWH/Harbour. Regards, James
xBase documentor
Hi James and all I downloaded SNAP from the link given but it was a DOS/Windows(?) executable with no source so not much use for a Linux environment. I don't know if it was written in Clipper or some other language. I don't know if source was ever / is now available. Maybe we could work on a (x)Harbour version of the bits people really feel that they need? I've only just glanced at the SNAP documentation. It seems to have a lot of functions and produce voluminous documentation much of which may not be required by most people. What do others think? Regards Doug
xBase documentor
Hello I own the source for a program, to do this. I used it during clipper-times. It draws vertical lines between DO WHILE - ENDDO, IF - ENDIF and so on and does the needed spaces. Is there a need to use it as a basic ? If YES, I can put it in the Forum. Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBase documentor
Hi Uwe I can remember writing one back in the dBase III days (pre Clipper) which used the IBM extended character graphics to draw vertical lines with little horizontal bits at keywords such as IF ELSE ENDIF. Good for finding bugs when one was starting out and running as an interpreter. Clipper arrived and the compiler complained about unmatched control statements so its usefulness to me declined. However whilst I indent my code as I write I do find occasions when assembling some code from several parts, or modifying / extending code there are massive sections that should be re-indented so an auto indenter would be nice. I guess that one should write such a piece of code as a macro to run inside of one's favourite code editor. But having said that I do like the idea of doing things in xBase code as that is ultimately pretty transportable wherever one may be taken writing xBase code. Regards Doug
xBase documentor
Guys: Thank you all for your thoughts. That's the idea, a program that should do at least: 1. Draw vertical lines to show control / flow structures 2. Documents where we use our variables / fields per procedure / function / whole system. 3. Where our vars and fields are read and where their value changes 4. Which procedure / function call others. 5. Variables summary: help to get least frequently used vars. 6. etc. That's part of what the old SNAP used to give us.
xBase documentor
> 1. Draw vertical lines to show control / flow structures I started thinking about how one might best do this in a nice structured, flexible way. If I was to write it my primary focus would be Linux and postscript printing but it wouldn't be too hard to do a Windows version. Just thinking about what one might wish for in the way of options: Include / exclude line numbers? Optionally pass the source through the pre-processor prior to analysis? Flag errors as found / at the end? Print and/or output formatted source? Context sensitive highlighting / color? With postscript it would be easy to have different line types for different control structures. IBM extended graphics set only gave single or double lines. Don't know what capabilities Uwe's program has / had. Regards Doug
xBase documentor
Hello Doug, I don’t know which editor you use for programming. I use UEStudio and MultiEdit and have nearly all the features you mention: formatted source I get with MultiEdit (Reindent function and Evolve: Align MemVar ) and the rest is included in UEStudio. Best regards, Otto
xBase documentor
I use as editor Multi-Edit Ver. 9.10.04. Does UEStudio prints source code with vertical lines, cross references variables & fields ? Thank you.
xBase now unstable slow error Status_Lock_Not_Granted
(sorry for my English) Good afternoon, First of all I would like to thank for all the help provided to the less expert members. By suggestion of Antonio Linares straight to explain my situation, clarifying that I have read Microsoft forums and others related to the subject. I have a Software developed with FiveWin + xHarbour, which use a xBase Database. The software have been working fine for more than 20 years. Now with newer windows versions (7, 8 and 10) with a server with Debian 8 and later using SMB2 (because Win 10 no longer support SMB1) The software became more and more slow, and I receive errors of "status_lock_not_granted" from the Samba server what causes the system to crash. The only solution in this situation is to restart the Samba server, and sometimes this damage de indexes, so is pretty unstable. By now it seems random. However, it looks like is related to high system load or reaching the maximum users working. Also monitoring the server the system Interrupt raise to 4 thousand by hours sometimes. We have tried several solutions, making sure cables and switches are in optimal conditions, optimize the code to avoid block the same record twice, use commit more often and change this parameters to zero on the windows machines: FileInfoCacheLifetime FileNotFoundCacheLifetime DirectoryCacheLifetime and this on the server Blocking Locks (NO) Strict Bloking (NO) OpLoc Nivel 2 (default, SI) After a lot of testing, some with terrible results We run out of options to make the xBase work as it should work Is there any suggestion for me to try? If you have been through the same experience how do you resolved it maintaining the xBase (DBF/CDX)? Thanks for your help. José Chile
xBase now unstable slow error Status_Lock_Not_Granted
José Windows 10 pro ( ver 1803 and 1809 ) does not install SMB 1.0 by default .. You can however turn SMB1.0 back on manually .. Control Panel Programs and Features Turn Windows Features On or Off Scroll down and check Smb 1.0 ... the machine will ask to reboot .. your file sharing should be back to normal. [img:2q5il4w9]http&#58;//i67&#46;tinypic&#46;com/23j27g7&#46;jpg[/img:2q5il4w9] Rick Lipkin
xBase now unstable slow error Status_Lock_Not_Granted
Thank you Rick, very interesting. Best regards, Otto
xBase now unstable slow error Status_Lock_Not_Granted
José, I think you're using a recent version of Fivewin. I suggest you try with a previous version, (17.04 or earlier), to check whether the problem is in Fivewin.
xBase now unstable slow error Status_Lock_Not_Granted
The problem happens since Windows 8 onwards.
xBase now unstable slow error Status_Lock_Not_Granted
Rick, Diego y Moisés. Thanks for your answers! I wonder if Windows in upcoming updates will erase the changes we made or delete support to SMB1 disconnecting the machines from the server.Any experience with windows updates or any suggestion? Regards
xBase now unstable slow error Status_Lock_Not_Granted
Have you already tried ADS(Advantage Database Server) ? Its also work with DBFCDX format and demands almost zero modification to use.
xBase now unstable slow error Status_Lock_Not_Granted
José, If smb 1.0 does not work, either you install ADS server (ADS local driver does not solve the issue), or you use ADORDD, to use access files instead of .dbf but mantaning CLIPPER commands. Hope it helps.
xBase now unstable slow error Status_Lock_Not_Granted
Hello, I found following in my notes: [quote:17q8v4lp]Notizen Abfragen per Directory() sind wieder so schnell - auf alle Rechner im Netzwerk verteilen HKLM\SYSTEM\CurrentControllSet\Services\LanmanWorkstation\Parameters Neu hinzufügen als DWORD: DirectoryCacheLifetime = 0 FileInfoCacheLifetime = 0 FileNotFoundCacheLifetime = 0 Zur Behebung des Problems ist ausreichend, wenn an den Arbeitsplatz-Rechnern die Caching-Einstellungen deaktiviert werden, die in Zusammenhang mit neueren SMB Versionen eingeführt wurden. SMB-Caching ausschalten [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters] "FileInfoCacheLifetime"=dword:00000000 "FileNotFoundCacheLifetime"=dword:00000000 "DirectoryCacheLifetime"=dword:00000000 SMB-Caching einschalten [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] "FileInfoCacheLifetime"=dword:00000010 "FileNotFoundCacheLifetime"=dword:00000005 "DirectoryCacheLifetime"=dword:00000010 Die Code-Schnipsel als REG-Datei speichern und als Admin im Explorer anklicken zum Eintragen in der Registry. ------- HKLM\SYSTEM\CurrentControllSet\Services\LanmanWorkstation\Parameters Neu hinzufügen als DWORD: DirectoryCacheLifetime = 0 FileInfoCacheLifetime = 0 FileNotFoundCacheLifetime = 0 Klappt sofort, auch ohne Reboot. [/quote:17q8v4lp] Best regards Otto
xBase now unstable slow error Status_Lock_Not_Granted
Otto, I tested in the past such changes with no luck.
xBase now unstable slow error Status_Lock_Not_Granted
Thanks Otto. We have done this. and we think it helps a little, but it does not solve the problem. José, Chile
xBase now unstable slow error Status_Lock_Not_Granted
We have made the change to SMB1, and I believe speed has increased a little bit and the errors seem to be less. This is a conversation between a "frozen" machine (Windows machine where the software stays frozen for a couple of minutes and then return to normal) and the Linux server running Debian 9. One packet each. Will there be something of interest? Or maybe is there something that can help the change to SMB1? Query of Client Frame 641510: 129 bytes on wire (1032 bits), 129 bytes captured (1032 bits) Ethernet II, Src: AsustekC_8d:a2:7b (34:97:f6:8d:a2:7b), Dst: HewlettP_b1:c0:64 (9c:b6:54:b1:c0:64) Internet Protocol Version 4, Src: <IP>, Dst: <IP> Transmission Control Protocol, Src Port: 50004, Dst Port: 445, Seq: 14081476, Ack: 7322407, Len: 75 Source Port: 50004 Destination Port: 445 [Stream index: 0] [TCP Segment Len: 75] Sequence number: 14081476 (relative sequence number) [Next sequence number: 14081551 (relative sequence number)] Acknowledgment number: 7322407 (relative ack number) 0101 .... = Header Length: 20 bytes (5) Flags: 0x018 (PSH, ACK) 000. .... .... = Reserved: Not set ...0 .... .... = Nonce: Not set .... 0... .... = Congestion Window Reduced (CWR): Not set .... .0.. .... = ECN-Echo: Not set .... ..0. .... = Urgent: Not set .... ...1 .... = Acknowledgment: Set .... .... 1... = Push: Set .... .... .0.. = Reset: Not set .... .... ..0. = Syn: Not set .... .... ...0 = Fin: Not set [TCP Flags: ·······AP···] Window size value: 27609 [Calculated window size: 27609] [Window size scaling factor: -1 (unknown)] Checksum: 0x28ea [unverified] [Checksum Status: Unverified] Urgent pointer: 0 [SEQ/ACK analysis] [This is an ACK to the segment in frame: 641509] [The RTT to ACK the segment was: 0.000155000 seconds] [Bytes in flight: 75] [Bytes sent since last PSH flag: 75] [Timestamps] [Time since first frame in this TCP stream: 38.717737000 seconds] [Time since previous frame in this TCP stream: 0.000155000 seconds] TCP payload (75 bytes) NetBIOS Session Service Message Type: Session message (0x00) Length: 71 SMB (Server Message Block Protocol) SMB Header Server Component: SMB [Response in: 641511] SMB Command: Locking AndX (0x24) NT Status: STATUS_SUCCESS (0x00000000) Flags: 0x18, Canonicalized Pathnames, Case Sensitivity 0... .... = Request/Response: Message is a request to the server .0.. .... = Notify: Notify client only on open ..0. .... = Oplocks: OpLock not requested/granted ...1 .... = Canonicalized Pathnames: Pathnames are canonicalized .... 1... = Case Sensitivity: Path names are caseless .... ..0. = Receive Buffer Posted: Receive buffer has not been posted .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not supported Flags2: 0xc807, Unicode Strings, Error Code Type, Extended Security Negotiation, Security Signatures, Extended Attributes, Long Names Allowed 1... .... .... .... = Unicode Strings: Strings are Unicode .1.. .... .... .... = Error Code Type: Error codes are NT error codes ..0. .... .... .... = Execute-only Reads: Don't permit reads if execute-only ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs .... 1... .... .... = Extended Security Negotiation: Extended security negotiation is supported .... .0.. .... .... = Reparse Path: The request does not use a @GMT reparse path .... .... .0.. .... = Long Names Used: Path names in request are not long file names .... .... ...0 .... = Security Signatures Required: Security signatures are not required .... .... .... 0... = Compressed: Compression is not requested .... .... .... .1.. = Security Signatures: Security signatures are supported .... .... .... ..1. = Extended Attributes: Extended attributes are supported .... .... .... ...1 = Long Names Allowed: Long file names are allowed in the response Process ID High: 0 Signature: 0000000000000000 Reserved: 0000 Tree ID: 10348 Process ID: 65279 User ID: 59639 Multiplex ID: 43073 Locking AndX Request (0x24) Word Count (WCT): 8 AndXCommand: No further commands (0xff) Reserved: 00 AndXOffset: 57054 FID: 0x7405 Lock Type: 0x10, Large Files ...1 .... = Large Files: Large file locking format requested .... 0... = Cancel: Don't cancel outstanding lock request .... .0.. = Change: Don't change lock type .... ..0. = Oplock Break: This is not an oplock break notification/response .... ...0 = Shared: This is an exclusive lock Oplock Level: Client is not holding oplock on this file (0) Timeout: Wait indefinitely (-1) Number of Unlocks: 0 Number of Locks: 1 Byte Count (BCC): 20 Locks Lock Process ID: 65279 Reserved: 0000 Offset: 2147483646 Length: 1 Server response Transmission Control Protocol, Src Port: 445, Dst Port: 50004, Seq: 7322407, Ack: 14081551, Len: 39 Source Port: 445 Destination Port: 50004 [Stream index: 0] [TCP Segment Len: 39] Sequence number: 7322407 (relative sequence number) [Next sequence number: 7322446 (relative sequence number)] Acknowledgment number: 14081551 (relative ack number) 0101 .... = Header Length: 20 bytes (5) Flags: 0x018 (PSH, ACK) 000. .... .... = Reserved: Not set ...0 .... .... = Nonce: Not set .... 0... .... = Congestion Window Reduced (CWR): Not set .... .0.. .... = ECN-Echo: Not set .... ..0. .... = Urgent: Not set .... ...1 .... = Acknowledgment: Set .... .... 1... = Push: Set .... .... .0.. = Reset: Not set .... .... ..0. = Syn: Not set .... .... ...0 = Fin: Not set [TCP Flags: ·······AP···] Window size value: 9713 [Calculated window size: 9713] [Window size scaling factor: -1 (unknown)] Checksum: 0x9733 [unverified] [Checksum Status: Unverified] Urgent pointer: 0 [SEQ/ACK analysis] [This is an ACK to the segment in frame: 641510] [The RTT to ACK the segment was: 0.000041000 seconds] [Bytes in flight: 39] [Bytes sent since last PSH flag: 39] [Timestamps] [Time since first frame in this TCP stream: 38.717778000 seconds] [Time since previous frame in this TCP stream: 0.000041000 seconds] TCP payload (39 bytes) NetBIOS Session Service Message Type: Session message (0x00) Length: 35 SMB (Server Message Block Protocol) SMB Header Server Component: SMB [Response to: 641510] [Time from request: 0.000041000 seconds] SMB Command: Locking AndX (0x24) NT Status: STATUS_FILE_LOCK_CONFLICT (0xc0000054) Flags: 0x88, Request/Response, Case Sensitivity 1... .... = Request/Response: Message is a response to the client/redirector .0.. .... = Notify: Notify client only on open ..0. .... = Oplocks: OpLock not requested/granted ...0 .... = Canonicalized Pathnames: Pathnames are not canonicalized .... 1... = Case Sensitivity: Path names are caseless .... ..0. = Receive Buffer Posted: Receive buffer has not been posted .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not supported Flags2: 0xc807, Unicode Strings, Error Code Type, Extended Security Negotiation, Security Signatures, Extended Attributes, Long Names Allowed 1... .... .... .... = Unicode Strings: Strings are Unicode .1.. .... .... .... = Error Code Type: Error codes are NT error codes ..0. .... .... .... = Execute-only Reads: Don't permit reads if execute-only ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs .... 1... .... .... = Extended Security Negotiation: Extended security negotiation is supported .... .0.. .... .... = Reparse Path: The request does not use a @GMT reparse path .... .... .0.. .... = Long Names Used: Path names in request are not long file names .... .... ...0 .... = Security Signatures Required: Security signatures are not required .... .... .... 0... = Compressed: Compression is not requested .... .... .... .1.. = Security Signatures: Security signatures are supported .... .... .... ..1. = Extended Attributes: Extended attributes are supported .... .... .... ...1 = Long Names Allowed: Long file names are allowed in the response Process ID High: 0 Signature: 0000000000000000 Reserved: 0000 Tree ID: 10348 Process ID: 65279 User ID: 59639 Multiplex ID: 43073 Locking AndX Response (0x24) [Expert Info (Error/Malformed): Trying to fetch an unsigned integer with length 0] [Trying to fetch an unsigned integer with length 0] [Severity level: Error] [Group: Malformed] [Malformed Packet: SMB] [Expert Info (Error/Malformed): Malformed Packet (Exception occurred)] [Malformed Packet (Exception occurred)] [Severity level: Error] [Group: Malformed] Thanks José, Chile
xBase now unstable slow error Status_Lock_Not_Granted
Friends, hello One more question, did going back to SMB1 really work? because we (with Windows 7 and 10 workstations and with Linux Debian 9 serviudor) have noticed some improvement but we have not been able to really solve it. José, Chile
xBase now unstable slow error Status_Lock_Not_Granted
Friends, and as a temporary solution, dividing the company into groups, and putting users on Windows Server computers (we have 2012) with the ddbb xBase on the same computer, would it no longer require the SMB service? And if so, is it an option, someone has done that? In my case I have always tried to control the locks and unlocks of registers and the recording in the software, in case it is relevant for this. Thank you very much to all. José, Chile
xBase now unstable slow error Status_Lock_Not_Granted
hi, did you still have Problem with DBF Locking <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> i just can talk about Windows Client / Server. M$ have a Reason (WannCry & Co) to close UDP Port 135-139 so it is not recommend to open it for SMB1. --- until XP / Srv2003 we have Drive Letter via Lanmanager with SMB1 since Vista / Win 7 / Srv 2008 UNC-Path is used with SMB2 i guess you using Drive-Letter via Lanmanager to MAP \\Server\ShareName. this is what i have change in my NET_USE.PRG [code=fw:lsv7b8h5]<div class="fw" id="{CB}" style="font-family: monospace;">    <span style="color: #00C800;">IF</span> OS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < WIN_VISTA<br />      USE <span style="color: #000000;">&#40;</span>Driveletter+Path+cDBF<span style="color: #000000;">&#41;</span> ...<br />   <span style="color: #00C800;">ELSE</span><br />      USE <span style="color: #000000;">&#40;</span>UNC-Path+cDBF<span style="color: #000000;">&#41;</span> ...<br />   <span style="color: #00C800;">ENDIF</span><br /> </div>[/code:lsv7b8h5] so get rid of Drive-Letter in your Code and use UNC-Path instead p.s. Registry Tip from Otto are for Lanman[color=#FF0000:lsv7b8h5]Workstation[/color:lsv7b8h5], that is the Client.
xBase now unstable slow error Status_Lock_Not_Granted
not sure if harbour have Problem with it so i like to ask [code=fw:150y8617]<div class="fw" id="{CB}" style="font-family: monospace;">USE \\<span style="color: #00C800;">Server</span>\ShareFolder\Test.DBF<br />COPY <span style="color: #00C800;">FOR</span> <span style="color: #0000ff;">Name</span>=<span style="color: #ff0000;">"ABC"</span> <span style="color: #0000ff;">TO</span> C:\TEMP\WORK.DBF<br /><span style="color: #B900B9;">// Workaround : use SLEEP(1) here</span><br />USE C:\TEMP\WORK.DBF -> Error file not found<br /> </div>[/code:150y8617] Part of this Error is SMB2 Problem [url:150y8617]https&#58;//docs&#46;microsoft&#46;com/en-us/previous-versions/windows/it-pro/windows-7/ff686200(v=ws&#46;10)?redirectedfrom=MSDN[/url:150y8617] but under Xbase++ we also have to disable "internal Cache" [code=fw:150y8617]<div class="fw" id="{CB}" style="font-family: monospace;">   * ------------ COMPONENT_DATA  ------------ *<br />   <span style="color: #B900B9;">// Cache time</span><br />   DbeInfo<span style="color: #000000;">&#40;</span> COMPONENT_DATA, DBFDBE_LIFETIME , <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   ...<br />   DbeInfo<span style="color: #000000;">&#40;</span> COMPONENT_DATA, FOXDBE_LIFETIME , <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span></div>[/code:150y8617] Question : does harbour RDD have a "internal Cache" <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
xBase or Harbour project on Instagram ?
Dear friends, Is there a xBase or the Harbour Project section on Instagram ? thanks
xBielSys trabajando con binarios.
Aunque últimamente no encuentro mucho tiempo para escribir en el blog, aquí os dejo un enlace a la última entrada por si queréis leer algo sobre harbour y manejo de datos binarios. [url:7ry0gofw]http&#58;//bielsys&#46;blogspot&#46;com&#46;es/2015/01/manejando-bits-con-harbour&#46;html[/url:7ry0gofw]
xBlite.prg con xBrowse
Señores, alguien tiene la xBlite.prg (xbackuplite) del master Carlos Vargas con xBrowse? Si es así, usted podría enviarme: <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Gracias, saludos.
xBlite.prg con xBrowse
Hola, Yo uso una versión modificada de ese código, la pongo a continuación [code=fw:3rbgg8qh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xBrowse.ch"</span><br /><br /><span style="color: #00C800;">Function</span> ZipBackup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> cPath    := oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cDbfPath</span><br />   <span style="color: #00C800;">LOCAL</span> aDir     := Directory<span style="color: #000000;">&#40;</span>cPath+<span style="color: #ff0000;">"*.*"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> aFiles   := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">LOCAL</span> aToZip   := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">LOCAL</span> aFooter  := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">LOCAL</span> cZipFile := oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cZipPath</span>+DtoS<span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">".ZIP"</span> + space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br />   <span style="color: #00C800;">LOCAL</span> i<br />   <span style="color: #00C800;">LOCAL</span> oDlg, oLbx, oCol<br />   <span style="color: #00C800;">LOCAL</span> oDlgPro, oSay01, oSay02, oProgress, oBmp<br /><br />   <span style="color: #00C800;">IF</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oDlg</span> != <span style="color: #00C800;">nil</span><br />      <span style="color: #00C800;">IF</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nEdit</span> > <span style="color: #000000;">0</span><br />         msgStop<span style="color: #000000;">&#40;</span> i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"No puede hacer copias de seguridad hasta que no cierre las ventanas abiertas sobre el mantenimiento que está manejando."</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br />      <span style="color: #00C800;">ELSE</span><br />         oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oDlg</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aDir <span style="color: #000000;">&#41;</span><br />      aadd<span style="color: #000000;">&#40;</span> aFiles, <span style="color: #000000;">&#123;</span>aDir<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aDir<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aDir<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />      aadd<span style="color: #000000;">&#40;</span> aToZip, cPath+aDir<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />      aFooter<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := aFooter<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + <span style="color: #000000;">1</span><br />      aFooter<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := aFooter<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> + aDir<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />   <span style="color: #00C800;">NEXT</span><br />   aFiles   := aSort<span style="color: #000000;">&#40;</span>aFiles,,,<span style="color: #000000;">&#123;</span>|x,y| UPPER<span style="color: #000000;">&#40;</span>x<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> < UPPER<span style="color: #000000;">&#40;</span>y<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">OF</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oWndMain</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ZipBackup_"</span>+oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cLanguage</span>  ;<br />      <span style="color: #0000ff;">TITLE</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cAppName</span>+oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cVersion</span> + <span style="color: #ff0000;">" - hacer copia de seguridad"</span><br />   oDlg:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oFont</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cPath   ;<br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg                ;<br />      <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE    ;<br />      <span style="color: #0000ff;">WHEN</span> .F.<br /><br />    oLbx := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />    oLbx:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span>aFiles<span style="color: #000000;">&#41;</span><br />    Ut_BrwRowConfig<span style="color: #000000;">&#40;</span> oLbx <span style="color: #000000;">&#41;</span><br />   oLbx:<span style="color: #000000;">nDataType</span>            := <span style="color: #000000;">1</span> <span style="color: #B900B9;">// array</span><br /><br />   oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>  := i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Fichero"</span><span style="color: #000000;">&#41;</span><br />   oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>   := <span style="color: #000000;">100</span><br /><br />   oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>  := i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Tamaño"</span><span style="color: #000000;">&#41;</span><br />   oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>   := <span style="color: #000000;">100</span><br />    oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">1</span><br />    oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">1</span><br />    <span style="color: #B900B9;">//oLbx:aCols[2]:bStrData := {|| TRAN(aFiles[ oLbx:nAt,2 ]/1000,"@E 999,999,999 ")+" KB" }</span><br /><br />   oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span>  := i18n<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Fecha modificación"</span><span style="color: #000000;">&#41;</span><br />   oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>   := <span style="color: #000000;">100</span><br />    oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">1</span><br />    oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">1</span><br />    <span style="color: #B900B9;">//oLbx:aCols[3]:bStrData := {|| DtoC(aFiles[ oLbx:nAt,3 ]) }</span><br /><br />    oLbx:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">102</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cZipFile   ;<br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span>            ;<br />      <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@!'</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>             ;<br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span>            ;<br />      <span style="color: #0000ff;">ACTION</span> SetFileZip<span style="color: #000000;">&#40;</span>aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cTOOLTIP</span>  := <span style="color: #ff0000;">"seleccionar fichero de destino"</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span>   ;<br />      <span style="color: #0000ff;">ID</span>    IDOK     ;<br />      <span style="color: #0000ff;">OF</span>    oDlg     ;<br />      <span style="color: #0000ff;">ACTION</span>   <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> file<span style="color: #000000;">&#40;</span> cZipFile <span style="color: #000000;">&#41;</span>,;<br />                     <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> msgYesNo<span style="color: #000000;">&#40;</span> i18n<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"El fichero de destino especificado ya exite."</span> <span style="color: #000000;">&#41;</span> + CRLF + CRLF + ;<br />                               i18n<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"¿Desea reemplazarlo?"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span> IDOK <span style="color: #000000;">&#41;</span>, aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">setFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                     oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span> IDOK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span>   ;<br />      <span style="color: #0000ff;">ID</span>    IDCANCEL ;<br />      <span style="color: #0000ff;">OF</span>    oDlg     ;<br />      CANCEL         ;<br />      <span style="color: #0000ff;">ACTION</span>   <span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span> IDCANCEL <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oWndMain</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">IF</span> oDlg:<span style="color: #000000;">nresult</span> == IDOK<br /><br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgPro <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">'UT_PROGRESS_'</span>+oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cLanguage</span><br />        oDlgpro:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oFont</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">REDEFINE</span> BITMAP oBmp <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlgPro <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"APP"</span> TRANSPARENT<br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay01 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Realizando copia de seguridad..."</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">99</span>  <span style="color: #0000ff;">OF</span> oDlgPro<br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay02 <span style="color: #0000ff;">PROMPT</span> space<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span>  <span style="color: #0000ff;">OF</span> oDlgPro<br />      oProgress := TProgress<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">101</span>, oDlgPro <span style="color: #000000;">&#41;</span><br />      oDlgPro:<span style="color: #000000;">bStart</span> := <span style="color: #000000;">&#123;</span> || SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, DoMakeZip<span style="color: #000000;">&#40;</span> oProgress, cZipFile, aToZip, aFooter, oSay02 <span style="color: #000000;">&#41;</span>, oDlgPro:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgPro ;<br />         <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlgPro:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oWndMain</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SetFileZip<span style="color: #000000;">&#40;</span> oGet <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> cFile<br />   <span style="color: #B900B9;">/*solicita el nombre con la unidad destino incluido*/</span><br />   cFile := cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ZipFile | *.zip"</span>, <span style="color: #ff0000;">"Nombre de archivo de copia de seguridad en Disco Duro"</span>, <span style="color: #000000;">1</span>, oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cZipPath</span>, .T., .T. <span style="color: #000000;">&#41;</span><br />   cFile := rtrim<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">/*agrega la extencion ZIP de ser necesario*/</span><br />   <span style="color: #00C800;">IF</span> empty<span style="color: #000000;">&#40;</span> cFileExt<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      cFile += <span style="color: #ff0000;">".zip"</span><br />   <span style="color: #00C800;">ENDIF</span><br />   oGet:<span style="color: #000000;">cText</span> := cFile<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />PROCEDURE DoMakeZip<span style="color: #000000;">&#40;</span> oProgress, cZipFile, aToZip, aFooter, oSay <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> lOkZip      := .F.<br />   <span style="color: #00C800;">LOCAL</span> bOnZipFile  := <span style="color: #000000;">&#123;</span> |cFile, nFile| <span style="color: #000000;">&#40;</span> oProgress:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> nFile <span style="color: #000000;">&#41;</span>,;<br />                                           oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span>cFile,RAT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\"</span>,cFile)+1)),;<br />                                           SysRefresh() ) }<br />   LOCAL nPos     := 0<br /><br />   /*establece limites de valores de control meter*/<br />   oProgress:SetRange( 0, aFooter[1] )<br />   oProgress:SetPos( 0 )<br />   /*realiza la compresion de los ficheros*/<br />   hb_SetDiskZip( {|| NIL } )<br />   lOkZip := hb_ZipFile( cZipFile   ,;<br />                         aToZip     ,;<br />                         9          ,;<br />                         bOnZipFile ,;<br />                         NIL        ,;<br />                         NIL        ,;<br />                         NIL        )<br /><br />    /*verifica proceso e informa al usuario*/<br />    IF lOkZip<br />        MsgInfo("</span>La creación del fichero de copia de seguridad se realizó correctamente.<span style="color: #ff0000;">")<br />    ELSE<br />        MsgStop("</span>La creación del fichero de copia de seguridad falló.<span style="color: #ff0000;">")<br />    ENDIF<br /><br />    hb_gcAll()<br /><br />RETURN<br /><br />/*_____________________________________________________________________________*/<br /><br />Function ZipRestore()<br /><br />   LOCAL cPath    := UPPER(oApp():cDbfPath)<br />   LOCAL aDir     := {}<br />   LOCAL aFiles   := Array(1,3)<br />   LOCAL aToUnZip := {}<br />   LOCAL aFooter  := { 0, 0, "</span><span style="color: #ff0000;">" }<br />   LOCAL cZipFile := "</span><span style="color: #ff0000;">"<br />   LOCAL aGet[4]<br />   LOCAL i<br />   LOCAL oDlg, oLbx, oCol<br />   LOCAL oDlgPro, oSay01, oSay02, oProgress, oBmp<br /><br /><br />   IF oApp():oDlg != nil<br />      IF oApp():nEdit > 0<br />         msgStop( i18n("</span>No puede restaurar copias de seguridad hasta que no cierre las ventanas abiertas sobre el mantenimiento que está manejando.<span style="color: #ff0000;">") )<br />         RETURN nil<br />      ELSE<br />         oApp():oDlg:End()<br />         SysRefresh()<br />      ENDIF<br />   ENDIF<br /><br />   IF LEFT(cPath,1) == '.'<br />      cPath := cFilePath(GetModuleFileName(GetInstance()))+SUBSTR(cPath,2)<br />   ENDIF<br />   FOR i := 1 TO LEN( aDir )<br />      aadd( aFiles, {aDir[i,1],aDir[i,2],aDir[i,3]})<br />      aadd( aToUnzip, cPath+aDir[i,1] )<br />      aFooter[1] := aFooter[1] + 1<br />      aFooter[2] := aFooter[2] + aDir[i,2]<br />   NEXT<br />   aFiles   := aSort(aFiles,,,{|x,y| UPPER(x[1]) < UPPER(y[1])})<br /><br />   DEFINE DIALOG oDlg OF oApp():oWndMain RESOURCE "</span>ZipRestore_<span style="color: #ff0000;">"+oApp():cLanguage;<br />      TITLE oApp():cAppName+oApp():cVersion + "</span> - restaurar copia de seguridad<span style="color: #ff0000;">"<br />   oDlg:oFont  := oApp():oFont<br /><br />   REDEFINE SAY ID 100 OF oDlg<br /><br />   REDEFINE GET aGet[1] VAR cZipFile;<br />      ID 101 OF oDlg UPDATE         ;<br />      PICTURE '@!'<br />   REDEFINE BUTTON aGet[4]             ;<br />      ID 105 OF oDlg UPDATE            ;<br />      ACTION GetFileToUnzip(aGet[1], aFiles, aToUnZip, aFooter, oLbx)<br />   aGet[4]:cTOOLTIP  := "</span>seleccionar fichero con la copia de seguridad<span style="color: #ff0000;">"<br /><br />    oLbx := TXBrowse():New( oDlg )<br />    oLbx:SetArray(aFiles)<br />    Ut_BrwRowConfig( oLbx )<br />   oLbx:nDataType            := 1 // array<br /><br />   oLbx:aCols[1]:cHeader  := i18n("</span>Fichero<span style="color: #ff0000;">")<br />   oLbx:aCols[1]:nWidth   := 100<br /><br />   oLbx:aCols[2]:cHeader  := i18n("</span>Tamaño<span style="color: #ff0000;">")<br />   oLbx:aCols[2]:nWidth   := 100<br />    oLbx:aCols[2]:nDataStrAlign := 1<br />    oLbx:aCols[2]:nHeadStrAlign := 1<br />    //oLbx:aCols[2]:bStrData := {|| TRAN(aFiles[ oLbx:nAt,2 ]/1000,"</span>@E <span style="color: #000000;">999</span>,<span style="color: #000000;">999</span>,<span style="color: #000000;">999</span> <span style="color: #ff0000;">")+"</span> KB<span style="color: #ff0000;">" }<br /><br />   oLbx:aCols[3]:cHeader  := i18n("</span>Fecha modificación<span style="color: #ff0000;">")<br />   oLbx:aCols[3]:nWidth   := 100<br />    oLbx:aCols[3]:nDataStrAlign := 1<br />    oLbx:aCols[3]:nHeadStrAlign := 1<br />    //oLbx:aCols[3]:bStrData := {|| DtoC(aFiles[ oLbx:nAt,3 ]) }<br /><br />    oLbx:CreateFromResource( 102 )<br /><br />   REDEFINE SAY ID 103 OF oDlg<br /><br />   REDEFINE GET aGet[2] VAR cPath   ;<br />      ID 104 OF oDlg                ;<br />      COLOR CLR_BLACK, CLR_WHITE    ;<br />      WHEN .F.<br /><br />   REDEFINE BUTTON   ;<br />      ID    IDOK     ;<br />      OF    oDlg     ;<br />      ACTION   ( oDlg:end( IDOK ) )<br /><br />   REDEFINE BUTTON   ;<br />      ID    IDCANCEL ;<br />      OF    oDlg     ;<br />      CANCEL         ;<br />      ACTION   ( oDlg:end( IDCANCEL ) )<br /><br />   ACTIVATE DIALOG oDlg ;<br />      ON INIT oDlg:Center( oApp():oWndMain )<br /><br />   IF oDlg:nresult == IDOK<br /><br />      DEFINE DIALOG oDlgPro RESOURCE 'UT_PROGRESS_'+oApp():cLanguage<br />        oDlgPro:oFont  := oApp():oFont<br />      REDEFINE BITMAP oBmp ID 111 OF oDlgPro RESOURCE "</span>APP<span style="color: #ff0000;">" TRANSPARENT<br />      REDEFINE SAY oSay01 PROMPT "</span>Restaurando copia de seguridad...<span style="color: #ff0000;">" ID 99  OF oDlgPro<br />      REDEFINE SAY oSay02 PROMPT space(30) ID 100  OF oDlgPro<br />      oProgress := TProgress():Redefine( 101, oDlgPro )<br />      oDlgPro:bStart := { || SysRefresh(), DoMakeUnZip( oProgress, cZipFile, cPath, aFooter, oSay02 ), oDlgPro:End() }<br />      ACTIVATE DIALOG oDlgPro ;<br />         ON INIT oDlgPro:Center( oApp():oWndMain )<br /><br />   ENDIF<br /><br />RETURN NIL<br /><br />PROCEDURE GetFileToUnZip( oGet,aFiles,aToUnZip,aFooter,oLbx )<br />   LOCAL cFile<br />   LOCAL aDir<br />   LOCAL i<br /><br />   /*pide al usuario que seleccione el fichero de respaldo*/<br />   cFile := cGetFile( "</span>ZipFile   | *.zip<span style="color: #ff0000;">", "</span>Nombre de archivo de copia de seguridad a restaurar<span style="color: #ff0000;">", 1, oApp():cZipPath, .f., .t. )<br /><br />   /*verifica si realmente se paso el fichero*/<br />   IF ! empty( cFile )<br /><br />      /*muestra el nombre del fichero en el dialogo*/<br />      oGet:cText := cFile<br /><br />      aDir := hb_GetFilesInZip( cFile, .T. )<br /><br />      /*vereficia el valor retornado por la funcion, si es arreglo y si tiene elementos*/<br />      IF valtype( aDir ) = "</span>A<span style="color: #ff0000;">" .and. len( aDir ) > 0<br />         aFiles   := {}<br />         aToUnzip := {}<br />         aFooter  := { 0, 0, "</span><span style="color: #ff0000;">"}<br />         FOR i := 1 TO LEN( aDir )<br />            aadd( aFiles, {aDir[i,1],aDir[i,2],aDir[i,6]})<br />            aadd( aToUnZip, cFilePath(cFile)+aDir[i,1] )<br />            aFooter[1] := aFooter[1] + 1<br />            aFooter[2] := aFooter[2] + aDir[i,2]<br />         NEXT<br /><br />         aFiles   := aSort(aFiles,,,{|x,y| UPPER(x[1]) < UPPER(y[1])})<br /><br />         /*pasa el arreglo al browse*/<br /><br />         oLbx:bLine  := { || { "</span> <span style="color: #ff0000;">"+cFileName(aFiles[ oLbx:nAt,1 ]) ,;<br />                               TRAN(aFiles[ oLbx:nAt,2 ]/1000,"</span>@E <span style="color: #000000;">999</span>,<span style="color: #000000;">999</span>,<span style="color: #000000;">999</span> <span style="color: #ff0000;">")+"</span> KB<span style="color: #ff0000;">",;<br />                               "</span> <span style="color: #ff0000;">"+DtoC(aFiles[ oLbx:nAt,3 ]) }}<br />         //oLbx:aFooters  := { TRAN(aFooter[1],"</span>@E <span style="color: #000000;">999</span> <span style="color: #ff0000;">")+"</span> ficheros<span style="color: #ff0000;">",TRAN(aFooter[2]/1000,"</span>@E <span style="color: #000000;">999</span>,<span style="color: #000000;">999</span>,<span style="color: #000000;">999</span> <span style="color: #ff0000;">")+"</span> KB<span style="color: #ff0000;">", }<br />         oLbx:SetArray( aFiles )<br />         oLbx:refresh( .T. )<br />         hb_gcAll()<br />      ELSE<br />         MsgStop(i18n("</span>El fichero no es un fichero ZIP válido o parece estar dañado.<span style="color: #ff0000;">"))<br />         RETURN<br />      ENDIF<br />   ENDIF<br />RETURN<br /><br />PROCEDURE DoMakeUnZip( oProgress, cZipFile, cPath, aFooter, oSay )<br />   LOCAL lOkUnZip    := .F.<br />   LOCAL bOnZipFile  := { |cFile, nFile| ( oProgress:SetPos( nFile ),;<br />                                           oSay:SetText(SubStr(cFile,RAT("</span>\<span style="color: #ff0000;">",cFile)+1)),;<br />                                           SysRefresh() ) }<br />   LOCAL nPos     := 0<br />   LOCAL aFiles   := hb_GetFilesInZip( cZipFile )<br /><br />   /*establece limites de valores de control meter*/<br />   oProgress:SetRange( 0, aFooter[1] )<br />   oProgress:SetPos( 0 )<br />   /*realiza la compresion de los ficheros*/<br />   hb_SetDiskZip( {|| NIL } )<br /><br />   lOkUnZip := hb_UnZipFile( cZipFile     ,;<br />                             bOnZipFile   ,;<br />                             .F.          ,;<br />                             NIL          ,;<br />                             cPath        ,;<br />                             aFiles  )<br /><br />    /*verifica proceso e informa al usuario*/<br />    IF lOkUnZip<br />        MsgInfo("</span>La restauración del fichero de copia de seguridad se realizó correctamente.<span style="color: #ff0000;">")<br />    ELSE<br />        MsgStop("</span>La restauración del fichero de copia de seguridad ha fallado.<span style="color: #ff0000;">")<br />    ENDIF<br /><br />    hb_gcAll()<br /><br />RETURN<br /><br /></span></div>[/code:3rbgg8qh] y el código del diálogo es este [code=fw:3rbgg8qh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN<br />ZIPBACKUP_ES <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">240</span>, <span style="color: #000000;">188</span><br /><span style="color: #0000ff;">STYLE</span> DS_3DLOOK | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"ZipBackup"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />    LTEXT           <span style="color: #ff0000;">"Directorio a copiar:"</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">173</span>, <span style="color: #000000;">8</span>, SS_LEFT<br />    EDITTEXT        <span style="color: #000000;">101</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">12</span>, ES_UPPERCASE<br />    CONTROL         <span style="color: #ff0000;">""</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"TxBrowse"</span>, 0x50A10000, <span style="color: #000000;">8</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">92</span><br />    LTEXT           <span style="color: #ff0000;">"Ruta y Fichero ZIP de copia de seguridad:"</span>, <span style="color: #000000;">103</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">134</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">8</span>, SS_LEFT<br />    EDITTEXT        <span style="color: #000000;">104</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">206</span>, <span style="color: #000000;">12</span><br />    PUSHBUTTON      <span style="color: #ff0000;">"..."</span>, <span style="color: #000000;">105</span>, <span style="color: #000000;">218</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">12</span><br />    DEFPUSHBUTTON   <span style="color: #ff0000;">"&Aceptar"</span>, IDOK, <span style="color: #000000;">128</span>, <span style="color: #000000;">164</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br />    PUSHBUTTON      <span style="color: #ff0000;">"&Cancelar"</span>, IDCANCEL, <span style="color: #000000;">182</span>, <span style="color: #000000;">164</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br />    LTEXT           <span style="color: #ff0000;">"01"</span>, IDC_STATIC, <span style="color: #000000;">8</span>, <span style="color: #000000;">160</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">1</span>, SS_LEFT | SS_SUNKEN<br /><span style="color: #000000;">&#125;</span><br /><br /><br />LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN<br />ZIPRESTORE_ES <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">240</span>, <span style="color: #000000;">188</span><br /><span style="color: #0000ff;">STYLE</span> DS_3DLOOK | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"ZipBackup"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />    LTEXT           <span style="color: #ff0000;">"Fichero ZIP con la copia de seguridad:"</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">173</span>, <span style="color: #000000;">8</span>, SS_LEFT<br />    EDITTEXT        <span style="color: #000000;">101</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">206</span>, <span style="color: #000000;">12</span>, ES_AUTOHSCROLL<br />    PUSHBUTTON      <span style="color: #ff0000;">"..."</span>, <span style="color: #000000;">105</span>, <span style="color: #000000;">218</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">14</span>, <span style="color: #000000;">12</span><br />    CONTROL         <span style="color: #ff0000;">""</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"TxBrowse"</span>, 0x50A10000, <span style="color: #000000;">8</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">92</span><br />    LTEXT           <span style="color: #ff0000;">"Directorio de destino de los datos:"</span>, <span style="color: #000000;">103</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">134</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">8</span>, SS_LEFT<br />    EDITTEXT        <span style="color: #000000;">104</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">12</span>, ES_READONLY<br />    DEFPUSHBUTTON   <span style="color: #ff0000;">"&Aceptar"</span>, IDOK, <span style="color: #000000;">128</span>, <span style="color: #000000;">164</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br />    PUSHBUTTON      <span style="color: #ff0000;">"&Cancelar"</span>, IDCANCEL, <span style="color: #000000;">182</span>, <span style="color: #000000;">164</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br />    LTEXT           <span style="color: #ff0000;">"01"</span>, IDC_STATIC, <span style="color: #000000;">8</span>, <span style="color: #000000;">160</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">1</span>, SS_LEFT | SS_SUNKEN<br /><span style="color: #000000;">&#125;</span><br /><br />Saludos,<br /> </div>[/code:3rbgg8qh]
xBlite.prg con xBrowse
Gracias José, me genera estos errores: [code=fw:1v2w3c0g]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_OAPP'</span> referenced <span style="color: #0000ff;">from</span> C:\FWH1701\SAMPLES\XBL<br />ITE.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_UT_BRWROWCONFIG'</span> referenced <span style="color: #0000ff;">from</span> C:\FWH1701\<br />SAMPLES\XBLITE.OBJ<br />&nbsp;</div>[/code:1v2w3c0g] Saludos.
xBlite.prg con xBrowse
Hi, oApp() is a function that return an object where I store all the configuration of my applications. And Ut_brwrowconfig is a function to customize the browses. You can delete the calls them without any problem. Regards,
xBlite.prg con xBrowse
José En que librería estás estas funciones: Error: Unresolved external '_HB_FUN_HB_SETDISKZIP' referenced from D:\SISTEMAS\ACRSOFT\OK\OBJ\ACR.OBJ Error: Unresolved external '_HB_FUN_HB_ZIPFILE' referenced from D:\SISTEMAS\ACRSOFT\OK\OBJ\ACR.OBJ Error: Unresolved external '_HB_FUN_HB_GETFILESINZIP' referenced from D:\SISTEMAS\ACRSOFT\OK\OBJ\ACR.OBJ Error: Unresolved external '_HB_FUN_HB_UNZIPFILE' referenced from D:\SISTEMAS\ACRSOFT\OK\OBJ\ACR.OBJ Gracias,
xBlite.prg con xBrowse
Adhemar: [code=fw:221k66u0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib %fwh%\lib\libmysql.lib + >> b32.bc<br />echo %hdirl%\rtl.lib + >> b32.bc<br />echo %hdirl%\vm.lib + >> b32.bc<br />echo %hdirl%\%GT%.lib + >> b32.bc<br />echo %hdirl%\lang.lib + >> b32.bc<br />echo %hdirl%\macro.lib + >> b32.bc<br />echo %hdirl%\rdd.lib + >> b32.bc<br />echo %hdirl%\dbfntx.lib + >> b32.bc<br />echo %hdirl%\dbfcdx.lib + >> b32.bc<br />echo %hdirl%\dbffpt.lib + >> b32.bc<br />echo %hdirl%\hbsix.lib + >> b32.bc<br />echo %hdirl%\debug.lib + >> b32.bc<br />echo %hdirl%\common.lib + >> b32.bc<br />echo %hdirl%\codepage.lib + >> b32.bc<br />echo %hdirl%\pp.lib + >> b32.bc<br />echo %hdirl%\pcrepos.lib + >> b32.bc<br />echo %hdirl%\ct.lib + >> b32.bc<br />echo %hdirl%\zlib.lib + >> b32.bc<br />echo %hdirl%\hbzip.lib + >> b32.bc<br />echo %hdirl%\libmisc.lib + >> b32.bc<br />echo %hdirl%\tip.lib + >> b32.bc<br />rem echo %hdirl%\png.lib + >> b32.bc<br /><br />rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />rem echo %hdir%\lib\rddads.lib + >> b32.bc<br />rem echo %hdir%\lib\Ace32.lib + >> b32.bc<br /><br />echo %bcdir%\lib\cw32.lib + >> b32.bc<br />echo %bcdir%\lib\import32.lib + >> b32.bc<br />echo %bcdir%\lib\uuid.lib + >> b32.bc<br />echo %bcdir%\lib\ws2_32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\psapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\gdiplus.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\shell32.lib, >> b32.bc<br />&nbsp;</div>[/code:221k66u0] Saludos
xBlite.prg con xBrowse
Adhemar, mira este porfa: [url:1ngltuvi]https&#58;//code&#46;google&#46;com/archive/p/fuentes-javier-lloris/downloads[/url:1ngltuvi] Saludos.
xBlite.prg con xBrowse
Haciendo pruebas con xHarbour para BCC7.2 y FWHX17.01: [url:14q3mn6h]http&#58;//i&#46;imgur&#46;com/FNn6ReH&#46;png[/url:14q3mn6h] [img:14q3mn6h]http&#58;//i&#46;imgur&#46;com/FNn6ReH&#46;png[/img:14q3mn6h] Saludos.
xBlite.prg con xBrowse
Download disponible con fuentes y executable: [url:3jakxxsf]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/viewtopic&#46;php?f=2&t=8731&p=114846#p114846[/url:3jakxxsf] Porfa, mantener el nombre del autor. Regards, saludos.
xBrouse with SQRDD+Firebir
friends who can help me, I'm using 11.4 and FWH xharbour1.21 sqlrdd + + firebird I'm having the following problem: ride browse through the code below, to receive the focus browse duplicates the first record, not showing the table data properly. I tried everything and nothing. with more normal work with dbf sql sqrdd used commercial and firebird. records to focus on Rebecca xbrowse duplicate the first, and then clicking the first row. qo xbrowse the first time and shown the same thing happens. if they can help me, following my code below: dbUseArea( .T., “SQLRDD”, “CONSULTA” ) REDEFINE xBrowse oBrwBuscaItem ID 4002 OF oDlgBuscaItem UPDATE ALIAS "CONSULTA" oCol:= oBrwBuscaItem:AddCol() oCol:cHeader := "Produto" oCol:bStrData := {|| CONSULTA->DESCRICAO } oCol:bRClickData := {|r,c,f,o| Msginfo("Right click on column data " + o:cHeader, "TXBrowse power") } oCol:nWidth:=360 oCol:= oBrwBuscaItem:AddCol() oCol:cHeader := "Unitário" oCol:bStrData := {|| TRANSFORM( CONSULTA->PRVENDA, "@E 99,999.99" ) } oCol:bRClickData := {|r,c,f,o| Msginfo("Right click on column data " + o:cHeader, "TXBrowse power") } oCol:nWidth:=150 PRODUTOS->( oBrwBuscaItem:SetRDD() ) // not working oBrwBuscaItem:Refresh( .T.) // not working
xBrouse with SQRDD+Firebir
HI: I USE xHarbour 1.2x+SQLRDD+fwh . Xbrowse Work fine in MYSQL or PostgeSQL. try: oDlg:oClient := oBrwBuscaItem oBrwBuscaItem:Refresh() -- Best Regards ------------------- kokoo KAO
xBrouse with SQRDD+Firebir
the problem is that when displaying the dialog in xbrowse it's an automatic refresh, doubling the first line of data to browse. and how to use the posted dbusearea dbf to work well, but with the firebird me this problem occurs, and sometimes it shows more correct when you select the first line of xbrowse it's an automatic refresh and duplicates the first row. if the table has 10 record and the first record is for example "Hansel and Gretel, " and he takes that first equal on all lines generating 10 equal lines, which should not occur if you have a solution thanks.
xBrouse with SQRDD+Firebir
Please try this simple code and let us know if this works. Please also post a screen shot. [code=fw:1yuw9p7b]<div class="fw" id="{CB}" style="font-family: monospace;">XbrNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"E"</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />dbUseArea<span style="color: #000000;">&#40;</span> .T., “SQLRDD”, “CONSULTA” <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBrowse</span> oBrwBuscaItem <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4002</span> <span style="color: #0000ff;">OF</span> oDlgBuscaItem ;<br />COLUMNS <span style="color: #ff0000;">"DESCRICAO"</span>, <span style="color: #ff0000;">"PRVENDA"</span> ;<br />HEADERS <span style="color: #ff0000;">"Produto"</span>, <span style="color: #ff0000;">"Unitario"</span> ;<br />SIZES <span style="color: #000000;">360</span>, <span style="color: #000000;">150</span> ;<br /><span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CONSULTA"</span> CELL LINES<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgBuscaItem  <br />&nbsp;</div>[/code:1yuw9p7b] Please also do not add any other code for xbrowse now. Please also let us know if the following functions work in SQLRDD or not 1. OrdKeyCount() 2. OrdKeyGoTo() 3. OrdKeyPos() If these functions do not work like in DBFCDX, we need to change the navigation codeblocks.
xBrouse with SQRDD+Firebir
The problem that the first ride with the xbrowse dbusearea simple as below. ride all normal columns. need to do more then a select on the table, and the alias is returned by the function which returns at a lower dbusearea data with select. ie when I run this function, alas, while the parameters to sql instruncao, and alias that is returned by the instruction. and the return went like: minhatabeladobrowse-> (oxbrowse: SetRDD ()), for xbrowse pull data. I always that way more duplicates the first line, that pesquisasql function is to assemble the sql instruncoes research, which always returns an alias to returns, and these need to go back Pro User xbrowse and choose the data he wants. more than doubles the first-ever dbUseArea( .F.,"SQLRDD", "CONSULTA" ) REDEFINE XBROWSE OBRW ALIAS "CONSULTA" REDEFINE BUTTOM BTN ACTION( PesquisaSql("SELECT * FROM CONSULTA", "CONSULTA"), CONSULTA->( OBRW:SETRDD() ) // FUNCTION PesquisaSql(cString, cAlias) LOCAL aTables:={} LOCAL cSql:="", nErr, nPos, apCode, oSql oSql := SR_GetConnection() cSql := ALLTRIM(cString) apCode := SR_SQLParse( cSql, @nErr, @nPos ) nErr := oSql:exec( SR_SQLCodeGen( apCode, oSql:nSystemID ) ) IF nErr != 0 MsgStop("Erro ao executar o script :"+ CRLF + cString + CRLF + "Codigo Retornado : " + STR(nErr) ) RETURN( .F. ) ELSEIF nErr == 0 IF SELECT( (cAlias) ) > 0 (cAlias)->( DBCLOSEAREA() ) ENDIF dbUseArea( .F.,"SQLRDD",cSql, (cAlias) ) RETURN( .T. ) ENDIF RETURN( .T. )
xBrouse with SQRDD+Firebir
SOLVED!!
xBrowse
Hallo alle zusammen, Frage: Wer von Euch setzt auch xBrowse (FWH) ein. Ich hab damit ein Problem bei dem ich nicht recht weiterkomme. Ich habe MS-SQL Daten und möchte die im xBrowse in einem MDI Fenster anzeigen. Soweit so gut - funktioniert auch. Wenn allerdings wegen eines Filters keine Daten gefunden werden, wird der xBrowse nicht korrekt aufgebaut und zerhackstückelt. Hatte jemand von Euch auch schonmal das Problem und weiss da Abhilfe ? Viele Grüße, Norbert Beispiel 1 (ok. Datensätze wurden gefunden) [img:1lphz0vj]http&#58;//www&#46;alphasoft&#46;de/test/good&#46;jpg[/img:1lphz0vj] Beispiel 1 (fehlerhaft. Keine Datensätze oder Datenbank leer) [img:1lphz0vj]http&#58;//www&#46;alphasoft&#46;de/test/bad&#46;jpg[/img:1lphz0vj]
xBrowse
Dear friends, i' m using FWH 2.7 and get an error [code:1cou85jb]Unresolved external '_HB_FUN_TXBROWSE'[/code:1cou85jb] when building an app with a TXBrowse. Do i have to link an additional file to my app? Regards, Detlef
xBrowse
Detlef, Have you rebuilt the FWH PRG library yourself ? If yes, then maybe you missed to include it
xBrowse
Antonio, i really forgot that i did rebuilt the FWH PRG library myself.<!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Now it's working. Sorry for troubling you. Detlef
xBrowse
Detlef, You are welcome, glad to know you solved it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse
tengo un xbrowse en una ventana y no se porque capturando el metodo bkeydown me ejecuta el resultado 2 veces, es decir: [code:1mnrqyl6] &#46;&#46;&#46; &#46;&#46;&#46; &#58;&#58;oBrowse&#58;bKeydown&#58;=&#123;|nkey|press_on_browse&#40;nKey,self&#41;&#125; &#46;&#46;&#46; &#46;&#46;&#46; function press_on_browse&#40;nKey,self&#41; do case case nkey = VK_F2 &#46;and&#46; &#58;&#58;lInsertButton &#58;&#58;lInsertMode&#58;=&#46;t&#46; &#58;&#58;lModifyMode&#58;=&#46;f&#46; &#58;&#58;Insert&#40;&#41; case nkey = VK_F3 &#46;and&#46; &#58;&#58;lModifyButton &#58;&#58;lInsertMode&#58;=&#46;f&#46; &#58;&#58;lModifyMode&#58;=&#46;t&#46; &#58;&#58;Modify&#40;&#41; case nkey = VK_F4 &#46;and&#46; &#58;&#58;lDeleteButton &#58;&#58;Delete&#40;&#41; case nkey = VK_F5 &#46;and&#46; &#58;&#58;lSearchButton &#58;&#58;Search&#40;&#41; case nkey = VK_F6 &#46;and&#46; &#58;&#58;lListButton &#58;&#58;List&#40;&#41; case nkey = VK_ESCAPE &#58;&#58;Destroy&#40;&#41; end case return [/code:1mnrqyl6] con este código, si pulso sobre F2 entra 2 veces en Insert() ¿Que puede ser? Muchas Gracias Foro!!
xBrowse
Mike, En la Clase TXBrowse realiza esta modificación: [code:1qogyjv1] METHOD KeyDown&#40; nKey, nFlags &#41; CLASS TXBrowse if &#58;&#58;bKeyDown != nil Eval&#40; &#58;&#58;bKeyDown, nKey, nFlags &#41; return nil endif &#46;&#46;&#46; [/code:1qogyjv1]
xBrowse
Mike, Mejor, preferiblemente, elimina esas líneas: [code:hhpx4gy4] if &#58;&#58;bKeyDown != nil Eval&#40; &#58;&#58;bKeyDown, nKey, nFlags &#41; endif [/code:hhpx4gy4]
xBrowse
Funcionó correctamente, Gracias Antonio <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xBrowse
Hola Amigos. Estoy peleándome desde hace algún tiempo con el xBrowse Tengo un ejemplo bastante sencillo de una entrada de datos común para hacer mantenimiento a un archivo de Presupuestos mensuales con total acumulado. Para el ejemplo, tipeo en la cuenta cualquier dígito y en la rutina de “Co130ChCta” lleno el array “tPre” con el último dígito de la cuenta para el 1er mes y lo incremento para los sucesivos, pero ya el Refresh() de la línea 100 no la hace. Y todo aparece en cero. Luego digito un”2” en row 1 col 2 y entra a la rutina “Co130ChMen” de validación mensual con el “2” digitado y tampoco hace el Refresh() de la línea 121 y luego entra otra vez (solito) a la misma rutina “Co130ChMen” pero con el dato “1” original. Como que no actualiza el array tPre con lo digitado???? Y después de esto entra otra vez (solito) a la función “Co130ChCta” donde carga los datos iniciales... No sé qué me falta o lo que hago mal Pongo la rutina por si acaso alguien me ayuda /////////////////////////////////////////////////////////////// extern DbfCdx #include "FiveWin.ch" #include "XBrowse.ch" Function Main() //CO130() // Mantenimiento al Maestro de Presupuestos PROG1="CO130" priv oDlg,oFnt priv oCta,oSCta priv wCta:=0 priv oBrw,oBtnEsc,oBtnF1,oBtnF2 priv tPre:={} for x=1 to 12 aadd(tpre,{str(x,2),0,0}) next DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 0, -12 DEFINE DIALOG oDlg TITLE "CO130 Archivo de Presupuestos" ; FONT oFnt FROM 3,25 to 30,75 @01,02 SAY oSCta VAR "Cuenta" OF oDlg @01.3,05 GET oCta VAR wCta OF oDlg PICTURE "@R 999-99" SIZE 22,8 ; VALID CO130ChCta (wCta) oCta:bGotFocus={||oCta:SelectAll()} WITH OBJECT (oBrw := TXBrowse():New( oDlg ) ) :SetArray(tPre) WITH OBJECT :aCols[1] :cHeader:= "Periodo" :nWidth:= 50 END WITH OBJECT :aCols[2] :cHeader:="Presupuesto" :nHeadStrAlign:=AL_RIGHT :cEditPicture:="99999,999,999.99" :bClrEdit:=oBrw:bClrStd :bOnPostEdit:={|o,x| tPre[oBrw:nArrayAt,2]:=x } :nEditType:=EDIT_GET :bEditValid:={|| Co130ChMen()} :nWidth:= 65 :nDataStrAlign:=AL_RIGHT END WITH OBJECT :aCols[3] :cHeader:="Total" :nHeadStrAlign:=AL_RIGHT :cEditPicture:="99999,999,999.99" :nEditType:=EDIT_NONE :nWidth:= 65 :nDataStrAlign:=AL_RIGHT END :nMarqueeStyle := MARQSTYLE_HIGHLCELL :nColDividerStyle := LINESTYLE_BLACK :nRowDividerStyle := LINESTYLE_BLACK :nTop:=55 :nLeft:=50 :nBottom:=175 //nWidth=150 :nRight:=160 //nHeight=200 :nFreeze:=1 :lHScroll:=.f. :lVScroll:=.f. :lFastEdit:=.t. :CreateFromCode() END oDlg:oClient:=oBrw @10,21 BUTTON oBtnF2 PROMPT "F2 - GRABAR" SIZE 40,12 OF oDlg ; Action (CO130Bor(),oCta:setfocus()) @10,03 BUTTON oBtnEsc PROMPT "Esc - Salir" SIZE 40,12 OF oDlg ; Action (oDlg:End()) ACTIVATE DIALOG oDlg ; ON INIT ( Co130Bor()) oFnt:end() return nil // /////////////////////////////// // FUNCTION Co130ChCta(wCta) // validar Cuenta ?"ChCta 88" priv res:=val(substr(str(wCTA,5),5,1)) // toma el ultimo digito de wCta priv TotPres:=0 tPre:={} for x=1 to 12 TOTPRES:=TOTPRES+(Res*x) // ultimo digito * mes Aadd(tPre,{str(x,2),Res*x, TotPres}) next // mes mensual acumulado ?"ChCta 96",tPre[12,1],tPre[12,2],tPre[12,3] // tPre con datos correctos oBrw:show() sysRefresh() oBrw:refresh() // linea 100: no hace Refresh(), cols 2 y 3 aparecen en Cero oBrw:goTop() oBrw:nRowSel:=1 oBrw:nColSel:=2 oBrw:setfocus() oCta:oJump():=oBrw RETURN .t. // ///////////////// // Function CO130ChMen() && Val Mensual - actualizar 3ra col - Acumulados priv lin:=oBrw:nArrayAt ?"113 ChMen","Lin",oBrw:nArrayAt,"Col",tPre[oBrw:nArrayAt,2],"Dato",tPre[lin,2] priv TotPres:= x:= 0 for x=1 to 12 TOTPRES:=TOTPRES+tPre[x,2] tPre[x,3]:=TOTPRES ?"118",x,tpre[x,2],tPre[x,3] next oBrw:refresh() // Linea 121. tampoco hace este Refresh() oBrw:goTop() oBrw:nRowSel:=oBrw:nArrayAt+1 // ir a sgte linea *oBrw:goDown() oBrw:nColSel:=2 ?"126 ChMen","Lin",oBrw:nArrayAt,"Col",tPre[oBrw:nArrayAt,2] *oBrw:oJump:=oBrw oBrw:setfocus() return .t. // ////////////////////////////////////// // function CO130Bor() // Borrar wCta:=0 oCta:refresh() *tPre:={} oBrw:refresh() oBrw:hide() return .t. * //////////////////////////////////// o tal vez alguien tenga alguna rutina básica similar a lo que deseo hacer Muchas gracias de antemano Jorge Vargas
xBrowse
Jorge, cuando cambia el array tPre no cambia el contenido del xBrowse. El buffer de array de xBrowse es oBrw:aArrayData, tienes que hacer 1 de estas 2 cosas: - Asigne el buffer del campo editado a oBrw:aArrayData - Atualice el contenido de oBrw:aArrayData despues de edicion de las celdas Puedes hacer: [code:1vkgkqtf] &#58;bOnPostEdit&#58;=&#123;|o,x| oBrw&#58;aArrayData&#91;oBrw&#58;nArrayAt,2&#93;&#58;=x &#125; [/code:1vkgkqtf] O: [code:1vkgkqtf] &#58;bOnPostEdit&#58;=&#123;|o,x| tPre&#91;oBrw&#58;nArrayAt,2&#93;&#58;=x, oBrw&#58;aArrayData &#58;= aClone&#40;tPre&#41; &#125; [/code:1vkgkqtf] En estos ejemplos yo he passado directamente en el codeblock de bOnPostEdit, pero puedes añadir la atualizacion de oBrw:aArrayData en mejores locales de las functions Co130ChCta, Co130ChMen etc Tal vez tenga que refrescar la celda con oBrw:Refresh() despues de la edicion... Espero que te sirva (e compreendas mi "portuñol") Saludos de Brasil Maurilio
xBrowse
Hola Maurilio Muchas gracias por tu ayuda. Tu Portuñol es igualito a mi Español. Actualicé el oBrw:aArrayData antes de hacer los Refresh() y funciona perfecto cuando hago el seguimiento. Pero todavía tengo el problema que después de entrar a la rutina Co130ChMen por el bEditValid, entra otra vez a esta misma rutina aunque le he quitado las líneas que mueven el cursor un Row mas abajo del oBrw y después de esto (lo que es peor) hace automáticamente la rutina Co130ChCta donde carga los datos iniciales. Gracias otra vez por tu ayuda Jorge Vargas
xBrowse
Hola Amigos. nadie tiene un ejemplo sencillo de entrada de datos en xBrowse cambiando de casilla por programa? Gracias J. vargas
xBrowse
Amigos: Como hago para mostrar 3 campos por linea. Tengo una BD de 9 campos y quiero mostrarlos de a 3 o sea 3 celdas de 3 campos (son de diferente tipo) Muchas gracias. Ruben Fernandez.
xBrowse
Amigos: El For ... Next no me funciona Debo cargar los campos sin saber el nombre de ellos, por eso lo averiguo con Fieldname. Muchas gracias. oBrw := TXBrowse():New( oDlg ) oCol:=oBrw:AddCol() oCol:cHeader:= "Mesa" +CRLF+"Apertura"+"" oCol:bStrData:= {|| DToC((basedato)->sesi)+CRLF+(basedato)->MESA_1+CRLF+(basedato)->MESA_2 } nfor:=4 nSigue:=4 nCampito1:="" nCampito2:="" nCampito3:="" nImporte1:=0 nImporte2:=0 nImporte3:=0 for nFor := 4 to 9 oCol:=oBrw:AddCol() oCol:cHeader:= "Hora:"+CRLF+SubStr(FieldName(NFOR),2,2 ) nCampito1 := (basedato)->(FieldName(NFOR) ) nCampito2 := (basedato)->(FieldName(NFOR+1) ) nCampito3 := (dasedato)->(FieldName(NFOR+2) ) nImporte1:=Transform((basedato)->(FIELDGET(FieldPos(nCampito1))),"9999999,99") nImporte2:=Transform((basedato)->(FIELDGET(FieldPos(nCampito2))),"9999999,99") nImporte3:=Transform((basedato)->(FIELDGET(FieldPos(nCampito3))),"9999999,99") oCol:bStrData:= {|| str(nImporte1)+CRLF+str(nImporte2)+CRLF+str(nImporte3) } oCol:nWidth:= 120 NFOR+=2 next oBrw:CreateFromResource( 110 ) oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL oBrw:nColDividerStyle := LINESTYLE_BLACK oBrw:nRowDividerStyle := LINESTYLE_BLACK oBrw:lColDividerComplete := .t. oBrw:nHeaderLines := 3 oBrw:nFooterLines := 1 oBrw:nDataLines := 3 oBrw:lFooter := .t. oBrw:SetRDD() oBrw:GoTop() oBrw:Refresh(.t.) Muchas gracias nuevamente.
xBrowse
Today I tried for the first time the FWH own xBrowse. A great piece of software. Regards, Otto
xBrowse
Yes. I love xbrowse. Though I have a short wishlist
xBrowse
All our browses changed into xbrowse since 2003 . This our modifyed xbrowse: [img:yxh56pi3]http&#58;//www&#46;xtech&#46;com&#46;cn/down/xbrowse&#46;jpg[/img:yxh56pi3] [img:yxh56pi3]http&#58;//www&#46;xtech&#46;com&#46;cn/down/xbrowse2&#46;jpg[/img:yxh56pi3] Shuming Wang
xBrowse
Nice Almost all my browses are also on xbrowse. But I wish someone makses an improvement to provide grouped headers like in tsbrowse
xBrowse
Necesito que me ayuden con esto con este ejemplo trabaja bien el xbrowse con AdoBase y MySql[code:28mcxlj4] #include "FiveWin&#46;ch" #include "xBrowse&#46;ch" STATIC oWnd //------------------------------------------------------------------------------------- Function Main&#40;&#41; SET EPOCH TO 1920 SET DATE FORMAT "dd/mm/yyyy" SET WRAP ON REQUEST DBFCDX If !Conectar&#40;&#41; Return Nil Endif maestro&#40;&#41; Return Nil //----------------------------------------------------------------------------- Function conectar&#40;&#41; Local Retorno&#58;=&#46;F&#46; LOCAL oErr,oCs Public oCn TRY oCn&#58;= CreateObject&#40; "ADODB&#46;Connection" &#41; oCs&#58;= "DRIVER=&#123;MySQL ODBC 3&#46;51 Driver&#125;; SERVER=localhost; DATABASE=ecst06; UID=root; PWD=10157763" oCn&#58;Open&#40;oCs&#41; Retorno&#58;=&#46;T&#46; CATCH oErr MSGAlert&#40; "Error&#58; " + oErr&#58;Operation + " -> " + oErr&#58;Description &#41; Retorno&#58;=&#46;F&#46; END Return Retorno Function maestro&#40;&#41; local oBrw Local cSelect&#58;= "select maestro&#46;FECASI, maestro&#46;ASIENTO, maestro&#46;DESCASI, maestro&#46;TOTDEB, maestro&#46;TOTHAB from maestro" oDbDet&#58;=TAdoBase&#40;&#41;&#58;New&#40; oCn, "maestro", cSelect &#41; DEFINE WINDOW oWnd FROM 1, 1 TO 700,950 PIXEL TITLE "prueba adobase" oBrw &#58;= TXBrowse&#40;&#41;&#58;New&#40; oWnd &#41; oBrw&#58;nTop &#58;= 20 oBrw&#58;nLeft &#58;= 10 oBrw&#58;nBottom &#58;= 650 oBrw&#58;nRight &#58;= 900 oBrw&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nHeaderLines &#58;= 2 oBrw&#58;nFooterLines &#58;= 2 oBrw&#58;nDataLines &#58;= 1 oBrw&#58;lColDividerComplete &#58;= &#46;T&#46; oBrw&#58;lFooter &#58;= &#46;t&#46; oBrw&#58;cToolTip = "Este es el poder del xBrowser de fwh" oBrw&#58;SetAdo&#40;oDbDet&#58;oRcs&#41; oBrw&#58;CreateFromCode&#40;&#41; ACTIVATE WINDOW oWnd oDbDet&#58;Close&#40;&#41; RETURN NIL &#91;quote&#93; Como hago para indicarle cuales son las columnas que quiero es decir &#91;/quote&#93; [/code:28mcxlj4]include "Report.ch"#include "FiveWin.ch"#include "xBrowse.ch"STATIC oWnd//-------------------------------------------------------------------------------------Function Main()SET EPOCH TO 1920SET DATE FORMAT "dd/mm/yyyy"SET WRAP ONREQUEST DBFCDXIf !Conectar() Return NilEndifmaestro()Return Nil//-----------------------------------------------------------------------------Function conectar() Local Retorno:=.F. LOCAL oErr,oCs Public oCn TRY oCn:= CreateObject( "ADODB.Connection" ) oCs:= "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=ecst06; UID=root; PWD=10157763" oCn:Open(oCs) Retorno:=.T. CATCH oErr MSGAlert( "Error: " + oErr:Operation + " -> " + oErr:Description ) Retorno:=.F. END Return RetornoFunction maestro() local oBrw Local cSelect:= "select maestro.FECASI, maestro.ASIENTO, maestro.DESCASI, maestro.TOTDEB, maestro.TOTHAB from maestro" oDbDet:=TAdoBase():New( oCn, "maestro", cSelect ) DEFINE WINDOW oWnd FROM 1, 1 TO 700,950 PIXEL TITLE "prueba adobase" oBrw := TXBrowse():New( oWnd ) oBrw:nTop := 20 oBrw:nLeft := 10 oBrw:nBottom := 650 oBrw:nRight := 900 oBrw:nColDividerStyle := LINESTYLE_BLACK oBrw:nRowDividerStyle := LINESTYLE_BLACK oBrw:nHeaderLines := 2 oBrw:nFooterLines := 2 oBrw:nDataLines := 1 oBrw:lColDividerComplete := .T. oBrw:lFooter := .t. oBrw:AddCol():bEditValue := { || oDbDet:fecasi } oBrw:AddCol():bEditValue := { || oDbDet:asiento } oBrw:AddCol():bEditValue := { || oDbDet:descasi } oBrw:AddCol():bEditValue := { || oDbDet:totdeb } oBrw:AddCol():bEditValue := { || oDbDet:tothab } oBrw:cToolTip = "Este es el poder del xBrowser de fwh" oBrw:SetAdo(oDbDet:oRcs) oBrw:CreateFromCode() ACTIVATE WINDOW oWnd oDbDet:Close()RETURN NIL [quote:28mcxlj4] Este codigo trabaja bien con DBF pero con MySql y Ado, me repite siempre los valores del primer registre en todo el Browse[/quote:28mcxlj4]
xBrowse
pero exactamente en que es lo que quieres ayuda?
xBrowse
Holael xbrowse o browseme muestra todos los campos de la base de datospero si yo quiero que solo me muestre 4 campos en el caso de utilizar xbrowse con DBF lo hago de la siguiente forma y trabaja bien[/code]oBrw:AddCol():bEditValue := { || fecasi } oBrw:AddCol():bEditValue := { || asiento } oBrw:AddCol():bEditValue := { || descasi } oBrw:AddCol():bEditValue := { || totdeb } [code:5ohw1iof] pero cuando hago lo mismo con MySql y Ado solo me muestra repetidas veces los valores del primer registro y no es problema de conexion de base de datos ni nada por que al quitarle y dejar que el xbrowse lo haga solo lo hace bien si agregarle el codigo antes mencionado [/code:5ohw1iof]
xBrowse
ya con adobase de Adolfo y xBrowse de Fivewin puedo visualizar en una base de datos MySql los campos que quiera Gracias de todas formas
xBrowse
Hola Amigos:Estoy poniendo los xBrowse en vez de los ListBox y he creado este sencillo ejemplo: oBrw := TxBrowse():New( oDlgw ) oBrw:nHeaderLines := 1 oBrw:lAllowColSwapping :=.F. oBrw:nColSel := 1 oBrw:nRowHeight := 18 oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW oBrw:nColDividerStyle := LINESTYLE_BLACK oBrw:lColDividerComplete := .t. oBrw:lHScroll := .f. oBrw:lFooter := .t. oBrw:nHeight = 260 oBrw:nWidth = 800 oBrw:bClrStd := { ||{RGB ( 0, 0, 0), IIF( ( oBrw:cAlias )->( OrdKeyNo() ) %2 == 0,RGB (205,205,255),RGB (255,255,255) ) }} oCol := oBrw:AddCol() oCol:cHeader := "Número" oCol:bStrData := { || str(trabajad->n_libro,7,0) } oCol:nWidth := 98 oCol:nDataStrAlign:= AL_RIGHT oCol:nHeadStrAlign:= AL_RIGHT oCol:lAllowSizing :=.F. oCol := oBrw:AddCol() oCol:cHeader := "Nombre" oCol:bStrData := { || trabajad->nombre } oCol:nWidth := 300 oCol:nDataStrAlign:= AL_LEFT oCol:nHeadStrAlign:= AL_LEFT oCol:lAllowSizing :=.F. oCol := oBrw:AddCol() oCol:cHeader := "N.I.F." oCol:bStrData := { || trabajad->nif } oCol:nWidth := 120 oCol:nDataStrAlign:= AL_LEFT oCol:nHeadStrAlign:= AL_LEFT oCol:lAllowSizing :=.F. oCol := oBrw:AddCol() oCol:cHeader := "Dirección" oCol:bStrData := { || trabajad->sigla + " " + trim(trabajad->via_pub) + " " + trim(trabajad->numero) } oCol:nWidth := 300 oCol:nDataStrAlign:= AL_LEFT oCol:nHeadStrAlign:= AL_LEFT oCol:lAllowSizing :=.F. oCol := oBrw:AddCol() oCol:cHeader := "Teléfono" oCol:bStrData := { || trabajad->telefono } oCol:nWidth := 96 oCol:nDataStrAlign:= AL_LEFT oCol:nHeadStrAlign:= AL_LEFT oCol:lAllowSizing :=.F. oBrw:SetRdd() oBrw:CreateFromCode ( )Tengo el problema de no saber como dimensionar el xBrowse ya que aunque le pongo : oBrw:nHeight = 260 oBrw:nWidth = 800Noo me hace caso y siempre me pone un cuadrado , y siempre en la fila y columna 0, tambien me gustaria ponerlo en otro sitip del dialogo en cuestion.Un saludo Carlos
xBrowse
Puedes pintarlo en el dialogo con el tamaño y posicion que desees. Debes usar el Custom Control en el editor de recursos..RC[code:tqb8vmj7] CONTROL "txBrowse", 701, "txBrowse", WS_TABSTOP|0x00300000, 193, 47, 345, 255[/code:tqb8vmj7]y usar oBrw:CreateFromResource(701), en lugar de CreateFromCode.De todas formas con nTop y nLeft, debieras poderlo posicionar en el lugar que quieras y con nWidth y nHeight definir el tamño.
xBrowse
Gracias Biel:ya he conseguido ponerlo donde quiero y con el tamaño que quiero con nTop, nLeft y con nRight y nBottom.Un saludo y gracias
xBrowse
Hola a todos(as): Alguien tiene un ejemplo de cómo partir trabajando con xBrowse? Estoy comenzando un nuevo proyecto y me gustaría utilizarlo. Nunca lo he hecho. Además todas las consultas van hacia MySQL. Cómo se trabaja con un recordset en xBrowse y si éste soporta paginacion para que las consultas no sean tan pesadas? Saludos y mil gracias
xBrowse
David: Mira este blog, ahí encontrarás mucho de lo que sembraste. <!-- m --><a class="postlink" href="http://sqlcmd.blogspot.com/">http://sqlcmd.blogspot.com/</a><!-- m --> Saludos
xBrowse
[quote="Armando":323cgru8]David: Mira este blog, ahí encontrarás mucho de lo que sembraste. <!-- m --><a class="postlink" href="http://sqlcmd.blogspot.com/">http://sqlcmd.blogspot.com/</a><!-- m --> Saludos[/quote:323cgru8] Gracias Armando. Que increíble, esa página ya la tenía en mis favoritos y no se me ocurrió...jajajaja Saludos y fuerza
xBrowse
Hola a todos, Tengo un par de problemas con xBrowse. El primero, cada vez que hago left-Click en un registro se me posiciona en la primera posición del browse. Es muy dificil que no lo haga ? La Segunda, existe un codeblock de Selección donde Doble-Left-Click y ENTER lo evaluaran ? Muchas Gracias.