topic
stringlengths
1
63
text
stringlengths
1
577k
galería de imágenes
Can you see if MDI application suits you? Please try this and let us have your response. [code=fw:3mvq1nl8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oWnd, oBar<br />   <span style="color: #00C800;">local</span> aImages := <span style="color: #00C800;">nil</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">32</span> <span style="color: #000000;">2007</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Album"</span> <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> ;<br />      <span style="color: #000000;">&#40;</span> aImages  := ImageArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, TAlbum<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> aImages <span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Activate</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;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3mvq1nl8]
galería de imágenes
Sorry, I did not see the above two postings. Nice.
galería de imágenes
José Luis, Is your main window MDI ?
galería de imágenes
Antonio, I use TFSDI [url:38c5prxc]https&#58;//www&#46;alanit&#46;com/2006/06/fsdi2006/[/url:38c5prxc] that is a dialog overlaped the main window. In the link you can download a sample. Regards,
galería de imágenes
I noticed that the INIT clause doesn't assign .F. to lExit so I changed the code: [code=fw:tug1ent8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hWndMain<br />&nbsp; &nbsp;::<span style="color: #000000;">CreateWindow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">CreateControls</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">SetVScroll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> |t,w,h| ::<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span> t, w, h <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lExit</span> := .F.<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lExit</span> := .t.<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// ON INIT ( ::oWnd:Center( oApp():oWndMain ) )</span><br /><br />&nbsp; &nbsp;StopUntil<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">lExit</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span></div>[/code:tug1ent8] and then it runs ok. I have this in mind for several years, look at this [url:tug1ent8]https&#58;//www&#46;alanit&#46;com/2008/03/libra/[/url:tug1ent8]. I will try to create a control with Mr. Rao class, but for me it is fully usable. Thank you very much to both of you. Kind regards,
galería de imágenes
José Luis, Using DATA lExit INIT .F. automatically initializes it to .F.
galería de imágenes
José Luis, A first try implementing Class TAlbum as a control: [code=fw:3qvxejyo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oAlbum<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1250</span>, <span style="color: #000000;">800</span><br /><br />   oAlbum = TAlbum<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1200</span>, <span style="color: #000000;">800</span>, oDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oAlbum:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1250</span>, <span style="color: #000000;">800</span> <span style="color: #000000;">&#41;</span>,;<br />                oAlbum:<span style="color: #000000;">LoadImages</span><span style="color: #000000;">&#40;</span> ASize<span style="color: #000000;">&#40;</span> DirectoryRecurse<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\*</span>.*"</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <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: #00C800;">CLASS</span> TAlbum <span style="color: #0000ff;">FROM</span> TPanel<br /><br />   CLASSDATA lRegistered <span style="color: #0000ff;">INIT</span> .F.<br /><br />   <span style="color: #00C800;">DATA</span>   aPhotos    <span style="color: #0000ff;">INIT</span>  <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <br />   <span style="color: #00C800;">DATA</span>   nImgWidth  <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">210</span><br />   <span style="color: #00C800;">DATA</span>   nImgHeight <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">300</span><br />   <span style="color: #00C800;">DATA</span>   nGutter    <span style="color: #0000ff;">INIT</span>  <span style="color: #000000;">30</span><br /><br />   <span style="color: #00C800;">METHOD</span> AddImage<span style="color: #000000;">&#40;</span> cImage <span style="color: #000000;">&#41;</span> <br /><br />   <span style="color: #00C800;">METHOD</span> DefControl<span style="color: #000000;">&#40;</span> oCtrl <span style="color: #000000;">&#41;</span>   <br />      <br />   <span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span>   <br /><br />   <span style="color: #00C800;">METHOD</span> LoadImages<span style="color: #000000;">&#40;</span> aImages <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> DefControl<span style="color: #000000;">&#40;</span> oCtrl <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br />   <br />   <span style="color: #00C800;">DEFAULT</span> oCtrl:<span style="color: #000000;">nId</span> := oCtrl:<span style="color: #000000;">GetNewId</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> AScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">nId</span> == oCtrl:<span style="color: #000000;">nId</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />      <span style="color: #00D7D7;">#define</span> DUPLICATED_CONTROLID  <span style="color: #000000;">2</span><br />      Eval<span style="color: #000000;">&#40;</span> ErrorBlock<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, _FWGenError<span style="color: #000000;">&#40;</span> DUPLICATED_CONTROLID, ;<br />                          <span style="color: #ff0000;">"No: "</span> + Str<span style="color: #000000;">&#40;</span> oCtrl:<span style="color: #000000;">nId</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      AAdd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aControls</span>, oCtrl <span style="color: #000000;">&#41;</span><br />      oCtrl:<span style="color: #000000;">hWnd</span> = <span style="color: #000000;">0</span><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;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />   <span style="color: #00C800;">local</span> aPhoto<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TDIALOG"</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span><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;">METHOD</span> AddImage<span style="color: #000000;">&#40;</span> cImage <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />   <span style="color: #00C800;">local</span> oImg, nCols := Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span> / ::<span style="color: #000000;">nImgWidth</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nRows := Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHeight</span> / ::<span style="color: #000000;">nImgHeight</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nRow := Int<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span> nRows * nCols <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">0.5</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nCol := Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> nRow * nCols <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">// MsgInfo( nRow )</span><br />   <span style="color: #B900B9;">// MsgInfo( nCol )</span><br /><br />   AAdd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aPhotos</span>, cImage <span style="color: #000000;">&#41;</span><br /><br />   @ ::<span style="color: #000000;">nGutter</span> + <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nImgHeight</span> + ::<span style="color: #000000;">nGutter</span> <span style="color: #000000;">&#41;</span> * nRow,;<br />     ::<span style="color: #000000;">nGutter</span> + <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nImgWidth</span> + ::<span style="color: #000000;">nGutter</span> <span style="color: #000000;">&#41;</span> * nCol;<br />     XIMAGE oImg <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span> ;<br />     <span style="color: #0000ff;">SIZE</span> ::<span style="color: #000000;">nImgWidth</span>, ::<span style="color: #000000;">nImgHeight</span> <span style="color: #B900B9;">// NOBORDER</span><br /><br />   oImg:<span style="color: #000000;">SetSource</span><span style="color: #000000;">&#40;</span> cImage <span style="color: #000000;">&#41;</span><br />   oImg:<span style="color: #000000;">Shadow</span><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 /><br /><span style="color: #00C800;">METHOD</span> LoadImages<span style="color: #000000;">&#40;</span> aImages <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />   ::<span style="color: #000000;">aPhotos</span> = aImages <br />   AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aPhotos</span>, <span style="color: #000000;">&#123;</span> | aPhoto | ::<span style="color: #000000;">AddImage</span><span style="color: #000000;">&#40;</span> aPhoto<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: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3qvxejyo]
galería de imágenes
Thanks Antonio, the dialog version works fine, but doesn't has the scroll feature. Regards,
galería de imágenes
About centering the TAlbum over the main window of my program, I do the following: [code=fw:2rh4qs18]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> ::<span style="color: #000000;">oWnd</span>:<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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lExit</span> := .t.<span style="color: #000000;">&#41;</span></div>[/code:2rh4qs18] and I get this error: Application =========== Path and name: C:\alanit\develop\bitacora\bitacora.exe (32 bits) Size: 5,786,624 bytes Compiler version: Harbour 3.2.0dev (r1904111533) FiveWin version: FWH 19.05 C compiler version: Borland/Embarcadero C++ 7.0 (32-bit) Windows version: 6.2, Build 9200 Time from start: 0 hours 0 mins 4 secs Error occurred at: 18-01-2021, 19:22:23 Error description: Error BASE/1004 No existe el m‚todo: CENTER Args: [ 1] = U [ 2] = O TWINDOW Stack Calls =========== Called from: ..\contrib\hbct\ctmisc.prg => CENTER( 0 ) Called from: .\prg\fwh\TALBUM.PRG => (b)TALBUM_ACTIVATE( 96 ) I don't know what has hbct to do in this. In my .bc file I have: bitacora.exe, + bitacora.map, + c:\fivetech\fwh1905\lib\filexls.lib + c:\fivetech\fwh1905\lib\FiveH.lib + c:\fivetech\fwh1905\lib\FiveHC.lib + and some lines after I link hbct. Regards,
galería de imágenes
José Luis, It seems as ::oWnd hasn't been assigned previously Error description: Error BASE/1004 No existe el m‚todo: CENTER Args: [ 1] = U That means that ::oWnd is nil
galería de imágenes
I don't undestand this. I'm using the same code from Mr. Rao. If I write: [code=fw:egg5le4l]<div class="fw" id="{CB}" style="font-family: monospace;">  oAlbum := TAlbum<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:egg5le4l] I don't have the error, but if I write [code=fw:egg5le4l]<div class="fw" id="{CB}" style="font-family: monospace;">oAlbum := TAlbum<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oAlbum:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:egg5le4l] I get the error.
galería de imágenes
Mr. Rao, it's possible to add a method to select a image and highlight it and then with arrow keys move and select other image ? Regards,
galería de imágenes
[quote="José Luis Sánchez":119dkpsg]I don't undestand this. I'm using the same code from Mr. Rao. If I write: [code=fw:119dkpsg]<div class="fw" id="{CB}" style="font-family: monospace;">  oAlbum := TAlbum<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:119dkpsg] I don't have the error, but if I write [code=fw:119dkpsg]<div class="fw" id="{CB}" style="font-family: monospace;">oAlbum := TAlbum<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oAlbum:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:119dkpsg] I get the error.[/quote:119dkpsg] José Luis, Please post the error.log here, thanks
galería de imágenes
Antonio, this is the error.log Application =========== Path and name: C:\alanit\develop\bitacora\bitacora.exe (32 bits) Size: 5,786,624 bytes Compiler version: Harbour 3.2.0dev (r1904111533) FiveWin version: FWH 19.05 C compiler version: Borland/Embarcadero C++ 7.0 (32-bit) Windows version: 6.2, Build 9200 Time from start: 0 hours 0 mins 6 secs Error occurred at: 19-01-2021, 18:39:03 Error description: Error BASE/1004 No existe el m‚todo: CENTER Args: [ 1] = U [ 2] = O TWINDOW Stack Calls =========== Called from: ..\contrib\hbct\ctmisc.prg => CENTER( 0 ) Called from: .\prg\fwh\TALBUM.PRG => (b)TALBUM_ACTIVATE( 96 ) Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1064 ) Called from: .\prg\fwh\TALBUM.PRG => TALBUM:ACTIVATE( 96 ) Called from: .\prg\btc\PLIBROS.PRG => LIGALERIA( 2769 ) Called from: .\prg\btc\PLIBROS.PRG => (b)LIBROS( 230 ) Called from: .\prg\fwh\C5VMENU.PRG => TVMENU:EVALACTION( 1637 ) Called from: .\prg\fwh\C5VMENU.PRG => TVMENU:LBUTTONUP( 1339 ) Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1791 ) Called from: .\prg\fwh\C5VMENU.PRG => TVMENU:HANDLEEVENT( 883 ) Called from: .\source\classes\WINDOW.PRG => _FWH( 3546 ) Called from: => WINRUN( 0 ) Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1078 ) Called from: .\prg\btc\MAIN.PRG => TAPPLICATION:ACTIVATE( 258 ) Called from: .\prg\btc\MAIN.PRG => MAIN( 42 ) System ====== CPU type: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz 3500 Mhz Hardware memory: 8121 megs Free System resources: 0 % GDI resources: 0 % User resources: 0 % Windows total applications running: 5 1 , 2 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.746_none_11afeb8 3 , C:\alanit\develop\bitacora\bitacora.exe 4 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL 5 GDI+ Window (bitacora.exe), C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.746_none_429ade728a91c37 Variables in use ================ Procedure Type Value ========================== CENTER Param 1: O Class: ERROR (b)TALBUM_ACTIVATE Param 1: O Class: TWINDOW Local 1: U Local 2: U TWINDOW:ACTIVATE Param 1: O Class: TWINDOW TALBUM:ACTIVATE Param 1: C "NORMAL" Param 2: U Param 3: U Param 4: U Param 5: B {|| ... } Param 6: U Param 7: B {|| ... } Param 8: B {|| ... } Param 9: U Param 10: U Param 11: U Param 12: U Param 13: U Param 14: U Param 15: U Param 16: U Param 17: B {|| ... } Param 18: U Param 19: U Param 20: L .F. Local 1: O Class: TWINDOW Local 2: O Class: TSCROLLBAR Local 3: U LIGALERIA Local 1: O Class: TALBUM (b)LIBROS Local 1: C "LI" Local 2: N 93 Local 3: N 10 Local 4: A Len: 172 Local 5: A Len: 172 Local 6: A Len: 172 Local 7: O Class: TALBUM TVMENU:EVALACTION Param 1: O Class: TVMENU TVMENU:LBUTTONUP Param 1: N 0 Local 1: O Class: TVITEM Local 2: U TCONTROL:HANDLEEVENT Param 1: N 245 Param 2: N 91 Param 3: N 0 Local 1: N 11 Local 2: N 0 TVMENU:HANDLEEVENT Param 1: N 514 Param 2: N 0 Param 3: N 16056411 Local 1: U _FWH Param 1: N 514 Param 2: N 0 Param 3: N 16056411 WINRUN Param 1: N 16056411 Param 2: N 514 Param 3: N 0 Param 4: N 16056411 Param 5: N 154 Local 1: O Class: TVMENU TWINDOW:ACTIVATE Param 1: N 722670 TAPPLICATION:ACTIVATE Param 1: C "NORMAL" Param 2: U Param 3: U Param 4: U Param 5: B {|| ... } Param 6: U Param 7: U Param 8: B {|| ... } Param 9: U Param 10: U Param 11: U Param 12: U Param 13: U Param 14: U Param 15: U Param 16: U Param 17: B {|| ... } Param 18: U Param 19: U Param 20: L .F. Local 1: O Class: TWINDOW Local 2: U Local 3: U MAIN Local 1: O Class: TAPPLICATION Linked RDDs =========== DBF DBFFPT DBFBLOB DBFCDX DBFNTX DataBases in use ================ 1: => LI RddName: DBFCDX ============================== RecNo RecCount BOF EOF 93 229 .F. .F. Indexes in use TagName Upper( LiCodigo ) CODIGO Upper( LiTitulo ) TITULO Upper( LiTitOrig ) TITULORIGI Upper( LiAutor ) + Upper( LiTitulo AUTOR Upper( LiMateria ) + Upper( LiTitulMATERIA Upper( LiPropiet ) + Upper( LiTitulPROPIETARI Upper( LiEditor ) + Upper( LiTituloEDITOR Str( LiAnoEdic, 4 ) + Upper( LiTituANOEDIC Upper( LiColecc ) + Upper( LiTituloCOLECCION => DToS( LiFchAdq ) + Upper( LiTitulo FCHCOMPRA DToS( LiFechaPr ) + Upper( LiTituloFCHPRESTAM DToS( LiFechaPr ) + Upper( LiPrestaPRESTADOS Upper( LiUbicaci ) + Upper( LiTitulUBICACION Relations in use 2: MU RddName: DBFCDX ============================== RecNo RecCount BOF EOF 64 194 .F. .F. Indexes in use TagName => Upper( MuCodigo ) CODIGO Upper( MuTitulo ) TITULO Upper( MuAutor ) + Upper( MuTitulo INTERPRETE Upper( MuMateria ) + Upper( MuTitulMATERIA Upper( MuAutor2 ) + Upper( MuTituloCOMPOSITOR Upper( MuDirector ) + Upper( MuTituDIRECTOR Upper( MuPropiet ) + Upper( MuTitulPROPIETARI Upper( MuEditor ) + Upper( MuTituloEDITOR Str( MuAnoEdic, 4 ) + Upper( MuTituANOEDIC Upper( MuColecc ) + Upper( MuTituloCOLECCION DToS( MuFchAdq ) + Upper( MuTitulo FCHCOMPRA DToS( MuFchPres ) + Upper( MuTituloFCHPRESTAM DToS( MuFchPres ) + Upper( MuPrestaPRESTADOS Upper( MuUbicaci ) + Upper( MuTitulUBICACION MuSoporte SOPORTE Relations in use 3: CN RddName: DBFCDX ============================== RecNo RecCount BOF EOF 2 3 .F. .F. Indexes in use TagName => Upper( CaTitulo ) TITULO Upper( CaInterp ) + Upper( CaTituloINTERPRETE Upper( CaAutor ) + Upper( CaTitulo COMPOSITOR Upper( CaMateria ) + Upper( CaTitulMATERIA Upper( CaDuracc ) + Upper( CaTituloDURACION Relations in use 4: CD RddName: DBFCDX ============================== RecNo RecCount BOF EOF 4 5 .F. .F. Indexes in use TagName => Upper( CdMuCodigo ) + Upper( CdOrdeCDMUCODIGO Upper( CdCaTitulo ) CDCATITULO Upper( CdCaTitulo ) + Upper( CdCaAuTITAUTOR Upper( CdCaAutor ) + Upper( CdCaTitAUTORTIT Relations in use 5: VI RddName: DBFCDX ============================== RecNo RecCount BOF EOF 2 3 .F. .F. Indexes in use TagName => Upper( ViNumero ) CODIGO Upper( ViTitulo ) TITULO Upper( ViOriginal ) ORIGINAL Upper( ViMateria ) + Upper( ViTitulMATERIA Upper( ViPropiet ) + Upper( ViTitulPROPIETARI Upper( ViDirector ) + Upper( ViTituDIRECTOR Upper( ViActor ) + Upper( ViTitulo ACTOR Upper( ViActriz ) + Upper( ViTituloACTRIZ Upper( ViProduct ) + Upper( ViTitulEDITOR Str( ViAnyo, 4 ) + Upper( ViTitulo ANOEDIC Upper( ViColecc ) + Upper( ViTituloCOLECCION DToS( ViFchAdq ) + Upper( ViTitulo FCHCOMPRA DToS( ViFchPres ) + Upper( ViTituloFCHPRESTAM DToS( ViFchPres ) + Upper( ViPrestaPRESTADOS Upper( ViUbicaci ) + Upper( ViTitulUBICACION Upper( ViFotogra ) + Upper( ViTitulFOTOGRAFIA Relations in use 6: SO RddName: DBFCDX ============================== RecNo RecCount BOF EOF 1 166 .F. .F. Indexes in use TagName => Upper( SoCodigo ) CODIGO Upper( SoTitulo ) TITULO Upper( SoMateria ) + Upper( SoTitulMATERIA Upper( SoPropiet ) + Upper( SoTitulPROPIETARI Upper( SoEditor ) + Upper( SoTituloEDITOR DToS( SoFchComp ) + Upper( SoTituloFCHCOMPRA DToS( SoFecha ) + Upper( SoTitulo )FCHPRESTAM DToS( SoFecha ) + Upper( SoPrestad PRESTADOS Upper( SoGuardado ) + Upper( SoTituUBICACION Relations in use 7: IN RddName: DBFCDX ============================== RecNo RecCount BOF EOF 1 4 .F. .F. Indexes in use TagName => Upper( InCodigo ) CODIGO Upper( InNombre ) TITULO Upper( InMateria ) + Upper( InNombrMATERIA Upper( InDirecc ) + Upper( InNombreDIRECCION Str( InDiseno, 1 ) + Upper( InNombrVDISENO Str( InConteni, 1 ) + Upper( InNombVCONTENIDO Str( InValorac, 1 ) + Upper( InNombVGLOBAL DToS( InFchVis ) + Upper( InNombre FCHVISITA Upper( InServic ) + Upper( InNombreSERVICIO Relations in use 8: MA RddName: DBFCDX ============================== RecNo RecCount BOF EOF 42 86 .F. .F. Indexes in use TagName => Upper( Matipo ) + Upper( MaMateria MATERIA Upper( MaMateria ) LMATERIA Upper( MaMateria ) MMATERIA Upper( MaMateria ) VMATERIA Upper( MaMateria ) SMATERIA Upper( MaMateria ) IMATERIA Relations in use 9: UB RddName: DBFCDX ============================== RecNo RecCount BOF EOF 6 7 .F. .F. Indexes in use TagName => Upper( UbTipo ) + Upper( UbUbicaci UBICACION Upper( UbUbicaci ) LUBICACION Upper( UbUbicaci ) MUBICACION Upper( UbUbicaci ) VUBICACION Upper( UbUbicaci ) SUBICACION Relations in use 10: ID RddName: DBFCDX ============================== RecNo RecCount BOF EOF 3 5 .F. .F. Indexes in use TagName => Upper( IDIOMA ) IDIOMA Relations in use 11: AG RddName: DBFCDX ============================== RecNo RecCount BOF EOF 24 37 .F. .F. Indexes in use TagName => Upper( PENOMBRE ) CONTACTOS Upper( PENOMBRE ) PROPIETARI Upper( PENOMBRE ) COMPRAS Upper( PECODIGO ) CODIGO Relations in use 12: AU RddName: DBFCDX ============================== RecNo RecCount BOF EOF 431 522 .F. .F. Indexes in use TagName => Upper( AUNOMBRE ) ESCRITORES AuMateria + AuNombre MESCRITORE Upper( AUNOMBRE ) INTERPRETE AuMateria + AuNombre MINTERPRET Upper( AUNOMBRE ) COMPOSITOR AuMateria + AuNombre MCOMPOSITO Upper( AUNOMBRE ) DIRMUSICA AuMateria + AuNombre MDIRMUSICA Upper( AUNOMBRE ) DIRCINE AuMateria + AuNombre MDIRCINE Upper( AUNOMBRE ) ACTORES AuMateria + AuNombre MACTORES Upper( AUNOMBRE ) FOTOGRAFIA AuMateria + AuNombre MFOTOGRAFI Upper( AUNOMBRE ) ALL_LIBROS Upper( AUNOMBRE ) ALL_DISCOS Upper( AUNOMBRE ) ALL_VIDEOS Relations in use 13: ED RddName: DBFCDX ============================== RecNo RecCount BOF EOF 115 157 .F. .F. Indexes in use TagName => Upper( EDNOMBRE ) EDLIBROS Upper( EDNOMBRE ) EDDISCOS Upper( EDNOMBRE ) EDVIDEOS Upper( EDNOMBRE ) EDSOFTWARE Relations in use 14: CL RddName: DBFCDX ============================== RecNo RecCount BOF EOF 3 15 .F. .F. Indexes in use TagName => Upper( CLNOMBRE ) COLIBROS Upper( CLNOMBRE ) CODISCOS Upper( CLNOMBRE ) COVIDEOS Relations in use 15: CA RddName: DBFCDX ============================== RecNo RecCount BOF EOF 1 3 .F. .F. Indexes in use TagName => Upper( CATEGORIA ) TODOS Relations in use 16: NO RddName: DBFCDX ============================== RecNo RecCount BOF EOF 1 3 .F. .F. Indexes in use TagName => Str( Notipo, 1 ) + Upper( NoTitulo TIPO Str( Notipo, 1 ) + Upper( NoTitulo LIBROS Str( Notipo, 1 ) + Upper( NoTitulo DISCOS Str( Notipo, 1 ) + Upper( NoTitulo VIDEOS Str( Notipo, 1 ) + Upper( NoTitulo SOFTWARE Relations in use 17: MD RddName: DBFCDX ============================== RecNo RecCount BOF EOF 1 0 .T. .T. Indexes in use TagName Relations in use 18: SM RddName: DBFCDX ============================== RecNo RecCount BOF EOF 1 2 .F. .F. Indexes in use TagName Upper( SMSOPORTE ) SOPORTE Relations in use 19: PR RddName: DBFCDX ============================== RecNo RecCount BOF EOF 1 2 .F. .F. Indexes in use TagName Upper(prcodigo)+dtos(prfchprest) PRL1 Upper(prtitulo)+dtos(prfchprest) PRL2 Upper(prpenombre)+dtos(prfchprest) PRL3 dtos(prfchprest)+upper(prcodigo) PRL4 Upper(prcodigo)+dtos(prfchprest) PRM1 Upper(prtitulo)+dtos(prfchprest) PRM2 Upper(prpenombre)+dtos(prfchprest) PRM3 dtos(prfchprest)+upper(prcodigo) PRM4 Upper(prcodigo)+dtos(prfchprest) PRV1 Upper(prtitulo)+dtos(prfchprest) PRV2 Upper(prpenombre)+dtos(prfchprest) PRV3 dtos(prfchprest)+upper(prcodigo) PRV4 Upper(prcodigo)+dtos(prfchprest) PRS1 Upper(prtitulo)+dtos(prfchprest) PRS2 Upper(prpenombre)+dtos(prfchprest) PRS3 dtos(prfchprest)+upper(prcodigo) PRS4 Relations in use Classes in use: =============== 1 ERROR 2 HBCLASS 3 HBOBJECT 4 TAGET 5 TAPPLICATION 6 TINI 7 TFONT 8 TWINDOW 9 TCONTROL 10 TICON 11 TBRUSH 12 TMENU 13 TREG32 14 TMENUITEM 15 TMSGBAR 16 TRECT 17 TMSGITEM 18 TTIMER 19 TRIBBONBAR 20 TRPANEL 21 TRBGROUP 22 TRBTN 23 TDIALOG 24 TFSDI 25 TXBROWSE 26 TXBRWCOLUMN 27 TVMENU 28 TC5IMGLIST 29 TVITEM 30 TTABS 31 TSPLITTER 32 TSCROLLBAR 33 TBTNBMP 34 TCLIPBOARD 35 TXIMAGE 36 TALBUM 37 TSAY 38 TSTRUCT Memory Analysis =============== 735 Static variables Dynamic memory consume: Actual Value: 5373952 bytes Highest Value: 5373952 bytes
galería de imágenes
José Luis, thanks Please post here also the source code of your .\prg\fwh\TALBUM.PRG
galería de imágenes
Sorry, I tried and gives me error with oAlbum := TAlbum():New( aImages, aLabels, aRecno ):Activate() and also with: oAlbum := TAlbum():New( aImages, aLabels, aRecno ) oAlbum:Activate() Here is my TAlbum class. I modified to show a label and I'm trying to edit the record of the cover: [code=fw:39jy25yl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> aPhotos<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> aLabel<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> aRecno<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> oWnd<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nWndWidth &nbsp;<span style="color: #0000ff;">INIT</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">+40</span> &nbsp;<span style="color: #B900B9;">// 800</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nWndHeight <span style="color: #0000ff;">INIT</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nHeight</span> <span style="color: #B900B9;">// 800</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nImgWidth &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">180</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nGutter &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">20</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nImgCols <span style="color: #00C800;">PROTECTED</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nOffset &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span> <span style="color: #00C800;">PROTECTED</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nHeight<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> lExit <span style="color: #0000ff;">INIT</span> .F.<br /><br />&nbsp; &nbsp;ACCESS oVScroll <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oVScroll</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> aPhotos, aLabel, aRecno <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">PROTECTED</span>:<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> CreateWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> CreateControls<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetVScroll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GoUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GoDown<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> ThumbPos<span style="color: #000000;">&#40;</span> nPos <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MouseWheel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> VSetPos<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> -::<span style="color: #000000;">nOffSet</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GoBottom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> KeyDown<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> ScrollWnd<span style="color: #000000;">&#40;</span> nPixels <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Resize<span style="color: #000000;">&#40;</span> nType, nWidth, nHeight <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> aPhotos, aLabel, aRecno <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">aPhotos</span> := aPhotos<br />&nbsp; &nbsp;::<span style="color: #000000;">aLabel</span> &nbsp;:= aLabel<br />&nbsp; &nbsp;::<span style="color: #000000;">aRecno</span> &nbsp;:= aRecno<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hWndMain<br />&nbsp; &nbsp;::<span style="color: #000000;">CreateWindow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">CreateControls</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">SetVScroll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> |t,w,h| ::<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span> t, w, h <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lExit</span> := .F.<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> ::<span style="color: #000000;">oWnd</span>:<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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lExit</span> := .t.<span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;StopUntil<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> || ::<span style="color: #000000;">lExit</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> CreateWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMain, x, y<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> oMain := WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">nil</span> .and. oMain:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TMDIFRAME"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oMain <span style="color: #0000ff;">VSCROLL</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; x &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nWndWidth</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; y &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ScreenHeight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nWndHeight</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">FROM</span> y,x <span style="color: #0000ff;">TO</span> ::<span style="color: #000000;">nWndHeight</span> + y, ::<span style="color: #000000;">nWndWidth</span> + x <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">VSCROLL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'Galería de portadas de libros'</span> ; <span style="color: #B900B9;">// OF oApp():oWndMain ;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE NOMINIMIZE NOZOOM <span style="color: #B900B9;">// 0xe8e8e8</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//DEFINE DIALOG ::oWnd FROM y,x TO ::nWndHeight + y, ::nWndWidth + x PIXEL ; // VSCROLL ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; COLOR CLR_BLACK, CLR_WHITE // NOMINIMIZE NOZOOM</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lExit</span> := .t.<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> CreateControls<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nImgWidth &nbsp; := ::<span style="color: #000000;">nImgWidth</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nImgHeight &nbsp;:= Int<span style="color: #000000;">&#40;</span> nImgWidth * <span style="color: #000000;">4</span> / <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nGutter &nbsp; &nbsp; := ::<span style="color: #000000;">nGutter</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRows, nCols, nRow, nCol, x, y, nImage, xMax<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nImages := Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aPhotos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oImage<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSay<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRecno<br /><br />&nbsp; &nbsp;nCols &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nWidth</span> - nGutter <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span> nImgWidth + nGutter <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nRows &nbsp; &nbsp;:= Ceiling<span style="color: #000000;">&#40;</span> nImages / nCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;xMax &nbsp; &nbsp; := nCols * <span style="color: #000000;">&#40;</span> nImgWidth * nGutter <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;y &nbsp; &nbsp; &nbsp; &nbsp;:= nGutter<br />&nbsp; &nbsp;nImage &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nImage <= nImages<br />&nbsp; &nbsp; &nbsp; x &nbsp; &nbsp; := nGutter<br />&nbsp; &nbsp; &nbsp; nCol &nbsp;:= <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nCol <= nCols .and. nImage <= nImages<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ y, x XIMAGE oImage <span style="color: #0000ff;">SIZE</span> nImgWidth, nImgHeight <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oWnd</span> NOBORDER<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImage:<span style="color: #000000;">SetSource</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> HB_ISARRAY<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aPhotos</span><span style="color: #000000;">&#91;</span> nImage <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">aPhotos</span><span style="color: #000000;">&#91;</span> nImage, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">aPhotos</span><span style="color: #000000;">&#91;</span> nImage <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImage:<span style="color: #000000;">nUserControl</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImage:<span style="color: #000000;">lBmpTransparent</span> := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRecno := ::<span style="color: #000000;">aRecno</span><span style="color: #000000;">&#91;</span>nImage<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// para devolver el recno tienes que hacer detached local</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImage:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>nRecno<span style="color: #000000;">&#41;</span>, LiForm<span style="color: #000000;">&#40;</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>, <span style="color: #ff0000;">"edt"</span>, , nRecno <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ y+nImgHeight+<span style="color: #000000;">&#40;</span>nGutter/<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>, x <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> ::<span style="color: #000000;">aRecno</span><span style="color: #000000;">&#91;</span>nImage<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">FONT</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oFont</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> nImgWidth, <span style="color: #000000;">2</span>*nGutter <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oWnd</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#if FW_VersionNo >= <span style="color: #000000;">21010</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oImage:<span style="color: #000000;">Shadow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oImage:<span style="color: #000000;">bPainted</span> := PaintBlock<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#endif<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nImage++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCol++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x &nbsp;+= <span style="color: #000000;">&#40;</span> nImgWidth + <span style="color: #000000;">2</span>*nGutter <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; y &nbsp;+= <span style="color: #000000;">&#40;</span> nImgHeight + nGutter <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nImgCols</span> &nbsp;:= nCols<br />&nbsp; &nbsp;::<span style="color: #000000;">nHeight</span> &nbsp; := y<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Resize<span style="color: #000000;">&#40;</span> nType, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nImgHeight &nbsp;:= Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nImgWidth</span> * <span style="color: #000000;">4</span> / <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRows, nCols, nRow, nCol, x, y, nImage, nImages := Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aPhotos</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nWidth == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;nCols &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nWidth</span> - ::<span style="color: #000000;">nGutter</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nImgWidth</span> + ::<span style="color: #000000;">nGutter</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nCols == ::<span style="color: #000000;">nImgCols</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;nRows &nbsp; &nbsp;:= Ceiling<span style="color: #000000;">&#40;</span> nImages / nCols <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;y &nbsp; &nbsp; &nbsp; &nbsp;:= ::<span style="color: #000000;">nGutter</span><br />&nbsp; &nbsp;nImage &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nImage <= nImages<br />&nbsp; &nbsp; &nbsp; x &nbsp; &nbsp; := ::<span style="color: #000000;">nGutter</span><br />&nbsp; &nbsp; &nbsp; nCol &nbsp;:= <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nCol <= nCols .and. nImage <= nImages<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> nImage <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nTop</span> &nbsp; &nbsp; &nbsp;:= y<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nLeft</span> &nbsp; &nbsp; := x<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nImage++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x &nbsp;+= <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nImgWidth</span> + ::<span style="color: #000000;">nGutter</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCol++<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; y &nbsp;+= <span style="color: #000000;">&#40;</span> nImgHeight + ::<span style="color: #000000;">nGutter</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nImgCols</span> &nbsp;:= nCols<br />&nbsp; &nbsp;::<span style="color: #000000;">nHeight</span> &nbsp; := y<br />&nbsp; &nbsp;::<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span> - ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nOffSet</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">VSetPos</span><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 /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> SetVScroll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSelf &nbsp; &nbsp;:= <span style="color: #00C800;">Self</span><br /><br />&nbsp; &nbsp;WITH OBJECT ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oVScroll</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span> - ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bGoUp</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oSelf:<span style="color: #000000;">GoUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bGoDown</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oSelf:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bPos</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> |nPos| oSelf:<span style="color: #000000;">ThumbPos</span><span style="color: #000000;">&#40;</span> nPos <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bGoTop</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || oSelf:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bGoDown</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oSelf:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bMouseWheel</span> := ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> |k,nDelta| oSelf:<span style="color: #000000;">MouseWheel</span><span style="color: #000000;">&#40;</span> k, nDelta <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> |k| oSelf:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">&#40;</span> k <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> ScrollWnd<span style="color: #000000;">&#40;</span> nPixels <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;ScrollWindow<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, &nbsp;nPixels, <span style="color: #000000;">0</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> GoUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPixels &nbsp;:= <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span>, ::<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">nMin</span> - ::<span style="color: #000000;">nOffset</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">ScrollWnd</span><span style="color: #000000;">&#40;</span> nPixels <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nOffSet</span> += nPixels<br />&nbsp; &nbsp;::<span style="color: #000000;">VSetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> GoDown<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPixels &nbsp;:= <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span>, ::<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">nMax</span> + ::<span style="color: #000000;">nOffSet</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">ScrollWnd</span><span style="color: #000000;">&#40;</span> -nPixels <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nOffSet</span> -= nPixels<br />&nbsp; &nbsp;::<span style="color: #000000;">VSetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> ThumbPos<span style="color: #000000;">&#40;</span> nPos <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nTop</span> -= <span style="color: #000000;">&#40;</span> nPos + ::<span style="color: #000000;">nOffSet</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nOffSet</span> &nbsp; := -nPos<br />&nbsp; &nbsp;::<span style="color: #000000;">VSetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> MouseWheel<span style="color: #000000;">&#40;</span> k, nDelta <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nDelta > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">GoUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;::<span style="color: #000000;">VSetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> GoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nTop</span> -= ::<span style="color: #000000;">nOffSet</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nOffSet</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">VSetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> GoBottom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nTop</span> -= <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">nMax</span> + ::<span style="color: #000000;">nOffSet</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nOffSet</span> &nbsp;:= -::<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">nMax</span><br />&nbsp; &nbsp;::<span style="color: #000000;">VSetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> KeyDown<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAlbum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">SWITCH</span> nKey<br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> VK_UP<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">GoUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> VK_DOWN<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> VK_HOME<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> VK_END<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />#if FW_VersionNo < <span style="color: #000000;">21010</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> PaintBlock<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> || DrawShadow<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> DrawShadow<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aRect := <span style="color: #000000;">&#123;</span> oImage:<span style="color: #000000;">nTop</span>, oImage:<span style="color: #000000;">nLeft</span>, oImage:<span style="color: #000000;">nTop</span> + oImage:<span style="color: #000000;">nHeight</span>, oImage:<span style="color: #000000;">nLeft</span> + oImage:<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hDC &nbsp; := oImage:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n, nColor, hPen, nIncClr, nSize := <span style="color: #000000;">10</span><br /><br />&nbsp; &nbsp;n &nbsp; &nbsp; &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> 0xf0 - 0x48 <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span> nSize - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nIncClr &nbsp;:= n + <span style="color: #000000;">256</span> * n + <span style="color: #000000;">256</span> * <span style="color: #000000;">256</span> * n<br />&nbsp; &nbsp;nColor &nbsp; := 0x484848<br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> nSize - <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; hPen &nbsp; &nbsp; := CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>, nColor <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> + n, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> + n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> + n, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> + n, hPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> + n, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> + n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> + n + <span style="color: #000000;">1</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> + n, hPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; DeleteObject<span style="color: #000000;">&#40;</span> hPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColor &nbsp; += nIncClr<br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;oImage:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ReleaseDC</span><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 /><br />#endif<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;<br /><span style="color: #00C800;">function</span> bLiRecno<span style="color: #000000;">&#40;</span>aRecno, nImage<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? nImage<br />&nbsp; &nbsp;? aRecno<span style="color: #000000;">&#91;</span>nImage<span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">return</span> aRecno<span style="color: #000000;">&#91;</span>nImage<span style="color: #000000;">&#93;</span><br />&nbsp;</div>[/code:39jy25yl] Regards,
galería de imágenes
[code=fw:wrmlfoo0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> ::<span style="color: #000000;">oWnd</span>:<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></div>[/code:wrmlfoo0] You are using oWnd property of TWindow not of TAlbum. Assign [code=fw:wrmlfoo0]<div class="fw" id="{CB}" style="font-family: monospace;">oAlbum = <span style="color: #00C800;">Self</span></div>[/code:wrmlfoo0] at the start of the method and then use [code=fw:wrmlfoo0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oAlbum:<span style="color: #000000;">oWnd</span>:<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></div>[/code:wrmlfoo0] EMG
galería de imágenes
Thanks Enrico. I need that TAlbum class inherits from TControl because I need to put it in a dialog. It's very difficult for me to control the application flow with 2 windows, so I need to create a dialog and inside it the talbum class. I have seen the code from Antonio, and also noticed about the TScrollPanel class existing in FWH. I'll try to build the TAlbum class from TScrollPanel so I'd have scroll features it it. Regards, José Luis
galería de imágenes
[quote="José Luis Sánchez":yzf6wibg]Thanks Enrico. I need that TAlbum class inherits from TControl because I need to put it in a dialog. It's very difficult for me to control the application flow with 2 windows, so I need to create a dialog and inside it the talbum class. I have seen the code from Antonio, and also noticed about the TScrollPanel class existing in FWH. I'll try to build the TAlbum class from TScrollPanel so I'd have scroll features it it. Regards, José Luis[/quote:yzf6wibg] Please wait a little while. Very soon we are posting full TAlbum class derived from TPanel
galería de imágenes
Mr. Rao, I've done what I need just with a TScrollPanel and your code of showing the images. I'll post it when I've a nice sample. I didn't known that FWH has a TScrollPanel control, sorry. [b:2gmb2tio]¡¡ Muchas gracias a todos !![/b:2gmb2tio]
galería de imágenes
Here you have !!! That is all that I need <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:1n72rcwp]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont, oBold, oPanel<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aPhotos<br /><br />&nbsp; &nbsp;aPhotos := DirectoryRecurse<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>ivetech<span style="color: #000000;">\f</span>wh1905<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\*</span>.*"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;ASort<span style="color: #000000;">&#40;</span> aPhotos, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">&#123;</span> |x,y| x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> > y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;ASize<span style="color: #000000;">&#40;</span> aPhotos, <span style="color: #000000;">200</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <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;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <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;">-14</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1600</span>,<span style="color: #000000;">800</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"FWH TScrollPanel"</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//</span><br />&nbsp; &nbsp;oPanel &nbsp; := TScrollPanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">700</span>, <span style="color: #000000;">1580</span>, oDlg, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPanel:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">740</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Aceptar"</span> &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'bye'</span><span style="color: #000000;">&#41;</span>, 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 /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> PlaceControls<span style="color: #000000;">&#40;</span> oPanel, aPhotos <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> PlaceControls<span style="color: #000000;">&#40;</span> oPanel, aPhotos <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nImgWidth &nbsp; := <span style="color: #000000;">180</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nImgHeight &nbsp;:= Int<span style="color: #000000;">&#40;</span> nImgWidth * <span style="color: #000000;">4</span> / <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nGutter &nbsp; &nbsp; := <span style="color: #000000;">20</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nRows, nCols, nRow, nCol, x, y, nImage, xMax, nImages := Len<span style="color: #000000;">&#40;</span> aPhotos <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oImage<br />&nbsp;<br />&nbsp; &nbsp; nCols &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> oPanel:<span style="color: #000000;">nWidth</span> - nGutter <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span> nImgWidth + nGutter <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; nRows &nbsp; &nbsp;:= Ceiling<span style="color: #000000;">&#40;</span> nImages / nCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; xMax &nbsp; &nbsp; := nCols * <span style="color: #000000;">&#40;</span> nImgWidth * nGutter <span style="color: #000000;">&#41;</span><br />&nbsp;<br />&nbsp; &nbsp; y &nbsp; &nbsp; &nbsp; &nbsp;:= nGutter<br />&nbsp; &nbsp; nImage &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nImage <= nImages<br />&nbsp; &nbsp; &nbsp; &nbsp;x &nbsp; &nbsp; := nGutter<br />&nbsp; &nbsp; &nbsp; &nbsp;nCol &nbsp;:= <span style="color: #000000;">1</span><br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nCol <= nCols .and. nImage <= nImages<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @ y, x XIMAGE oImage <span style="color: #0000ff;">SIZE</span> nImgWidth, nImgHeight <span style="color: #0000ff;">OF</span> oPanel NOBORDER<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oImage:<span style="color: #000000;">SetSource</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> HB_ISARRAY<span style="color: #000000;">&#40;</span> aPhotos<span style="color: #000000;">&#91;</span> nImage <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, aPhotos<span style="color: #000000;">&#91;</span> nImage, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aPhotos<span style="color: #000000;">&#91;</span> nImage <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oImage:<span style="color: #000000;">nUserControl</span> := <span style="color: #000000;">0</span><br />&nbsp;<span style="color: #B900B9;">//#if FW_VersionNo >= 21010</span><br />&nbsp;<span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; oImage:Shadow()</span><br />&nbsp;<span style="color: #B900B9;">//#else</span><br />&nbsp;<span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; oImage:bPainted := PaintBlock( oImage )</span><br />&nbsp;<span style="color: #B900B9;">//#endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nImage++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nCol++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x &nbsp;+= <span style="color: #000000;">&#40;</span> nImgWidth + nGutter <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp;y &nbsp;+= <span style="color: #000000;">&#40;</span> nImgHeight + nGutter <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp;<br />&nbsp; &nbsp; <span style="color: #B900B9;">//::nImgCols &nbsp;:= nCols</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// ::nHeight &nbsp; := y</span><br />&nbsp;<br /><br />&nbsp; &nbsp;oPanel:<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// call this after defining all controls</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;<br />&nbsp;</div>[/code:1n72rcwp] Kind regards,
galería de imágenes
Yes, TScrollPanel works well.
galería de imágenes
José Luis, Very good idea <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> On the scrollbar, the top and bottom arrows seem not to be working Same for the mouse wheel We are going to check it
galería de imágenes
[quote="nageswaragunupudi":149oswvz][quote="José Luis Sánchez":149oswvz]Thanks Enrico. I need that TAlbum class inherits from TControl because I need to put it in a dialog. It's very difficult for me to control the application flow with 2 windows, so I need to create a dialog and inside it the talbum class. I have seen the code from Antonio, and also noticed about the TScrollPanel class existing in FWH. I'll try to build the TAlbum class from TScrollPanel so I'd have scroll features it it. Regards, José Luis[/quote:149oswvz] Please wait a little while. Very soon we are posting full TAlbum class derived from TPanel[/quote:149oswvz] Mr. Rao, A new class derived from TScrollPanel would be nice with some added features: * A new data to tell how many pictures show in a row, and calculate the gutter to adjust and 'center' the row in the control * Possibility to have one picture highlighted * Cursor movement in the images, and automatically scroll the images when go down from the latest showed row. I just give you some ideas for the class <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> Kind regards,
galería de imágenes
Hola Jose Luis. Soy jose alvarez , de Venezuela, podrias ayudarme a hacer este tipo de menu? hace tiempo quiero hacer algo asi y aun no doy con la manera. [img:277kuhdk]http&#58;//www&#46;datanet&#46;space/fw/fotomenu&#46;jpg[/img:277kuhdk] Cualquier ayuda sabria agradecerte. Uso Fw 17.01 , xHarbour, Borland 5.5 y Pelles c (solo como editor de recursos) Un Abrazo,
galería de imágenes
Hola José, eso es la clase c5vmenu de Paco García. La tienes completa en los fuentes de Cuaderno de Bitácora que tengo publicados en Github: [url:2m2maqyl]https&#58;//github&#46;com/JoseluisSanchez/bitacora[/url:2m2maqyl]. Ahí están los fuentes y cómo uso yo la clase. Saludos,
galería de imágenes
[quote="José Luis Sánchez":2yxyqpwj]Hola José, eso es la clase c5vmenu de Paco García. La tienes completa en los fuentes de Cuaderno de Bitácora que tengo publicados en Github: [url:2yxyqpwj]https&#58;//github&#46;com/JoseluisSanchez/bitacora[/url:2yxyqpwj]. Ahí están los fuentes y cómo uso yo la clase. Saludos,[/quote:2yxyqpwj] ooookkkkk, muchisimas gracias jose luis... agradecido altamente... gracias al foro de FW...
galería de imágenes
Hola a todos, Ya tengo funcionando la galería de portadas de libros. Muchas gracias a Antonio, Mr. Rao, Angel y Enrico por vuestra ayuda. Pongo a continuación el código que estoy utilizando. [code=fw:tncvekit]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// _____________________________________________________________________________//</span><br /><br /><span style="color: #00C800;">Function</span> LiGaleria<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> cAlias  := <span style="color: #ff0000;">"LI"</span><br />   <span style="color: #00C800;">LOCAL</span> nRecno  := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> nOrder  := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> ordNumber<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aImages := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> aLabels := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> aRecno  := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> oDlgAlbum, oAlbum<br /><br />   LI-><span style="color: #000000;">&#40;</span>DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">WHILE</span> ! LI-><span style="color: #000000;">&#40;</span>EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> ! Empty<span style="color: #000000;">&#40;</span>Rtrim<span style="color: #000000;">&#40;</span>LI->LiImagen<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />         AAdd<span style="color: #000000;">&#40;</span>aImages, Rtrim<span style="color: #000000;">&#40;</span>LI->LiImagen<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />         AAdd<span style="color: #000000;">&#40;</span>aLabels, Rtrim<span style="color: #000000;">&#40;</span>LI->LiTitulo<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />         AAdd<span style="color: #000000;">&#40;</span>aRecno, LI-><span style="color: #000000;">&#40;</span>Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />      LI-><span style="color: #000000;">&#40;</span>DbSkip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDDO</span><br />   LI-><span style="color: #000000;">&#40;</span>DbGoTo<span style="color: #000000;">&#40;</span>nRecno<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgAlbum <span style="color: #0000ff;">SIZE</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nWidth</span>, oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nHeight</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Galería de portadas de libros"</span><br />   oDlgAlbum:<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: #B900B9;">//</span><br />   oAlbum := TScrollPanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span>, oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-50</span>, oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-20</span>, oDlgAlbum, .f. <span style="color: #000000;">&#41;</span><br />   oAlbum:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span>CLR_WHITE, CLR_WHITE<span style="color: #000000;">&#41;</span><br />   oAlbum:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oDlgAlbum:<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br /><br />   @ oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-40</span>, oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-96</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Aceptar"</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">76</span>, <span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlgAlbum <span style="color: #0000ff;">ACTION</span> oDlgAlbum:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgAlbum ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> LiAlbum<span style="color: #000000;">&#40;</span> oAlbum, aImages, aRecno, oDlgAlbum <span style="color: #000000;">&#41;</span>, oDlgAlbum:<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> <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: #00C800;">function</span> LiAlbum<span style="color: #000000;">&#40;</span> oPanel, aPhotos, aRecno, oDlgAlbum <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nImgPerRow  := <span style="color: #000000;">8</span><br />   <span style="color: #00C800;">local</span> nImgWidth   <span style="color: #B900B9;">// := 180</span><br />   <span style="color: #00C800;">local</span> nImgHeight  <span style="color: #B900B9;">// := Int( nImgWidth * 4 / 3 )</span><br />   <span style="color: #00C800;">local</span> nHGutter    := <span style="color: #000000;">10</span><br />   <span style="color: #00C800;">local</span> nVGutter    := <span style="color: #000000;">20</span><br />   <span style="color: #00C800;">local</span> nCols       := nImgPerRow <br />   <span style="color: #00C800;">local</span> nRows, nRow, nCol, x, y, nImage, xMax, nImages := Len<span style="color: #000000;">&#40;</span> aPhotos <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oImage, oSay<br /><br />   <span style="color: #B900B9;">// el ancho del scrollbar es 16</span><br />   nImgWidth := INT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>oPanel:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-16</span>-<span style="color: #000000;">&#40;</span>nImgPerRow<span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span>*nHGutter<span style="color: #000000;">&#41;</span>/nImgPerRow<span style="color: #000000;">&#41;</span><br />   nImgHeight:= Int<span style="color: #000000;">&#40;</span> nImgWidth * <span style="color: #000000;">4</span> / <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />   nRows    := Ceiling<span style="color: #000000;">&#40;</span> nImages / nCols <span style="color: #000000;">&#41;</span><br />   xMax     := nCols * <span style="color: #000000;">&#40;</span> nImgWidth * nHGutter <span style="color: #000000;">&#41;</span><br />   y        := nVGutter<br />   nImage   := <span style="color: #000000;">1</span><br />   <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nImage <= nImages<br />      x     := nHGutter<br />      nCol  := <span style="color: #000000;">1</span><br />      <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nCol <= nCols .and. nImage <= nImages<br />         <span style="color: #B900B9;">// llamo a una funcion para conseguir detached locals</span><br />         LiAlbumImage<span style="color: #000000;">&#40;</span>y, x, nImgWidth, nImgHeight, oPanel, aPhotos, aRecno, nImage, nVGutter, oDlgAlbum<span style="color: #000000;">&#41;</span><br />         nImage++<br />         nCol++<br />         x  += <span style="color: #000000;">&#40;</span> nImgWidth + nHGutter <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">enddo</span><br />      y  += <span style="color: #000000;">&#40;</span> nImgHeight + <span style="color: #000000;">2</span>*nVGutter <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">enddo</span><br />   <span style="color: #B900B9;">//::nImgCols  := nCols</span><br />   <span style="color: #B900B9;">// ::nHeight   := y</span><br />   oPanel:<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// call this after defining all controls</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> LiAlbumImage<span style="color: #000000;">&#40;</span>y, x, nImgWidth, nImgHeight, oPanel, aPhotos, aRecno, nImage, nVGutter, oDlgAlbum<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oImage, oSay, nLiRecno<br />   nLiRecno := aRecno<span style="color: #000000;">&#91;</span>nImage<span style="color: #000000;">&#93;</span><br />   @ y, x XIMAGE oImage <span style="color: #0000ff;">SIZE</span> nImgWidth, nImgHeight <span style="color: #0000ff;">OF</span> oPanel NOBORDER<br />   oImage:<span style="color: #000000;">SetSource</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> HB_ISARRAY<span style="color: #000000;">&#40;</span> aPhotos<span style="color: #000000;">&#91;</span> nImage <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, aPhotos<span style="color: #000000;">&#91;</span> nImage, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aPhotos<span style="color: #000000;">&#91;</span> nImage <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   oImage:<span style="color: #000000;">nUserControl</span> := <span style="color: #000000;">0</span><br />   oImage:<span style="color: #000000;">lBmpTransparent</span> := .f.<br />   oImage:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> LiForm<span style="color: #000000;">&#40;</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oGrid</span>, <span style="color: #ff0000;">"edt"</span>, , nLiRecno, oDlgAlbum <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   @ y+nImgHeight+<span style="color: #000000;">&#40;</span>nVGutter/<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>, x <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> nLiRecno <span style="color: #0000ff;">FONT</span> oApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oFont</span> ;<br />      <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE ;<br />      <span style="color: #0000ff;">SIZE</span> nImgWidth, <span style="color: #000000;">2</span>*nVGutter <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oPanel<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:tncvekit] He modificado el código de Mr. Rao para definir el número de imágenes en horizontal que tiene la galería y que calcule el ancho de la imagen en consecuencia. También defino dos separaciones, una vertical y otro horizontal. La vertical la puedo usar para mostrar el título del libro u otro texto. El el código de arriba estoy mostrando el número de registro que corresponde a cada portada, para efectos de depuración, luego quitaré esto. En mi caso además de montar el array de imágenes monto otro de números de registro para que al hace doble click vaya a editar el libro correspondiente. Para conseguir esto he tenido que usar la técnica de 'detached locals' a la hora de crear las imágenes del álbum. Saludos, José Luis
galería de imágenes
José Luis, Te agradecemos si pones alguna imagen para que veamos como te está quedando <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
galería de imágenes
Pues está quedando fenomenal, aquí tenéis una imagen. [img:ck1nm727]https&#58;//www&#46;alanit&#46;com/wp-content/uploads/2021/01/btc-galeria&#46;png[/img:ck1nm727] Saludos,
galería de imágenes
muy bueno! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> gracias
galería de imágenes
Una nueva entrada en Harbour Magazine explicando como hacer una galería de imágenes: [url:yoghw0pk]https&#58;//medium&#46;com/harbour-magazine/c%C3%B3mo-crear-una-galer%C3%ADa-de-im%C3%A1genes-con-fwh-b8d88652ee27[/url:yoghw0pk] Saludos,
galería de imágenes
[quote="José Luis Sánchez":23whkta6]Una nueva entrada en Harbour Magazine explicando como hacer una galería de imágenes: [url:23whkta6]https&#58;//medium&#46;com/harbour-magazine/c%C3%B3mo-crear-una-galer%C3%ADa-de-im%C3%A1genes-con-fwh-b8d88652ee27[/url:23whkta6] Saludos,[/quote:23whkta6] Hola me gusto mucho como lo dejaste <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> compile tu código LiGaleria pero me salieron errores <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Error: Unresolved external '_HB_FUN_OAPP' referenced from C:\FWH\MODELISMO\OBJ\MIRADOR.OBJ Error: Unresolved external '_HB_FUN_LIFORM' referenced from C:\FWH\MODELISMO\OBJ\MIRADOR.OBJ faltara algo <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> a si se ve con el código TAlbum en mi programita [img:23whkta6]https&#58;//fotos&#46;subefotos&#46;com/0e5895e6f07d30ce6c2450588ac224a5o&#46;jpg[/img:23whkta6] Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
galería de imágenes
Aida, eso son funciones mías que puedes quitar del código sin problemas. oApp() es una función que devuelve la clase de la aplicación, es una manera de tener una clase global. La otra función edita un registro de la tabla Li. Saludos,
galería de imágenes
[quote="José Luis Sánchez":32umb02x]Aida, eso son funciones mías que puedes quitar del código sin problemas. oApp() es una función que devuelve la clase de la aplicación, es una manera de tener una clase global. La otra función edita un registro de la tabla Li. Saludos,[/quote:32umb02x] Sip gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ya me di cuenta <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> ya le estoy entendiendo al código para poder destriparlo <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> Gracias... Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
galería de imágenes
Hola José Luis ya pude adaptar tu galería a mi programita funciona super <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> pero me pregunto como se podría hacer que aparezca el nombre de cada modelo <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> ya intenta algunas cosas pero nop me sale Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> [url=https&#58;//ibb&#46;co/5c9f2N7:es4z45so][img:es4z45so]https&#58;//i&#46;ibb&#46;co/DKbSLxq/galeria&#46;jpg[/img:es4z45so][/url:es4z45so] no le encuentro que ponga todos los nombres solo pone el del primer registro <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> [url=https&#58;//ibb&#46;co/5kFrVbm:es4z45so][img:es4z45so]https&#58;//i&#46;ibb&#46;co/RNy3WRf/galeria1&#46;jpg[/img:es4z45so][/url:es4z45so] ya lo logre ya salen los nombres <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> [url=https&#58;//ibb&#46;co/9vNjmmg:es4z45so][img:es4z45so]https&#58;//i&#46;ibb&#46;co/596VXX4/galeria4&#46;jpg[/img:es4z45so][/url:es4z45so]
garbage collector?
Hello, It happens that there is a need to reset the PPC before running again the FWPPC application. After closing the application if I try to copy a new version of the application from the PC to the PPC it can be done just after reseting the PPC. Or, when trying to run the application again there is, again, a need to reset the PPC. After reseting the PPC it is working ok: overwriting an application by a new version or running again the application. It doesn't happen every time. It seems that it happens just after using the application few times. That is the reason I was thinking about garbage collector. Thanks, Moshe Yarden
garbage collector?
Moshe, You should call hb_gcAll() from time to time, mainly after doing some work from your EXE, so the garbage collector cleans all the unused memory.
garbage collector?
Antonio, Thanks. I'll add it. Is there a full list of FWPPC FUNCTIONS? FTP between PPC and PC using GPRS, and automatic internet open: had it been added to the samples? Regards, Moshe Yarden
garbage collector?
Moshe, hb_gcAll() is a Harbour function, not a FWPPC one. You can check our wiki to review the most updated documentation: <!-- m --><a class="postlink" href="http://wiki.fivetechsoft.com">http://wiki.fivetechsoft.com</a><!-- m --> It is a work in progress. Also it is important that you check the consume of GDI objects in your application, please review this thread: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=15935&start=0&hilit=gdi">viewtopic.php?f=3&t=15935&start=0&hilit=gdi</a><!-- l -->
garbage collector?
Moshe, Regarding FTP, it will work no matter how you set the internet connection. I mean, once the internet conection is working, FTP works as usual. Please review FWPPC\samples\ftp.prg and ftpdir.prg
garbage collector?
Antonio, Thanks a lot. I'll check it all. Regards, Moshe Yarden
garbage collector?
Re: How to auto open an Internet connection by Otto » Thu Oct 15, 2009 7:49 am <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=4&t=15508&p=80987&hilit=GprsConnect#p80987">viewtopic.php?f=4&t=15508&p=80987&hilit=GprsConnect#p80987</a><!-- l --> Best regards, Otto
gcc 7.2 compiling \fw\sources\calldll.c
Hello everyone! I'm trying to compile fwh source file calldll.c using MinGW32 7.2 I'm getting some errors. I'm hoping someone here can point me in the right direction. I'm able to compile just fine using borland c++. The problem is when I switch c compilers to MinGW 7.2. Here are some of the errors I'm talking about&#058; [code=fw:opvez3f7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />hbmk2: <span style="color: #000000;">Compiling</span>...<br />/winapi/calldll.c:<span style="color: #000000;">75</span>:<span style="color: #000000;">30</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">unknown</span> type <span style="color: #0000ff;">name</span> <span style="color: #ff0000;">'PCLIPVAR'</span>;<br /> did you mean <span style="color: #ff0000;">'CLIPDATA'</span>?<br /> <span style="color: #00C800;">static</span> LPWORD GetNumAddress<span style="color: #000000;">&#40;</span> PCLIPVAR pVar <span style="color: #000000;">&#41;</span><br />                              ^~~~~~~~<br />                              CLIPDATA<br />/winapi/calldll.c: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'GetLongAddress'</span>:<br />/winapi/calldll.c:<span style="color: #000000;">92</span>:<span style="color: #000000;">11</span>: <span style="color: #000000;">warning</span>: <span style="color: #000000;">array</span> subscript has type <span style="color: #ff0000;">'c<br />har'</span> <span style="color: #000000;">&#91;</span>-Wchar-subscripts<span style="color: #000000;">&#93;</span><br />    paLongs<span style="color: #000000;">&#91;</span> b <span style="color: #000000;">&#93;</span> = lValue;<br />           ^<br />/winapi/calldll.c:<span style="color: #000000;">94</span>:<span style="color: #000000;">21</span>: <span style="color: #000000;">warning</span>: <span style="color: #000000;">array</span> subscript has type <span style="color: #ff0000;">'c<br />har'</span> <span style="color: #000000;">&#91;</span>-Wchar-subscripts<span style="color: #000000;">&#93;</span><br />    <span style="color: #00C800;">return</span> &<span style="color: #000000;">&#40;</span> paLongs<span style="color: #000000;">&#91;</span> b <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>;<br />                     ^<br /><span style="color: #00C800;">At</span> top level:<br />/winapi/calldll.c:<span style="color: #000000;">381</span>:<span style="color: #000000;">13</span>: <span style="color: #000000;">warning</span>: <span style="color: #ff0000;">'power'</span> defined but not us<br />ed <span style="color: #000000;">&#91;</span>-Wunused-<span style="color: #00C800;">function</span><span style="color: #000000;">&#93;</span><br /> <span style="color: #00C800;">static</span> LONG <span style="color: #0000ff;">power</span><span style="color: #000000;">&#40;</span> LONG nPower <span style="color: #000000;">&#41;</span><br />             ^~~~~<br />/winapi/calldll.c:<span style="color: #000000;">90</span>:<span style="color: #000000;">15</span>: <span style="color: #000000;">warning</span>: <span style="color: #ff0000;">'GetLongAddress'</span> defined bu<br />t not used <span style="color: #000000;">&#91;</span>-Wunused-<span style="color: #00C800;">function</span><span style="color: #000000;">&#93;</span><br /> <span style="color: #00C800;">static</span> LPLONG GetLongAddress<span style="color: #000000;">&#40;</span> LONG * paLongs, char b, LONG lValue <span style="color: #000000;">&#41;</span><br />               ^~~~~~~~~~~~~~<br />hbmk2 <span style="color: #000000;">&#91;</span>MpServ<span style="color: #000000;">&#93;</span>: <span style="color: #000000;">Error</span>: <span style="color: #000000;">Running</span> C/C++ compiler. <span style="color: #000000;">1</span><br />gcc.exe -c -O3 -fno-ident  -W -Wall -Wlogical-op -Wduplicated-cond -Wshift-negat<br />ive-value -Wnull-dereference -m32 -pipe -<span style="color: #00C800;">If</span>:/hb3432_mingw_1712201340/include -I/<br />ads10/acesdk -I/hb3432_mingw_1712201340/include -I/mp10/shared/include -I/fwh_20<br />17_05/include -<span style="color: #00C800;">If</span>:/hb3432_mingw_1712201340/contrib/hbtip -<span style="color: #00C800;">If</span>:/hb3432_mingw_17122<br /><span style="color: #000000;">01340</span>/contrib/hbssl -<span style="color: #00C800;">If</span>:/hb3432_mingw_1712201340/contrib/rddads -<span style="color: #00C800;">If</span>:/hb3432_ming<br />w_1712201340/contrib/hbct -<span style="color: #00C800;">If</span>:/hb3432_mingw_1712201340/contrib/xhb -<span style="color: #00C800;">If</span>:/hb3432_m<br />ingw_1712201340/contrib/hbwin -<span style="color: #00C800;">If</span>:/hb3432_mingw_1712201340/contrib/hbmzip f:/mp1<br /><span style="color: #000000;">0</span>/services/obj/Sql_funcs.c /fwh_2017_05/source/winapi/calldll.c<br /><br />F:\Mp10\Services></div>[/code:opvez3f7] Thank you all; Reinaldo.
gcc 7.2 compiling \fw\sources\calldll.c
Reinaldo, fwh\sources\calldll.c is not compatible with gcc We use a different one (not provided in FWH\sources) for gcc and it is included in FWH libs If you need its source code, please send me an email
gcc y xMate (necesito archivo.env)
Amigos:Si alguien usa gcc y xmate, me podrina enviar el archivo.env ?Muchas graciasRuben Fernandez
gdi+
can we cal gdi+ in fwh ?and How ?gdi+ have many important functions
gdi+
Silvio,This is a first test, but you have to use bcc582 or higher. It will not work with bcc55.test.prg[code:2nerisc9] #include "FiveWin&#46;ch" function Main&#40;&#41; GDIPLUSSTARTUP&#40;&#41; GDIPLUSSHUTDOWN&#40;&#41; MsgInfo&#40; "ok" &#41; return nil #pragma BEGINDUMP #include <hbapi&#46;h> #include <windows&#46;h> #include <Gdiplus&#46;h> GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; HB_FUNC&#40; GDIPLUSSTARTUP &#41; &#123; // Initialize GDI+ GdiplusStartup&#40; &gdiplusToken, &gdiplusStartupInput, NULL &#41;; &#125; HB_FUNC&#40; GDIPLUSSHUTDOWN &#41; &#123; // Shutdown using gdiplus GdiplusShutdown&#40; gdiplusToken &#41;; &#125; #pragma ENDDUMP [/code:2nerisc9]
gdi+
Time to use BCC 5.8xx!!
gdi+
Moises,Just for those that need to use GDI+ <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
gdi+
[quote:2dals9i9]Time to use BCC 5.8xx[/quote:2dals9i9]Where i can get this newer compiler?
genblock
[b:3g67rt8l]I have 9 button[/b:3g67rt8l] when I press a button return allway 9 nRow:=30 For n= 1 to 9 @ nRow,2 BTNBMP aBtnCalc[n] PROMPT ltrim(str(n+1)) FLAT SIZE 20,30 PIXEL of oDlg ; ACTION AddItems(oInvoice,aItems,[b:3g67rt8l]GenBlock_(n)[/b:3g67rt8l],@nRowItems,fromdate,Todate) nRow+=32 NEXt fUNCTION GenBlock_(n) RETURN n and I Wish insert on GenBlock_(n) a right number (n)
genblock
dear Silvio, search the forum for detached locals. Or have a look here [url:33hmvvlg]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=41373&hilit=detached+local[/url:33hmvvlg] Regards, Detlef
genblock
Because ACTION clause generates an "internal" codeblock, so run ok: [code=fw:3djeenp9]<div class="fw" id="{CB}" style="font-family: monospace;">nRow:=<span style="color: #000000;">30</span><br /><span style="color: #00C800;">For</span> n= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">9</span><br />   <span style="color: #00D7D7;">#Define</span> PARAMS1_ oDlg, aBtnCalc, nRow, n, oInvoice, aItems, @nRowItems, fromdate, Todate<br />   <span style="color: #00D7D7;">#Define</span> PARAMS2_ oDlg, aBtnCalc, nRow, n, oInvoice, aItems,  nRowItems, fromdate, Todate<br />   GenButton<span style="color: #000000;">&#40;</span>PARAMS1_<span style="color: #000000;">&#41;</span><br />   nRow+=<span style="color: #000000;">32</span><br /><span style="color: #00C800;">NEXt</span><br /><br /><span style="color: #00C800;">fUNCTION</span> GenButton<span style="color: #000000;">&#40;</span>PARAMS2_<span style="color: #000000;">&#41;</span><br />@ nRow,<span style="color: #000000;">2</span> <span style="color: #0000ff;">BTNBMP</span> aBtnCalc<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> ltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>n<span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> FLAT <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">of</span> oDlg ;<br /><span style="color: #0000ff;">ACTION</span> AddItems<span style="color: #000000;">&#40;</span>oInvoice,aItems,n,@nRowItems,fromdate,Todate<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3djeenp9]
genblock
Sorry I explain I making a multiple invoice for beach management in managing the beach, in addition to individual customers, there are associations or hotels that can book an x number of umbrellas, instead of placing an order for each umbrella at the hotel, I thought of making a multiple order and assigning XXXX n umbrellas to the hotel. look this picture [img:3oaaht2m]https&#58;//i&#46;postimg&#46;cc/t45XNtbr/ser&#46;png[/img:3oaaht2m] to assign the umbrellas the operator presses one of the numerical buttons that are on the left and then selects a button that is inside the first scrollable panel on First Scroll Panel If I select one button it return allways 04 on source on a for next cicle I create the buttons into scrollpanel and the assign an action for each button aBtnEle[n]:bAction :={ || (Elemento:= nProduct ,msginfo(nProduct))} [b:3oaaht2m]nProduct[/b:3oaaht2m] id the code of an array nProduct:= aElements[n][1] but perhaps n is allways 4 How I can resolve ?
genblock
hi Silvo, as Detlef say : detached Locals when build in a "Loop" and use "Counter" you must call a Function to build a String for Codeblock so your "Counter" Number will be a STR() in a String [code=fw:2iuiwm4l]<div class="fw" id="{CB}" style="font-family: monospace;">      <span style="color: #00C800;">FOR</span> ii := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">26</span>              <span style="color: #B900B9;">// A-Z</span><br /><br />         @ <span style="color: #000000;">40</span>, <span style="color: #000000;">&#40;</span> ii - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> nBB * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">SIZE</span> nBB * <span style="color: #000000;">2</span>, nBB <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oMain ;<br />                 <span style="color: #0000ff;">PROMPT</span> cDrive <span style="color: #0000ff;">LEFT</span> ;<br />                 <span style="color: #0000ff;">RESNAME</span> cBitmap ;<br />                 <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">COLOR</span> BFcolor, BGcolor<br /><br />         bBlock := DetachBlock<span style="color: #000000;">&#40;</span>ii<span style="color: #000000;">&#41;</span><br />         oBtn:<span style="color: #000000;">bAction</span>  := bBlock</div>[/code:2iuiwm4l] [code=fw:2iuiwm4l]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> DetachBlock<span style="color: #000000;">&#40;</span> ii <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> cBlock := <span style="color: #ff0000;">"{|| msgInfo("</span> + STR<span style="color: #000000;">&#40;</span> ii <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">")}"</span><br /><span style="color: #00C800;">LOCAL</span> bBlock<br />   bBlock := &cBlock<br /><span style="color: #00C800;">RETURN</span> bBlock</div>[/code:2iuiwm4l] --- about "04" : on right side of Button you have some Listbox ... how many Element have 1st Listbox ?
genblock
I resolved with cargo
generador interactivo de listados
Hola a todos: En primer lugar, feliz navidad!!!. Creo que tenemos que estar muy contentos con la marcha de fivewin y los esfuerzos de Antonio. Me gustaría saber si existe algún generador de listados interactivo, en el que tu puedas seleccionar los campos de la base de datos, filtros, etc, que funcione bajo Harbour. Mil gracias.
generador interactivo de listados
Has probado EasyReport ? Nosotros regalamos una versión personal de EasyReport con la compra de FWH.
generador interactivo de listados
si, muchas gracias, ya lo he probado quiero usar la clase report y poner y quitar campos solo. Creo que había un ejemplo que lo hacía. Gracias.
generador interactivo de listados
[quote="sgisoft":3bq09wvp]si, muchas gracias, ya lo he probado quiero usar la clase report y poner y quitar campos solo. Creo que había un ejemplo que lo hacía. Gracias.[/quote:3bq09wvp] Por algún lugar debe estar el CAW-Form de Alfredo Arteaga es muy bueno. Es mas, no dudo en que el lo vuelva a publicar si no se encuentra. Saludos PD Alfredito, no recuerdo si así se llamaba CAW-Form o algo asi.
generador interactivo de listados clase TREPORT
Hola: Me gustaría saber si existe esto, ya sea free o de pago, un asistente para construir listados con la clase TReport, indicando campos, título de columnas, anchura, fuente, etc. Muchas Gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
generador interactivo de listados clase TREPORT
Hola. Creo que existe algo desde hace bastante tiempo llamado MIDAS (no lo he usado aun) Puede que te sirva. Saludos.
generador interactivo de listados clase TREPORT
see adhoc application !!!!!!!!!!!!!
generador interactivo de listados clase TREPORT
Silvio, Runahdoc no sopora longitud de la columna, y su código fuente es un poco complicado de entender para mí y arreglarlo.
generador interactivo de listados clase TREPORT
sorry but it can be easy modified If you want we can modified it together I use it for an my application with success
generador interactivo de listados clase TREPORT
Puedes evaluar esto: <!-- m --><a class="postlink" href="http://www.despachoarteaga.com.mx/Visor.zip">http://www.despachoarteaga.com.mx/Visor.zip</a><!-- m --> si te agrada, lo usas o haces alguna mejora te agradeceremos la compartas.
generador interactivo de listados clase TREPORT
Hola Si quieres algo de paga te recomiendo FASTREPORT, creo que es uno de los mejores Report para xharbour [url:euiwmrto]http&#58;//www&#46;paritetsoft&#46;ru/frh&#46;htm[/url:euiwmrto]
generador interactivo de listados clase TREPORT
Hola: Muchas gracias por las respuestas. Alfredo, sí busco una cosa como la tuya pero con control de tamaños. Lo voy a modificar y posteo los cambios con tu permiso. Patricio, muchas gracias pero lo que busco es Listados y no Informes. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
generador interactivo de listados clase TREPORT
Sin complicaciones, ya está el cambio para modificar el tamaño del dato a imprimir. <!-- m --><a class="postlink" href="http://www.despachoarteaga.com.mx/Visor.zip">http://www.despachoarteaga.com.mx/Visor.zip</a><!-- m -->
generador interactivo de listados clase TREPORT
Alfredo: Muchísimas gracias por tu amable ayuda <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->. Un saludo, jesús
generador interactivo de listados clase TREPORT
[quote="Alfredo Arteaga":13zt7fle]Puedes evaluar esto: <!-- m --><a class="postlink" href="http://www.despachoarteaga.com.mx/Visor.zip">http://www.despachoarteaga.com.mx/Visor.zip</a><!-- m --> si te agrada, lo usas o haces alguna mejora te agradeceremos la compartas.[/quote:13zt7fle] Alfredo, muy buena la aplicación. ¿Como consigues imprimir desde el previo en PDF?
generador interactivo de listados clase TREPORT
No hay secretos Manuel, uso Image2PDF.Dll que va incluida en el zip. Estos son los cambios: [code=fw:2zu4ayoe]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// --- Cambios a RPreview para trabajar con Image2PDF</span><br /><br /><span style="color: #B900B9;">// ---</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Acrobat"</span> <span style="color: #0000ff;">OF</span> oBar ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Generar archivo tipo PDF"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> &nbsp;SavePDF<span style="color: #000000;">&#40;</span> oDevice <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Generar archivo PDF"</span><br /><span style="color: #B900B9;">// ---</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Generar PDF"</span> <span style="color: #0000ff;">ACTION</span> SavePDF<span style="color: #000000;">&#40;</span>oDevice<span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Generar archivo tipo PDF"</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Acrobat"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> SavePDF<span style="color: #000000;">&#40;</span>oDevice<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> error, hLibImg2PDF<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> imageFilename:=<span style="color: #ff0000;">" "</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cPdfFilename<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nI, iErr:=<span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aFiles:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, cTemp<br />&nbsp; &nbsp;cPdfFileName:=cUTem+<span style="color: #ff0000;">"<span style="color: #000000;">\"</span>+Left(cNSys,2)+"</span>_Temp\<span style="color: #ff0000;">"+oDevice:cDocument+"</span>.Pdf<span style="color: #ff0000;">"<br />&nbsp; &nbsp;IF !File("</span>Image2PDF.Dll<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; MsgAlert("</span>No existe DLL para generar PDFs.<span style="color: #ff0000;">","</span>Precaución!<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; RETURN (NIL)<br />&nbsp; &nbsp;ENDIF<br />&nbsp; &nbsp;aFiles:=oDevice:aMeta<br />&nbsp; &nbsp;hLibImg2PDF:=LoadLib32("</span>Image2PDF.Dll<span style="color: #ff0000;">")<br />&nbsp; &nbsp;IF ValType(aFiles)=="</span>A<span style="color: #ff0000;">"<br />&nbsp; &nbsp; &nbsp; I2PDF_License("</span>LICENCIA<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; iErr:=IPMeta() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Flag that his is a meta file<br />&nbsp; &nbsp; &nbsp; iErr:=IPSize() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Reset the size<br />&nbsp; &nbsp; &nbsp; iErr:=IPMetaAdjustText()<br />&nbsp; &nbsp; &nbsp; iErr:=IPSetDPI(0) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Set DPI to the default for PDF's. &nbsp;It works better<br />&nbsp; &nbsp; &nbsp; FOR nI:=1 TO Len(aFiles) &nbsp; &nbsp;// Build the pages using the array of temp files<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CursorWait()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;imageFilename:=aFiles[nI]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iErr:=IPAddImg(imageFilename)<br />&nbsp; &nbsp; &nbsp; NEXT nI<br />&nbsp; &nbsp; &nbsp; CursorWait()<br />&nbsp; &nbsp; &nbsp; iErr:=IPMakePDF(cPdfFileName,0,error,40) &nbsp; // Create the PDF.<br />&nbsp; &nbsp;ENDIF<br />&nbsp; &nbsp;FreeLib32(hLibImg2PDF)<br />&nbsp; &nbsp;CursorArrow()<br />&nbsp; &nbsp;IF !File(cPdfFileName)<br />&nbsp; &nbsp; &nbsp; MsgInfo("</span>No se generó el archivo PDF.<span style="color: #ff0000;">","</span>Información!<span style="color: #ff0000;">")<br />&nbsp; &nbsp;ELSE<br />&nbsp; &nbsp; &nbsp; ShellExecute(,"</span>Open<span style="color: #ff0000;">",cPdfFileName,"</span><span style="color: #ff0000;">","</span>.\<span style="color: #ff0000;">",.T.)<br />&nbsp; &nbsp;ENDIF<br />RETURN (NIL)<br /><br />//--- Wrappers ---------------------------------------------------------------//<br /><br />&nbsp; &nbsp;DLL32 STATIC FUNCTION I2PDF_License( code AS LPSTR) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_License<span style="color: #ff0000;">" LIB "</span>IMAGE2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 STATIC FUNCTION IPMeta( ) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_MetaToNativePDF<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 STATIC FUNCTION IPMetaAdjustText() AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_MetaTextFitBoundingRect<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 STATIC FUNCTION IPSize( ) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_UseEMFDeviceSize<span style="color: #ff0000;">" LIB "</span>Image2PDF.DLL<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 STATIC FUNCTION IPAddImg( cImage AS LPSTR ) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_AddImage<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 STATIC FUNCTION IPSetDpi( nDpi AS LONG ) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_SetDPI<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 STATIC FUNCTION IPMakePDF( cOutFile AS LPSTR, nOptions AS LONG, cErrTxt AS LPSTR, nMaxESize AS LONG ) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_MakePDF<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 &nbsp;FUNCTION COPYFILE( cExistName AS LPSTR, cNewName AS LPSTR, nFailIfExist AS LONG ) AS BOOL;<br />&nbsp; &nbsp;PASCAL FROM "</span>CopyFileA<span style="color: #ff0000;">" LIB "</span>kernel32.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 FUNCTION xI2PDF_BatesFormat( format AS LPSTR ) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_BatesFormat<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 FUNCTION xI2PDF_BatesLocation( verticalPosition AS LONG, horizontalPosition AS LONG, orientation AS LONG, margin AS LONG) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_BatesLocation<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 FUNCTION xI2PDF_BatesFont_Int( iSize AS LONG, FontID AS LPSTR, fillRed AS LONG, fillGreen AS LONG, fillBlue AS LONG, iStyle AS LONG, otherRed AS LONG, otherGreen AS LONG, otherBlue AS LONG) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_BatesFont_Int<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;DLL32 FUNCTION xI2PDF_BatesBackground_Int( shape AS LONG, bkRed AS LONG, bkGreen AS LONG, bkBlue AS LONG, borderRed AS LONG, borderGreen AS LONG, borderBlue AS LONG &nbsp;) AS LONG;<br />&nbsp; &nbsp;PASCAL FROM "</span>I2PDF_BatesBackground_Int<span style="color: #ff0000;">" LIB "</span>Image2PDF.dll<span style="color: #ff0000;">"<br /><br />//----------------------------------------------------------------------------//<br /><br /></span></div>[/code:2zu4ayoe]
generador interactivo de listados clase TREPORT
Les dejo un último ajuste donde agregué un ComboBox para seleccionar la alineación de los datos (Right, Left, Center). [code=fw:px0s8p6o]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> New_Report<span style="color: #000000;">&#40;</span>oLbx<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, &nbsp;oHdr, oData, oField, nI<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nFld, nDat, nF, cAlias, oSiz<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oCel, lCel, nOpt, cTit, oAlg<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aAlg:=<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Izq."</span>,<span style="color: #ff0000;">"Cen."</span>,<span style="color: #ff0000;">"Der."</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aField:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aData:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aHead:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aTypD:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aSizD:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aAlig:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aType:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aSizs:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aPict:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;nDat:= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;nFld:= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;nOpt:= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;lCel:=.F.<br />&nbsp; &nbsp;cTit:=<span style="color: #ff0000;">"Reporte de "</span>+cTitl+Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cAlias:=oLbx:<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DbSelectArea<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nF:=<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>FCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;ASize<span style="color: #000000;">&#40;</span>aField,nF<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;ASize<span style="color: #000000;">&#40;</span>aType,nF<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;ASize<span style="color: #000000;">&#40;</span>aSizs,nF<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;ASize<span style="color: #000000;">&#40;</span>aPict,nF<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AFields<span style="color: #000000;">&#40;</span>aField,aType,aSizs<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nI=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nF<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> nI<=<span style="color: #000000;">3</span> &nbsp;<span style="color: #B900B9;">// tres como mínimo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span>aData,aField<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span>aHead,aField<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span>aTypD,aType<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span>aSizD,aSizs<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span>aAlig,<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>aType<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span>=<span style="color: #ff0000;">"N"</span>,<span style="color: #ff0000;">"Der."</span>,<span style="color: #ff0000;">"Izq."</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nI:=nF<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span> nI<br />&nbsp; &nbsp;AFill<span style="color: #000000;">&#40;</span>aPict,<span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SDS_VSR"</span> <span style="color: #0000ff;">FONT</span> oWnd:<span style="color: #000000;">oFont</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Configuración del Reporte"</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg ; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Agregar</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>oData:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span>aField<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aHead,aField<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aTypD,aType<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aSizD,aSizs<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aAlig,<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>aType<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span>=<span style="color: #ff0000;">"N"</span>,<span style="color: #ff0000;">"Der."</span>,<span style="color: #ff0000;">"Izq."</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; nDat:=Len<span style="color: #000000;">&#40;</span>aHead<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oSiz:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oAlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oHdr:<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 />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg ; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Borrar</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span>aHead<span style="color: #000000;">&#41;</span>==<span style="color: #000000;">1</span>, MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>oData:<span style="color: #000000;">Del</span><span style="color: #000000;">&#40;</span>nDat<span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span>aHead,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span>aHead,Len<span style="color: #000000;">&#40;</span>aHead<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span>aTypD,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span>aTypD,Len<span style="color: #000000;">&#40;</span>aTypD<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span>aSizD,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span>aSizD,Len<span style="color: #000000;">&#40;</span>aSizD<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span>aAlig,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span>aAlig,Len<span style="color: #000000;">&#40;</span>aAlig<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; nDat:=<span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span>aHead<span style="color: #000000;">&#41;</span>,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oSiz:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oAlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oHdr:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg ; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Insertar</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>oData:<span style="color: #000000;">Insert</span><span style="color: #000000;">&#40;</span>aField<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span>,nDat<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aHead,<span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aIns<span style="color: #000000;">&#40;</span>aHead,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aHead<span style="color: #000000;">&#91;</span>nDat<span style="color: #000000;">&#93;</span>:=aField<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aTypD,<span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aIns<span style="color: #000000;">&#40;</span>aTypD,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aTypD<span style="color: #000000;">&#91;</span>nDat<span style="color: #000000;">&#93;</span>:=aType<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aSizD,<span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aIns<span style="color: #000000;">&#40;</span>aSizD,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aSizD<span style="color: #000000;">&#91;</span>nDat<span style="color: #000000;">&#93;</span>:=aSizs<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span>aAlig,<span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aIns<span style="color: #000000;">&#40;</span>aAlig,nDat<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; aAlig<span style="color: #000000;">&#91;</span>nDat<span style="color: #000000;">&#93;</span>:=<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>aType<span style="color: #000000;">&#91;</span>nFld<span style="color: #000000;">&#93;</span>=<span style="color: #ff0000;">"N"</span>,<span style="color: #ff0000;">"Der."</span>,<span style="color: #ff0000;">"Izq."</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oSiz:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oAlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; oHdr:<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 />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oField <span style="color: #0000ff;">VAR</span> nFld <span style="color: #0000ff;">ITEMS</span> aField <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oData &nbsp;<span style="color: #0000ff;">VAR</span> nDat <span style="color: #0000ff;">ITEMS</span> aData &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span>oHdr:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oSiz:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oAlg:<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 />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oHdr <span style="color: #0000ff;">VAR</span> aHead<span style="color: #000000;">&#91;</span>nDat<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> oDlg MEMO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Get head</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oSiz <span style="color: #0000ff;">VAR</span> aSizD<span style="color: #000000;">&#91;</span>nDat<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">107</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span> &nbsp; &nbsp; <span style="color: #B900B9;">// Get size</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oAlg <span style="color: #0000ff;">VAR</span> aAlig<span style="color: #000000;">&#91;</span>nDat<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ITEMS</span> aAlg <span style="color: #0000ff;">ID</span> <span style="color: #000000;">108</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp; &nbsp;<span style="color: #B900B9;">// Get align</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> oCel <span style="color: #0000ff;">VAR</span> lCel &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">RADIO</span> nOpt <span style="color: #0000ff;">ID</span> <span style="color: #000000;">112</span>,<span style="color: #000000;">113</span>,<span style="color: #000000;">114</span>,<span style="color: #000000;">115</span> &nbsp; <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> cTit <span style="color: #0000ff;">ID</span> <span style="color: #000000;">116</span> <span style="color: #0000ff;">OF</span> oDlg MEMO<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> Gen_Report<span style="color: #000000;">&#40;</span>cAlias,cTit,nOpt,lCel<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">OF</span> oDlg <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 />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><br />STAT FUNC Gen_Report<span style="color: #000000;">&#40;</span>cAlias,cTit,nOpt,lCel<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oReport, oDevice, cFTxt, cHead, cData<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cGroup, oFont, nI, nRecno, nFld<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> cFont <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> nOpt==<span style="color: #000000;">1</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// pantalla</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">PRINT</span> oDevice <span style="color: #0000ff;">TITLE</span> cTit PREVIEW<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;REPORT oReport &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> Trim<span style="color: #000000;">&#40;</span>cTit<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER <span style="color: #ff0000;">"Fecha: "</span>+DtoC<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> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Hora: "</span> +Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FOOTER <span style="color: #ff0000;">"Hoja: "</span> + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Str<span style="color: #000000;">&#40;</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">CENTERED</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PREVIEW &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAPTION cTit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> DEVICE oDevice<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> nOpt==<span style="color: #000000;">2</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Impresora</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">PRINT</span> oDevice <span style="color: #0000ff;">TITLE</span> cTit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;REPORT oReport &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> Trim<span style="color: #000000;">&#40;</span>cTit<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER <span style="color: #ff0000;">"Fecha: "</span>+DtoC<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> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Hora: "</span> +Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FOOTER <span style="color: #ff0000;">"Hoja: "</span> + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Str<span style="color: #000000;">&#40;</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">CENTERED</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAPTION cTit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> DEVICE oDevice<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> nOpt==<span style="color: #000000;">3</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Archivo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cFTxt:=cPatD+cAlias+<span style="color: #ff0000;">".Txt"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;REPORT oReport &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> Trim<span style="color: #000000;">&#40;</span>cTit<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER <span style="color: #ff0000;">"Fecha: "</span>+DtoC<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> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Hora: "</span> +Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FOOTER <span style="color: #ff0000;">"Hoja: "</span> + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Str<span style="color: #000000;">&#40;</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">CENTERED</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CAPTION cTit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> FILE <span style="color: #000000;">&#40;</span>cFTxt<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> nOpt==<span style="color: #000000;">4</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Excel</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rpt_Excel<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDCASE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nI:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">&#40;</span>aData<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RptAddColumn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>Get_Head<span style="color: #000000;">&#40;</span>aHead,nI<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>Get_Data<span style="color: #000000;">&#40;</span>aData,nI<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>, &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aSizD<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>Trim<span style="color: #000000;">&#40;</span>aPict<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>, &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>aTypD<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span>==<span style="color: #ff0000;">"N"</span><span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>|| .T. <span style="color: #000000;">&#125;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>aAlig<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span>=<span style="color: #ff0000;">"Der."</span>,<span style="color: #ff0000;">"RIGHT"</span>,<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>aAlig<span style="color: #000000;">&#91;</span>nI<span style="color: #000000;">&#93;</span>=<span style="color: #ff0000;">"Cen."</span>,<span style="color: #ff0000;">"CENTER"</span>,<span style="color: #ff0000;">"LEFT"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp;ENDREPORT<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lCel<br />&nbsp; &nbsp; &nbsp; oReport:<span style="color: #000000;">CellView</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nRecno:=<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> REPORT oReport <span style="color: #0000ff;">ON</span> STARTGROUP oReport:<span style="color: #000000;">NewLine</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbGotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbGoto<span style="color: #000000;">&#40;</span>nRecno<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nOpt=<span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; ShellExecute<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span>,<span style="color: #ff0000;">"Open"</span>,cFTxt,<span style="color: #00C800;">Nil</span>,<span style="color: #00C800;">Nil</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:px0s8p6o]
generador interactivo de listados clase TREPORT
[quote="Alfredo Arteaga":2sjb69cf]No hay secretos Manuel, uso Image2PDF.Dll que va incluida en el zip. [/quote:2sjb69cf] Muchas gracias Alfredo. Funcionó perfectamente, aunque, logicamente, como versión de evaluación.
generador interactivo de listados clase TREPORT
Aqui de nuevo! A solicitud de un buen amigo (JCSO) he separado el paso que tengo en uso para el diseño de documentos. Y por qué no ponerlo a disposición de todos? <!-- m --><a class="postlink" href="http://www.despachoarteaga.com.mx/Visor.zip">http://www.despachoarteaga.com.mx/Visor.zip</a><!-- m --> Recuerdo ya haber puesto algo similar hace un par de años con motivo de mi primer mitad de siglo (8 de diciembre), todavía no se cumple la fecha pero les adelanto el obsequio. Ah!, según las estadísticas ya se superan las 200 descargas, seguro se van a duplicar. Solo espero que este pedazo de código sea útil a más de uno. Saludos.
generador interactivo de listados clase TREPORT
Alfredo, Muchas gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
generador interactivo de listados clase TREPORT
No se puede esperar menos de un sr. como ud. amigo Alfredo, gracias por sus aportes.
generador interactivo de listados clase TREPORT
Dear Alfredo, Perhaps from your generation of report we can add the other functions there are on ADHOC as 1. select the fields to index 2. set the header names 3. set the title ( 3 titles) 4. set totals 5. set data group ( from 1 to 6 max) and save all these information data on GRP file
generador interactivo de listados clase TREPORT
Adelante Silvio. El código está disponible y cualquier mejora es bienvenida.
generador interactivo de listados clase TREPORT
Alfredo I sent you a old test ....
generador interactivo de listados clase TREPORT
Encontre otra forma de crear archivos pdf usando un programa ImageMagick. La sintaxis es la siguiente. FUNCTION SavePDF(oDevice) LOCAL aFiles:={}, cImgFileName aFiles:=oDevice:aMeta MsgInfo(GetEnv("Temp")) cPdfFileName:="Temp\"+oDevice:cDocument+".Pdf" FOR nI:=1 TO Len(aFiles) // Build the pages using the array of temp files CursorWait() cImgFilename:=aFiles[nI] // MsgInfo("Imagen "+cImgFileName) WaitRun( "nconvert -out jpeg " + " -D " + cImgFileName, 0 ) NEXT nI WaitRun("G:\Util\ImageMagick6582\convert "+GetEnv("Temp")+"\*.jpeg "+Alltrim(cPdfFileName),0) CursorArrow() IF !File(cPdfFileName) MsgInfo("No se generó el archivo PDF.","Información!") ELSE ShellExecute(,"Open",cPdfFileName,"",".\",.T.) ENDIF Return Nil Es todo Atte Manuel J. Morales Q. Lima Peru
generador interactivo de listados clase TREPORT
Despues de realizar pruebas logre mejorar la calidad de la imagen en el archivo pdf Esta funcion se debe agregar a Tpreview igual que en el caso de image2pdf FUNCTION SavePDF(oDevice) LOCAL aFiles:={}, cImgFileName aFiles:=oDevice:aMeta cPdfFileName:="Temp\"+oDevice:cDocument+".Pdf" WaitRun("convert "+GetEnv("Temp")+"\*.emf "+Alltrim(cPdfFileName),0) CursorArrow() IF !File(cPdfFileName) MsgInfo("No se generó el archivo PDF.","Información!") ELSE ShellExecute(,"Open",cPdfFileName,"",".\",.T.) ENDIF Return Nil
generador interactivo de listados clase TREPORT
ImageMagick: [url:2332mbgd]http&#58;//www&#46;imagemagick&#46;org/script/index&#46;php[/url:2332mbgd] Espero que les sea util Manuel J. Morales Q. Lima Perú
generar .txt
hola foro, tengo en una base de datos 100 registros con los campos codigo1,codigo2,codigo3,importe, consecutivo y quiero generar esos registros en un layout en un .txt ej: 01 = codigo1 01 = codigo2 02 = codigo3 000150000 = importe ($1500.00) 0001 = consecutivo milayout.txt 0101010001500000001 -> explicando el ejemplo de arriba 0101020001200000002 0102020001450000003 etc... como lo puedo hacer? espero haberme explicado salu2 paco
generar .txt
Hola Pancho Yo asi lo haria... [code=fw:32nf0jes]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> crea_txt<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">local</span> ofile := <span style="color: #00C800;">nil</span><br />&nbsp; <span style="color: #00C800;">local</span> cCadena := <span style="color: #ff0000;">"0101010001500000001"</span><br />&nbsp; <span style="color: #00C800;">local</span> cArchivo := <span style="color: #ff0000;">"mylayout.txt"</span><br /><br />&nbsp; oFile := TTxtFile<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cArchivo <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">if</span> oFile:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oFile:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> cCadena <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; oFile:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"El proceso fue finalizado satisfactoriamente, desea abrir el archivo generado?"</span>, <span style="color: #ff0000;">"Archivo Generado"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; SHELLEXECUTE<span style="color: #000000;">&#40;</span> GetHWnd32<span style="color: #000000;">&#40;</span> GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"OPEN"</span>, cArchivo, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">nil</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:32nf0jes] Espero que te sirva Saludos
generar .txt
Gracias pipurru funcionando salu2 paco
generar .txt
Hola Paco, Aunque llego un poco tarde, para usar Clipper/Harbour solamente y de un solo golpe, prueba a ver si te funciona COPY [FIELDS <idField list>] TO <xcFile> [<scope>] [WHILE <lCondition>] [FOR <lCondition>] [SDF | DELIMITED [WITH BLANK | <xcDelimiter>] | [VIA <xcDriver>]] es decir: COPY FIELDS codigo1,codigo2,codigo3,importe, consecutivo TO 'archivo.txt' SDF Por ahí te sirve. Un saludo
generar .txt
Gracias Carlos, tambien puede ser buena opcion saludos paco
generar .txt
Hola a todos. También tarde pero tiro una más... Otra opciión seria armar un Report TO File. Saludos.
generar EXE a 32 bits con FWH64
Hola, tengo FWH64 8.02 y Harbour 3.2, he conseguido generar un EXE a 64 bits con Visual Studio 2013. Ahora quiero tener la version a 32 bits, he empezado a probar en SAMPLES con : buildh32 tutor02 Pero me da error LINK : Fatal error LNK1181: no se puede abrir el archivo de entrada '.\..\lib\fiveH32.lib' He buscado la librería y solo tengo la fiveH64.lib ¿ Cómo puedo construirla ?
generar EXE a 32 bits con FWH64
Gabriel, FWH 32 bits y FWH 64 bits se venden como dos productos diferentes. Son totalmente compatibles entre si, pero como el desarrollo de la versión de 64 bits, empezó con posterioridad a la versión de 32 bits, y requirió mucho esfuerzo y trabajo de adaptación, se tomó la determinación de comercializarlo como un producto distinto a FWH 32. Es por esto que en <!-- w --><a class="postlink" href="http://www.fivetechsoft.com">www.fivetechsoft.com</a><!-- w --> sección compras, aparecen como productos distintos.
generar EXE a 32 bits con FWH64
Antonio, entendido y totalmente de acuerdo. Muchas gracias.
generar bmp con texto
Hola gente, necesito leer una imagen bmp/jpg agregarle un texto y guardarla. Saludos. Jorge
generar bmp con texto
[code=fw:2da48ruk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> TextOnImage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmp<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cSrcImage &nbsp; := <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cDstImage &nbsp; := <span style="color: #ff0000;">"olganame.jpg"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cText &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Olga"</span> + CRLF + <span style="color: #ff0000;">"Kurylenko"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oFont, oLarg, oSmal<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oLarg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"VERDANA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-50</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-30</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oSmal <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span><br /><br />&nbsp; &nbsp;hBmp &nbsp;:= &nbsp;FW_MakeYourBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">352</span>, <span style="color: #000000;">450</span>, <|hDC, w, h |<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FW_DrawImage<span style="color: #000000;">&#40;</span> hDC, cSrcImage, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, h, w <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FW_SayText<span style="color: #000000;">&#40;</span> hDC, cText, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, h<span style="color: #000000;">-30</span>, w <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"B"</span>, <span style="color: #000000;">&#123;</span> oLarg, oFont <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FW_SayText<span style="color: #000000;">&#40;</span> hDC, <span style="color: #ff0000;">"FWH Image Functions"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">0</span>, h, w <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"T"</span>, oSmal <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;FW_SaveImage<span style="color: #000000;">&#40;</span> hBmp, cDstImage, <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;XImage<span style="color: #000000;">&#40;</span> cDstImage <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// cleanup</span><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oLarg,oFont, oSmal<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2da48ruk] [url=https&#58;//imageshack&#46;com/i/pmKKgFdCp:2da48ruk][img:2da48ruk]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/922/KKgFdC&#46;png[/img:2da48ruk][/url:2da48ruk]
generar bmp con texto
Hola, me da error al compilar, por lo que leí tengo una versión vieja, tengo 17.09. Alguna otra forma, se podrá. Saludos Jorge.
generar bmp con texto
Mr. Rao, I looked into the source of : * imgtxtio.prg where these functions are. (shadow, ...) maybe some more fancy stuff What approch would you suggest for generating (in a loop) several new image combined with (second jpg or textual) for having this kind of result : [url:3edh7yll]https&#58;//www&#46;maveco-webshop&#46;be/outlet/schoenen/[/url:3edh7yll] The discount text is a second image that is merged by the shop software, but it can be only 1 merged item. With FW i could generate the image from source with all items on it and than upload. ( discount, OnStock, Sold Out, Promotion )
generar doc. en word
Saludo para todos los fivewinweros, Gente estoy a punto de desarrollar un sistema de contratacion de personal para lo cual necesito generar los contratos en word, existira alguna lib para en enlazarlo en mi prog. para abrir desde mi prograrma crear documentos de contratos en word? Mil gracias por las respuestas que me brinden Arturo
generar doc. en word
Si no es importante la extension, es decir, si lo que deseas es que lo habra Word, entonces puedes usar RTF Simple, generas un template del contrato y donde van los datos del empleado, pones etiqueas, Despues lo grabas como RTF en tu prg, abres el RTF con memoread(), remplazas las etiquetas con los datos de tu tabla y grabas dicho TXT en un archivo con extension RTF, y listo, tienes un Documento Ejemplo del template.rtf -------- Contrato que celebra la empresa Jobb-isoft y el empleado ##nombre##, con direccion en ##direccion##, ciudad ##ciudad##.... -------- Luego en tu app. cTxt := memoread( "template.rtfc") cTxt += strtran( cTXT, "#nombre##',"Pedro Paramo") cTxt += strtran( cTxt, "#direccion##","Conocida") memowrit( "Contrato de Pedro.rtf",cTXT) HTH Osvaldo Ramirez
generar listado a pdf
Con qué clase o función genero un listado en formato pdf directamente sin tener que seleccionar impresora. Necesito además poder dar yo mismo el nombre del fichero pdf.