topic
stringlengths
1
63
text
stringlengths
1
577k
Building a LIB file
Dear Jeff, I'm try as your doing. I just try adordd.lib and able to browse a file from MySql in local and web. These are files for ADORDD.LIB that I try to rebuild. It works fine for me. [url:18k9uhb9]http://rapidshare.com/files/229674890/ADOLIB.ZIP.html[/url:18k9uhb9] Dutch
Building a TTreeView with all folders and files
[code=fw:cwrf3vhh]<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<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;">300</span>, <span style="color: #000000;">600</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> BuildTree<span style="color: #000000;">&#40;</span> oDlg <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> BuildTree<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oTreeView := TTreeView<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>, oDlg <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cPath := <span style="color: #ff0000;">"c:<span style="color: #000000;">\h</span>arbour<span style="color: #000000;">\*</span>"</span><br /><br />   oDlg:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cPath <span style="color: #000000;">&#41;</span><br />   oTreeView:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">6</span>, oDlg:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">30</span> <span style="color: #000000;">&#41;</span><br />   oTreeView:<span style="color: #000000;">bChanged</span> = <span style="color: #000000;">&#123;</span> || MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   ReadFiles<span style="color: #000000;">&#40;</span> cPath, oTreeView <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> ReadFiles<span style="color: #000000;">&#40;</span> cPath, oTreeView <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> aFiles := Directory<span style="color: #000000;">&#40;</span> cPath, <span style="color: #ff0000;">"D"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oTreeItem, n<br />   <br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aFiles <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">"."</span> .and. aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">".."</span><br />         oTreeItem = oTreeView:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">"D"</span><br />            ReadFiles<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cPath, <span style="color: #000000;">1</span>, RAt<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cPath ) ) + aFiles[ n ][ 1 ] + "</span>\*<span style="color: #ff0000;">", oTreeItem ) <br />         endif <br />      endif   <br />   next<br /><br />return nil</span></div>[/code:cwrf3vhh] [img:cwrf3vhh]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/treefiles&#46;PNG[/img:cwrf3vhh]
Building a TTreeView with all folders and files
Using an ImageList for the items: elixir.prg [code=fw:1buqqwmw]<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;">static</span> oImageList<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<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;">300</span>, <span style="color: #000000;">600</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> BuildTree<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />   oImageList:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BuildTree<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oTreeView := TTreeView<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>, oDlg <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cPath := <span style="color: #ff0000;">"c:<span style="color: #000000;">\h</span>arbour<span style="color: #000000;">\*</span>"</span><br />   <br />   oImageList := TImageList<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 /><br />   oDlg:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cPath <span style="color: #000000;">&#41;</span><br />   oTreeView:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">6</span>, oDlg:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">30</span> <span style="color: #000000;">&#41;</span><br />   oTreeView:<span style="color: #000000;">bChanged</span> = <span style="color: #000000;">&#123;</span> || MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <br />   oImageList:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"folder"</span>,,  oDlg <span style="color: #000000;">&#41;</span>,;<br />                   TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"fldmask"</span>,, oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>   <br />   oImageList:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"prg"</span>,,  oDlg <span style="color: #000000;">&#41;</span>,;<br />                   TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"prgMask"</span>,,  oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br />   oTreeView:<span style="color: #000000;">SetImageList</span><span style="color: #000000;">&#40;</span> oImageList <span style="color: #000000;">&#41;</span><br /><br />   ReadFiles<span style="color: #000000;">&#40;</span> cPath, oTreeView <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> ReadFiles<span style="color: #000000;">&#40;</span> cPath, oTreeView <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> aFiles := Directory<span style="color: #000000;">&#40;</span> cPath, <span style="color: #ff0000;">"D"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oTreeItem, n<br />   <br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aFiles <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">"."</span> .and. aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">".."</span><br />         oTreeItem = oTreeView:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">"D"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">"D"</span><br />            ReadFiles<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cPath, <span style="color: #000000;">1</span>, RAt<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cPath ) ) + aFiles[ n ][ 1 ] + "</span>\*<span style="color: #ff0000;">", oTreeItem ) <br />         endif <br />      endif   <br />   next<br /><br />return nil</span></div>[/code:1buqqwmw] elixir.rc [code=fw:1buqqwmw]<div class="fw" id="{CB}" style="font-family: monospace;">#ifndef __64__<br />  <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WinXP/WindowsXP.Manifest"</span> <br />#endif<br /><br />background BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\backgrnd\iosbg.bmp<br /><br /><span style="color: #00C800;">New</span>      BITMAP <span style="color: #ff0000;">"../bitmaps/32x32/new.bmp"</span><br />New2     BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/new.bmp"</span><br /><span style="color: #0000ff;">Dialog</span>   BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/form.bmp"</span><br />DlgMask  BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/frmmask.bmp"</span><br />Open     BITMAP <span style="color: #ff0000;">"../bitmaps/32x32/open.bmp"</span><br />Open2    BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/open.bmp"</span><br />Save     BITMAP <span style="color: #ff0000;">"../bitmaps/32x32/floppy.bmp"</span><br />Run      BITMAP <span style="color: #ff0000;">"../bitmaps/32x32/run.bmp"</span><br />Prg      BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/source.bmp"</span><br />PrgMask  BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/srcmask.bmp"</span><br />Exit2    BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/exit2.bmp"</span><br />includes BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/next.bmp"</span><br />bitmap   BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/bitmap.bmp"</span><br />bmpmask  BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/bmpmask.bmp"</span><br /><span style="color: #0000ff;">icon</span>     BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/icon.bmp"</span><br />icomask  BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/icomask.bmp"</span><br /><span style="color: #0000ff;">folder</span>   BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/folder.bmp"</span><br />fldmask  BITMAP <span style="color: #ff0000;">"../bitmaps/16x16/fldmask.bmp"</span></div>[/code:1buqqwmw] [img:1buqqwmw]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/treefiles2&#46;PNG[/img:1buqqwmw]
Building a TTreeView with all folders and files
Dear Antonio, this is looking very professional. Thank you. I tested the code and the treeview is not only good looking but very speedy too. Best regards, Otto
Building a TTreeView with all folders and files
Using FWH SourceEdit() to review the files contents: thanks to Cristobal! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:2b2yl11p]<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;">static</span> oImageList<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, oGet, cText := <span style="color: #ff0000;">""</span><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;">1000</span>, <span style="color: #000000;">600</span><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #B900B9;">//@ 0, 100 GET oGet VAR cText MEMO SIZE 350, 300 PIXEL OF oDlg </span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> SourceEdit<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">""</span>, , <span style="color: #000000;">0</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">599</span>, <span style="color: #000000;">799</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , , , , oDlg, , , , , , , , .T., .F., , , &nbsp;<span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGet := SourceEditor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BuildTree<span style="color: #000000;">&#40;</span> oDlg, oGet <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oImageList:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> BuildTree<span style="color: #000000;">&#40;</span> oDlg, oGet <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTreeView := TTreeView<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>, oDlg <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cPath := <span style="color: #ff0000;">"c:<span style="color: #000000;">\h</span>arbour<span style="color: #000000;">\*</span>"</span>, oItem<br /><br />&nbsp; &nbsp;oImageList := TImageList<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 /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cPath <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oTreeView:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">200</span>, oDlg:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">32</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oTreeView:<span style="color: #000000;">bChanged</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> oItem := oTreeView:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">nil</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TGET"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> MemoRead<span style="color: #000000;">&#40;</span> oItem:<span style="color: #000000;">Cargo</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">OpenFile</span><span style="color: #000000;">&#40;</span> oItem:<span style="color: #000000;">Cargo</span>, .T. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oGet:<span style="color: #000000;">GoHome</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>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oImageList:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"folder"</span>,, &nbsp;oDlg <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"fldmask"</span>,, oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp;oImageList:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"prg"</span>,, &nbsp;oDlg <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"prgMask"</span>,, &nbsp;oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;oTreeView:<span style="color: #000000;">SetImageList</span><span style="color: #000000;">&#40;</span> oImageList <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;ReadFiles<span style="color: #000000;">&#40;</span> cPath, oTreeView <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;">Function</span> ReadFiles<span style="color: #000000;">&#40;</span> cPath, oTreeView <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aFiles := Directory<span style="color: #000000;">&#40;</span> cPath, <span style="color: #ff0000;">"D"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTreeItem, n<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aFiles <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">"."</span> .and. aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">".."</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oTreeItem = oTreeView:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">"D"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">"D"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ReadFiles<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cPath, <span style="color: #000000;">1</span>, RAt<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cPath ) ) + aFiles[ n ][ 1 ] + "</span>\*<span style="color: #ff0000;">", oTreeItem )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTreeItem:Cargo = SubStr( cPath, 1, RAt( "</span>\<span style="color: #ff0000;">", cPath ) ) + aFiles[ n ][ 1 ]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;endif <br />&nbsp; &nbsp; &nbsp; endif &nbsp; <br />&nbsp; &nbsp;next<br /><br />return nil<br /><br />//----------------------------------------------------------------------------//</span></div>[/code:2b2yl11p] [img:2b2yl11p]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/treefiles3&#46;png[/img:2b2yl11p]
Building a TTreeView with all folders and files
Dear Antonio, I get following error: Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U [ 2] = O TSCINTILLA Stack Calls =========== Called from: => EVAL( 0 ) Called from: .\source\function\MEMOEDIT.PRG => SETUPSCINT( 790 ) Called from: .\source\function\MEMOEDIT.PRG => SOURCEEDIT( 590 ) Thank you in advance Otto
Building a TTreeView with all folders and files
Dear Otto, But I do not understand why if this modification is in the repository, it is not included in the published version.[b:3olhkw6u] Antonio? [/b:3olhkw6u] Now you have [code=fw:3olhkw6u]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <br />      Eval<span style="color: #000000;">&#40;</span> bInit, oEditor1 <span style="color: #000000;">&#41;</span><br /> <br /> </div>[/code:3olhkw6u] Please put this code at end of Function SetupScint, and try [code=fw:3olhkw6u]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />   <span style="color: #00C800;">if</span> bInit != <span style="color: #00C800;">nil</span> .and. Valtype<span style="color: #000000;">&#40;</span> bInit <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span><br />      Eval<span style="color: #000000;">&#40;</span> bInit, oEditor1 <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /> </div>[/code:3olhkw6u]
Building a TTreeView with all folders and files
Hi, [code=fw:2hljbnzh]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">if</span> Valtype<span style="color: #000000;">&#40;</span> bInit <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span><br />     Eval<span style="color: #000000;">&#40;</span> bInit, oEditor1 <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">endif</span></div>[/code:2hljbnzh]
Building a TTreeView with all folders and files
Carles, thanks <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Building a TTreeView with all folders and files
Better, replace this function [code=fw:2inzalwv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> ReadFiles<span style="color: #000000;">&#40;</span> cPath, oTreeView <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aFiles := Directory<span style="color: #000000;">&#40;</span> cPath, <span style="color: #ff0000;">"D"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTreeItem, n<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aFiles <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">"."</span> .and. aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> != <span style="color: #ff0000;">".."</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oTreeItem = oTreeView:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"D"</span> $ aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Upper<span style="color: #000000;">&#40;</span> aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"D"</span> $ aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #ff0000;">"D"</span> $ aFiles<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ReadFiles<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cPath, <span style="color: #000000;">1</span>, RAt<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cPath ) ) + aFiles[ n ][ 1 ] + "</span>\*<span style="color: #ff0000;">", oTreeItem )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTreeItem:Cargo = SubStr( cPath, 1, RAt( "</span>\<span style="color: #ff0000;">", cPath ) ) + aFiles[ n ][ 1 ]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;endif <br />&nbsp; &nbsp; &nbsp; endif &nbsp; <br />&nbsp; &nbsp;next<br /><br />return nil<br /><br />//----------------------------------------------------------------------------//<br /></span></div>[/code:2inzalwv]
Building a TTreeView with all folders and files
[code=fw:2xvch2qd]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\Errori\FileMidi\elixir.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">3</span>,<span style="color: #000000;">773</span>,<span style="color: #000000;">440</span> bytes<br />&nbsp; &nbsp;Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1703231115<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">18.12</span><br />&nbsp; &nbsp;C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.0</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">0</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">03</span>/<span style="color: #000000;">06</span>/<span style="color: #000000;">19</span>, <span style="color: #000000;">19</span>:<span style="color: #000000;">35</span>:<span style="color: #000000;">08</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> FiveWin/<span style="color: #000000;">6</span> &nbsp;Cannot create <span style="color: #0000ff;">window</span> or control: <br /><span style="color: #00C800;">Class</span>: <span style="color: #000000;">TSCINTILLA</span><br />Caption: <br /><span style="color: #000000;">System</span> Error: <span style="color: #000000;">Impossibile</span> trovare la classe della finestra.<br /><br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => WNDCREATEERROR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">848</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TSCINTILLA:<span style="color: #000000;">CREATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">831</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\SCINTILA.PRG => TSCINTILLA:<span style="color: #00C800;">NEW</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">786</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\MEMOEDIT.PRG => SOURCEEDIT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">594</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">elixir</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">864</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1120</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">304</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">elixir</span>.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span></div>[/code:2xvch2qd] why I not have this ?
Building a TTreeView with all folders and files
For this error Download this file in your path application, rename to SciLexer.DLL and try <!-- m --><a class="postlink" href="https://bitbucket.org/fivetech/fivewin-contributions/downloads/SciLexer376Dll_X86.dll">https://bitbucket.org/fivetech/fivewin- ... ll_X86.dll</a><!-- m -->
Building a Windows Service
We haven't discussed this in a couple of years. I need to take a program I run on the server 24/7/365 from an application that is run as a service. We tried this several years ago ( and discussed it here ) but it never actually worked properly. I'd like to know if anyone has mastered this technology. I'm using Visual Studio 2019 with Harbor and FWH latest version. The service is an auto updater and does not need anything in the way of a screen display and does not need any i/o interactions. In doing this, and linking harbour libraries, which ones do we actually need to include for the smallest build possible. Thanks for the ideas and experiences you may share. Tim
Building a Windows Service
Hi Tim, I use this model and it works fine: <!-- m --><a class="postlink" href="https://github.com/harbour/core/blob/master/contrib/hbwin/tests/service.prg">https://github.com/harbour/core/blob/ma ... ervice.prg</a><!-- m --> Regards.
Building a Windows Service
Hello, I want to know how it is applied, an example, I thank you very much Regards..
Building a Windows Service
Do you have a build routine ? What are you using for compiling, and linking ?
Building a Windows Service
to compile service.prg I use this: ---cut--- set PATH=c:\bcc\bin;%PATH% \harbour-install\bin\hbmk2 service -lhbwin -lace32 -lrddads -iC:\harbour-install\contrib\hbwin ---cut--- Regards.
Building a Windows Service
OK ... I can build the application and get an .exe. ( I'm using Microsoft Visual Studio 2019 ). As an .exe it runs as expected but is not visible. That is fine. When I try to run it from the Developer's Command Prompt using abc.exe I it gives me an access denied error. Any thoughts ?
Building a Windows Service
Still looking for input ... but I did get it to install and "run" ( or at least it says it is running ). Following the example suggested above: I place the .exe that is to be run as a service in a folder where the data is located. I need to use those data files. Normally, since the program is located in the directory, I can use commands to find the "path" by identifying the directory and folder. The system path is then used as the "default". If I hardcode in the path, all is working. However, that path may change depending on where the IT "professional" decides to install the software. I'm also curious about a question that came up before. I'd love to have the service simply call another .exe file ( but the discussion previously indicated someone would still have to be logged in ). That would allow me to update the service file easily. I would simply have to replace the 2nd exe ( non-service ). Anyone done this ?
Building a standalone Windows C app
Sometimes we may need to build a small Windows app using C language to solve a specific issue. Here you have how to do it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> A veces podemos necesitar construir una pequeña aplicación en Windows usando el lenguaje C para solucionar un tema específico. Aquí teneis como hacerlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Simply do go.bat changeres (don't specify the .c extension) Simplemente haz go.bat changeres (no especifiques la extensión .c) go.bat [code=fw:3rmpsbnn]<div class="fw" id="{CB}" style="font-family: monospace;">@ECHO OFF<br /><br />set bcdir=c:\bcc7<br /><br />%bcdir%\bin\bcc32 -c -I%bcdir%\include %<span style="color: #000000;">1</span>.c<br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.rc %bcdir%\bin\brc32 -r %<span style="color: #000000;">1</span><br /><br />echo %bcdir%\lib\c0w32.obj + > b32.bc<br />echo %<span style="color: #000000;">1</span>.obj, + >> b32.bc<br />echo %<span style="color: #000000;">1</span>.exe, + >> b32.bc<br />echo %<span style="color: #000000;">1</span>.map, + >> b32.bc<br /><br />echo %bcdir%\lib\cw32.lib + >> b32.bc<br />echo %bcdir%\lib\import32.lib, >> b32.bc<br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.res echo %<span style="color: #000000;">1</span>.res >> b32.bc<br /><br />%bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v -L%bcdir%\lib @b32.bc<br />%<span style="color: #000000;">1</span>.exe</div>[/code:3rmpsbnn] changeres.c [code=fw:3rmpsbnn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><br /><span style="color: #00D7D7;">#pragma</span> argsused<br /><br />int WINAPI WinMain<span style="color: #000000;">&#40;</span> HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,<br />                    int nCmdShow <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DEVMODE dm;<br />   FILE * pFile = fopen<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"resolution.txt"</span>, <span style="color: #ff0000;">"w"</span> <span style="color: #000000;">&#41;</span>;<br /><br />   dm.dmSize = sizeof<span style="color: #000000;">&#40;</span> DEVMODE <span style="color: #000000;">&#41;</span>;<br /><br />   EnumDisplaySettings<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, ENUM_CURRENT_SETTINGS, &dm <span style="color: #000000;">&#41;</span>;<br /><br />   fwprintf<span style="color: #000000;">&#40;</span> pFile, L<span style="color: #ff0000;">"%d x %d<span style="color: #000000;">\n</span>"</span>, dm.dmPelsWidth, dm.dmPelsHeight <span style="color: #000000;">&#41;</span>;<br /><br />   fclose<span style="color: #000000;">&#40;</span> pFile <span style="color: #000000;">&#41;</span>;<br /><br />   dm.dmPelsWidth = <span style="color: #000000;">800</span>;<br />   dm.dmPelsHeight = <span style="color: #000000;">600</span>;<br /><br />   ChangeDisplaySettings<span style="color: #000000;">&#40;</span> &dm, DM_PELSWIDTH || DM_PELSHEIGHT <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><span style="color: #000000;">&#125;</span></div>[/code:3rmpsbnn]
Building c:\harbour\contrib\hbzebra library
cd c:\harbour\contrib\hbzebra [b:2p01mj5b]For bcc64[/b:2p01mj5b] go.bat [code=fw:2p01mj5b]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">for</span> %%f in <span style="color: #000000;">&#40;</span>*.c<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">do</span> c:\bcc7164\bin\bcc64 -c -Ic:\harbour\include -Ic:\bcc7164\include\windows\crtl %%f<br /><span style="color: #00C800;">for</span> %%f in <span style="color: #000000;">&#40;</span>*.o<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">do</span> c:\bcc7164\bin\tlib64 hbzebra.a -+ %%f</div>[/code:2p01mj5b] [b:2p01mj5b]For MinGW64[/b:2p01mj5b] go.bat [code=fw:2p01mj5b]<div class="fw" id="{CB}" style="font-family: monospace;">set path=c:\gcc81w64\bin;%path%<br />set HB_COMPILER=mingw64<br />hbmk2 hbzebra.hbp</div>[/code:2p01mj5b] [b:2p01mj5b]For MinGW32[/b:2p01mj5b] go.bat [code=fw:2p01mj5b]<div class="fw" id="{CB}" style="font-family: monospace;">set path=c:\gcc81\bin;%path%<br />set HB_COMPILER=mingw<br />hbmk2 hbzebra.hbp</div>[/code:2p01mj5b] [b:2p01mj5b]For VS32[/b:2p01mj5b] go.bat [code=fw:2p01mj5b]<div class="fw" id="{CB}" style="font-family: monospace;">call <span style="color: #ff0000;">"%ProgramFiles(x86)%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>017<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> x86<br />hbmk2 hbzebra.hbp</div>[/code:2p01mj5b] [b:2p01mj5b]For VS64[/b:2p01mj5b] go.bat [code=fw:2p01mj5b]<div class="fw" id="{CB}" style="font-family: monospace;">call <span style="color: #ff0000;">"%ProgramFiles(x86)%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>017<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> x86_amd64<br />hbmk2 hbzebra.hbp</div>[/code:2p01mj5b] [b:2p01mj5b]For xhb.com[/b:2p01mj5b] hbzebra.def [code=fw:2p01mj5b]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">LIBRARY</span> hbzebra<br /><br />EXPORTS<br />           dummy      @<span style="color: #000000;">1</span></div>[/code:2p01mj5b] go.bat [code=fw:2p01mj5b]<div class="fw" id="{CB}" style="font-family: monospace;">c:\vc98\lib /DEF:<span style="color: #000000;">hbzebra</span>.def /OUT:<span style="color: #000000;">hbzebra</span>.lib<br /><span style="color: #00C800;">for</span> %%f in <span style="color: #000000;">&#40;</span>*.c<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">do</span> c:\vc98\bin\cl -c -Ic:\harbour\include %%f<br /><span style="color: #00C800;">for</span> %%f in <span style="color: #000000;">&#40;</span>*.obj<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">do</span> c:\vc98\bin\lib hbzebra.lib -+ %%f</div>[/code:2p01mj5b]
Building your app and dialogs from Visual Studio IDE
Designing your dialogs: ([b:3gvf8cjv]Important[/b:3gvf8cjv]: Visual Studio Express does not provide it, you need a superior version) [img:3gvf8cjv]http&#58;//i61&#46;tinypic&#46;com/ou8kmr&#46;jpg[/img:3gvf8cjv] Building your app and testing the dialog: [img:3gvf8cjv]http&#58;//i59&#46;tinypic&#46;com/155pfr4&#46;jpg[/img:3gvf8cjv] Editing your sources from the Visual Studio IDE: we need to find how to colorize the text. Help required from Mastintin, Cristobal, or any other brave coder <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [img:3gvf8cjv]http&#58;//i60&#46;tinypic&#46;com/2qitr1w&#46;jpg[/img:3gvf8cjv]
Building your app and dialogs from Visual Studio IDE
Here you have the full project file, including the dialog RC: [url:3tnnw2do]https&#58;//bitbucket&#46;org/fivetech/fivewin-contributions/downloads/tutor02_vstudio2102_ide&#46;zip[/url:3tnnw2do] You just need to add fiveh32.lib y fivehc32.lib in the same folder where Harbour libs are. By the way, this Microsoft project files store all the used files inside it, so you already have all the Harbour required libs inside ready to be used <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->)
Buildmenu on MdiChild causes error when child is Maximized
To All Strange behavior in a program I just upgraded to FWH1201 .. I have a Mdi window with a Menu and button bar .. I have a MdiChild that overwrites the Menu and also has a button bar. The Mdichild has a xBrowse with an Ado recordset .. On the Mdichild .. when you close it with either the Menu or button bar .. everything closes properly. If you [b:pr6fazqg]Maximize[/b:pr6fazqg] the MDIChild and try to close the Child or program .. you get all kinds of xBrowse problems .. [code=fw:pr6fazqg]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />   Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Fox\Test\Test.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">2</span>,<span style="color: #000000;">153</span>,<span style="color: #000000;">472</span> bytes<br />   Compiler version: <span style="color: #000000;">xHarbour</span> build <span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Rev. <span style="color: #000000;">6476</span><span style="color: #000000;">&#41;</span><br />   FiveWin  Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">11.12</span><br />   Windows version: <span style="color: #000000;">5.1</span>, Build <span style="color: #000000;">2600</span> Service Pack <span style="color: #000000;">3</span><br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">7</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">02</span>/<span style="color: #000000;">13</span>/<span style="color: #000000;">2012</span>, <span style="color: #000000;">09</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">02</span><br />   Error description: <span style="color: #000000;">Error</span> ADODB.Recordset/<span style="color: #000000;">6</span>  DISP_E_UNKNOWNNAME: <span style="color: #000000;">RECORDCOUNT</span><br />   Args:<br /><br /><span style="color: #000000;">Stack</span> Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => TOLEAUTO:<span style="color: #000000;">RECORDCOUNT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">SETADO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4277</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">KEYNO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2842</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Main</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>_USERBROW<span style="color: #000000;">&#40;</span> <span style="color: #000000;">345</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">FOOTERSTR</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">9354</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTFOOTER</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">9415</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">PAINTFOOTER</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1628</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1359</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1250</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1666</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">11627</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => SYSREFRESH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">511</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>ERRORDIALOG<span style="color: #000000;">&#40;</span> <span style="color: #000000;">407</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BUTTON</span>.PRG => TBUTTON:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">157</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TBUTTON:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1654</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => SENDMESSAGE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">COMMAND</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">379</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">886</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">270</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => ERRORDIALOG<span style="color: #000000;">&#40;</span> <span style="color: #000000;">426</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>ERRORSYS<span style="color: #000000;">&#40;</span> <span style="color: #000000;">31</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => TOLEAUTO:<span style="color: #000000;">RECORDCOUNT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">SETADO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4277</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">KEYNO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2842</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Main</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>_USERBROW<span style="color: #000000;">&#40;</span> <span style="color: #000000;">345</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">FOOTERSTR</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">9354</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTFOOTER</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">9415</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">PAINTFOOTER</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1628</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1359</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1250</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1666</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">11627</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">270</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => ERRORDIALOG<span style="color: #000000;">&#40;</span> <span style="color: #000000;">426</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\ERRSYSW.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>ERRORSYS<span style="color: #000000;">&#40;</span> <span style="color: #000000;">31</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => TOLEAUTO:<span style="color: #000000;">RECORDCOUNT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">SETADO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4277</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">TXBROWSE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">407</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TXBROWSE:<span style="color: #000000;">KEYCOUNT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1179</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">MAKEBRUSH</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5358</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">TXBROWSE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">437</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TXBROWSE:<span style="color: #000000;">RESIZE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1700</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">11627</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WNDADJCLIENT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TXBROWSE:<span style="color: #000000;">ADJCLIENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">283</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDICHILD:<span style="color: #000000;">RESIZE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2136</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MDICHILD</span>.PRG => TMDICHILD:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">322</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WNDADJCLIENT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\MDIFRAME.PRG => TMDIFRAME:<span style="color: #000000;">RESIZE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">226</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TMDIFRAME:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => SETMENU<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MENU</span>.PRG => TMENU:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">146</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MDICHILD</span>.PRG => TMDICHILD:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">266</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\MDICLIEN.PRG => TMDICLIENT:<span style="color: #000000;">LCLOSEALL</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">204</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\MDIFRAME.PRG => TMDIFRAME:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">267</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDIFRAME:<span style="color: #000000;">SYSCOMMAND</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2378</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TMDIFRAME:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:pr6fazqg] Here is a lengthy example that creates a Access database .. Open the UserInfo child with the Buttonbar .. close the program .. the program will close normally.. Open the program and [b:pr6fazqg]maximize[/b:pr6fazqg] the MdiCHild with the xBrowse listbox .. then close the program .. and you will see the error. [code=fw:pr6fazqg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Mdichild test on close maximized</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Xbrowse.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd,oBar,lOK,lOK1,oBrw,oWnd1<br /><br /><span style="color: #B900B9;">//-------------</span><br />Func Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Local</span> catNewDB,xProvider,cFile,aDir,dExe,cDefa,mStart<br /><span style="color: #00C800;">Local</span> oCn,cSql,oErr,oRsUser,cLOGIN,Saying,xLogin,cRights<br /><span style="color: #00C800;">Local</span> cTitle,oButt1,oButt2,nYear,nScr1,nScr2,xMessage,cRdd<br /><br /><span style="color: #00C800;">PUBLIC</span> xCONNECT<br /><br />lOK  := .F.<br />lOK1 := .F.<br /><br /><span style="color: #B900B9;">//-- get timestamp on .exe //</span><br /><br />cFILE := GetModuleFileName<span style="color: #000000;">&#40;</span> GetInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />aDIR  := DIRECTORY<span style="color: #000000;">&#40;</span> cFILE <span style="color: #000000;">&#41;</span><br />dEXE  := aDIR<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br /><br /><span style="color: #B900B9;">// where .exe started from is default directory //</span><br /><br />mSTART := RAT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cFILE )<br />cDEFA  := SUBSTR(cFILE,1,mSTART-1)<br /><br />aDIR := NIL<br />SET DEFA to ( cDEFA )<br /><br />SET DELETED on<br />SET CENTURY on<br />SET 3DLOOK on<br /><br />nYEAR := ( year( DATE() )-30 )<br />SET EPOCH to ( nYEAR )<br /><br />REQUEST DBFCDX<br />rddsetdefault ( "</span>DBFCDX<span style="color: #ff0000;">" )<br /><br />nSCR1 := GetSysMetrics(0)<br />nSCR2 := GetSysMetrics(1)<br /><br />xPROVIDER := "</span>Microsoft.Jet.OLEDB<span style="color: #000000;">.4</span><span style="color: #000000;">.0</span><span style="color: #ff0000;">"<br />xSOURCE   := cDEFA+"</span>\Rick.mdb<span style="color: #ff0000;">"<br />cRDD      := xPROVIDER+"</span> -- <span style="color: #ff0000;">"+xSOURCE<br /><br /> // global connection string<br />xCONNECT := 'Provider='+xPROVIDER+';Data Source='+xSOURCE<br /><br />If .not. File( cDefa+"</span>\Rick.mdb<span style="color: #ff0000;">" )<br /><br />   Ferase( cDefa+"</span>\Rick.mdb<span style="color: #ff0000;">" )<br /><br />   // create the adox object<br />   Try<br />      catNewDB := CreateObject("</span>ADOX.Catalog<span style="color: #ff0000;">")<br />   Catch<br />      MsgInfo( "</span>Could not Create ADOX object<span style="color: #ff0000;">")<br />      Return(.f.)<br />   End try<br /><br />   // create the table Rick.mdb<br />   Try<br />     catNewDB:Create('Provider='+xProvider+';Data Source='+xSource+';Jet OLEDB:Engine Type=5' )<br />   Catch<br />     MsgInfo( "</span>Could not create the table <span style="color: #ff0000;">"+xSource )<br />     Return(.f.)<br />   End Try<br /><br />   Try<br />     oCn  := CREATEOBJECT( "</span>ADODB.Connection<span style="color: #ff0000;">" )<br />   Catch<br />     MsgInfo( "</span>Could not create the ADO object <span style="color: #00C800;">for</span> connection<span style="color: #ff0000;">")<br />   End Try<br /><br />   TRY<br />     oCn:Open( xCONNECT )<br />   CATCH oErr<br />     MsgInfo( "</span>Could not open a Connection <span style="color: #0000ff;">to</span> Database <span style="color: #ff0000;">"+xSource )<br />     RETURN(.F.)<br />   END TRY<br /><br /><br />   cSQL := "</span>CREATE TABLE USERINFO<span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span>USEREID<span style="color: #000000;">&#93;</span> char<span style="color: #000000;">&#40;</span><span style="color: #000000;">18</span><span style="color: #000000;">&#41;</span> NOT <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span>USERID<span style="color: #000000;">&#93;</span> char<span style="color: #000000;">&#40;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span>READONLY<span style="color: #000000;">&#93;</span> char<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span>WRITEONLY<span style="color: #000000;">&#93;</span> char<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span><span style="color: #00C800;">SUPER</span><span style="color: #000000;">&#93;</span> char<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span>LASTLOG<span style="color: #000000;">&#93;</span> datetime <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span>CREATEDATE<span style="color: #000000;">&#93;</span> datetime <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span><span style="color: #000000;">&#91;</span>PASSWORD<span style="color: #000000;">&#93;</span> char<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">NULL</span>, <span style="color: #ff0000;">"<br />   cSQL += "</span>CONSTRAINT PK_USERINFO PRIMARY KEY <span style="color: #000000;">&#40;</span> USEREID <span style="color: #000000;">&#41;</span><span style="color: #ff0000;">"<br />   cSQL += "</span> <span style="color: #000000;">&#41;</span><span style="color: #ff0000;">"<br /><br />   // create the table Userinfo<br />   // with primary key<br /><br />   Try<br />      oCn:Execute( cSQL )<br />   Catch<br />      MsgInfo( "</span>Table USERINFO Failed<span style="color: #ff0000;">" )<br />      Return(.f.)<br />   End try<br /><br />   oCn:Close()<br />   oCn := nil<br /><br />Endif<br /><br />cLOGIN := UPPER( WNetGetuser() )+space(8) // fivewin<br />cLOGIN := SUBSTR(cLOGIN,1,8)<br /><br />   // open the Userinfo table record set<br />   // append the first record<br />   // could have also used a connection and the INSERT command<br /><br />oRsUser := TOleAuto():New( "</span>ADODB.Recordset<span style="color: #ff0000;">" )<br />oRsUser:CursorType     := 1        // opendkeyset<br />oRsUser:CursorLocation := 3        // local cache<br />oRsUser:LockType       := 3        // lockoportunistic<br /><br />// check for very first user<br /><br />cSQL := "</span><span style="color: #0000ff;">SELECT</span> * <span style="color: #0000ff;">FROM</span> USERINFO<span style="color: #ff0000;">"<br />TRY<br />   oRsUser:Open( cSQL, xCONNECT )<br />CATCH oErr<br />   MsgInfo( "</span>Error in Opening USERINFO table here<span style="color: #ff0000;">" )<br />   RETURN(.F.)<br />END TRY<br /><br />If oRsUser:eof<br />   oRsUser:AddNew()<br /><br />   oRsUser:Fields("</span>UserEid<span style="color: #ff0000;">"):Value    := "</span><span style="color: #000000;">011111111111111111</span><span style="color: #ff0000;">"<br />   oRsUser:Fields("</span>UserId<span style="color: #ff0000;">"):Value     := cLOGIN<br />   oRsUser:Fields("</span>ReadOnly<span style="color: #ff0000;">"):Value   := "</span>Y<span style="color: #ff0000;">"<br />   oRsUser:Fields("</span>WriteOnly<span style="color: #ff0000;">"):Value  := "</span>Y<span style="color: #ff0000;">"<br />   oRsUser:Fields("</span><span style="color: #00C800;">Super</span><span style="color: #ff0000;">"):Value      := "</span>Y<span style="color: #ff0000;">"<br />   oRsUser:Fields("</span>CreateDate<span style="color: #ff0000;">"):Value := dtoc(DATE())+"</span> <span style="color: #ff0000;">"+time()<br />   oRsUser:Fields("</span>LastLog<span style="color: #ff0000;">"):Value    := dtoc(DATE())+"</span> <span style="color: #ff0000;">"+time()<br />   oRsUser:Fields("</span>PassWord<span style="color: #ff0000;">"):Value   := "</span>ADMIN<span style="color: #ff0000;">"<br /><br />   oRsUser:Update()<br />Endif<br /><br />xLogin := oRsUser:Fields("</span>UserId<span style="color: #ff0000;">"):Value<br /><br />oRsUser:CLose()<br />cRIGHTS := "</span><span style="color: #000000;">&#40;</span>RWS<span style="color: #000000;">&#41;</span><span style="color: #ff0000;">"<br /><br />*  MENU BuildMenu(cOLDDEFA,dEXE,cRDD);<br /><br />xMESSAGE :=  "</span>User  <span style="color: #ff0000;">"+xLOGIN+"</span>    Rights  <span style="color: #ff0000;">"+cRIGHTS+        ;<br />      "</span>     <span style="color: #00C800;">Default</span>= <span style="color: #ff0000;">"+cDEFA+"</span>      Rdd= <span style="color: #ff0000;">"+cRDD+            ;<br />      "</span>     Revision  <span style="color: #ff0000;">"+DTOC(dEXE)+;<br />      "</span>  -r<span style="color: #ff0000;">"+str(nSCR1,4)+"</span> x <span style="color: #ff0000;">"+STR(nSCR2,4)<br /><br />cTitle := "</span>Test <span style="color: #0000ff;">MDI</span> CHild Close <span style="color: #0000ff;">Maximized</span><span style="color: #ff0000;">"<br /><br />DEFINE WINDOW oWnd ;<br />       TITLE cTITLE  ;<br />       MENU BuildMenu();<br />       MDI<br /><br />DEFINE BUTTONBAR oBar OF oWnd SIZE 65,70 3DLOOK 2007<br />oBar:SetColor(0)<br /><br />DEFINE BUTTON oButt1 OF oBar FileName (cDefa+"</span>\Icons\REQUEST.bmp<span style="color: #ff0000;">") , ;<br />                                      (cDefa+"</span>\Icons\DREQUEST.bmp<span style="color: #ff0000;">"), ;<br />                                      (cDefa+"</span>\Icons\DREQUEST.bmp<span style="color: #ff0000;">")  ;<br />MESSAGE "</span>User Information<span style="color: #ff0000;">" ;<br />ACTION _UserBrow( oWnd,oBar ) ;<br />PROMPT "</span>User Info<span style="color: #ff0000;">"<br /><br /><br />DEFINE BUTTON oButt2 OF oBar FileName (cDefa+"</span>\Icons\CLOSE.bmp<span style="color: #ff0000;">"), ;<br />                                      (cDefa+"</span>\Icons\DCLOSE.bmp<span style="color: #ff0000;">"),;<br />                                      (cDefa+"</span>\Icons\DCLOSE.bmp<span style="color: #ff0000;">") ;<br />MESSAGE "</span>Close Application<span style="color: #ff0000;">" ;<br />ACTION ( oWnd:End() ) ;<br />PROMPT "</span>Quit<span style="color: #ff0000;">"<br /><br /><br />SET MESSAGE OF oWnd     ;<br />   to xMESSAGE CLOCK 2007<br /><br />ACTIVATE WINDOW oWnd MAXIMIZED ;<br />VALID ( IIF( !lOK, ExitPgm(.T.), .F. ))<br /><br />RETURN( NIL )<br /><br />//---------------------------<br />Static FUNCTION BuildMenu( cOLDDEFA,dEXE,cRDD )<br /><br />LOCAL oMENU, cDEFA, cRIGHTS, nSCR1,nSCR2<br /><br />cDEFA := SET(7)<br />nSCR1 := GetSysMetrics(0)<br />nSCR2 := GetSysMetrics(1)<br /><br />MENU oMenu 2007<br /><br />   menuitem "</span>Login...<span style="color: #ff0000;">"   ;<br /><br />   MENUITEM "</span>&About...<span style="color: #ff0000;">"<br /><br />   MENUITEM "</span>&Quit<span style="color: #ff0000;">"          ;<br />         MESSAGE "</span>Close this program<span style="color: #ff0000;">";<br />         ACTION oWND:END()<br /><br />ENDMENU<br /><br />RETURN( oMenu )<br /><br />//---------------------------<br />Static FUNCTION BuildMenu1()<br /><br />LOCAL oMENU1<br /><br />cDEFA := SET(7)<br />nSCR1 := GetSysMetrics(0)<br />nSCR2 := GetSysMetrics(1)<br /><br />MENU oMenu1 2007<br /><br />   menuitem "</span>Login...<span style="color: #ff0000;">"   ;<br /><br />ENDMENU<br /><br />RETURN( oMenu1 )<br /><br /><br />//-----------------------<br />Static FUNCTION ExitPgm( lCLEAN )<br /><br />LOCAL lOK3<br /><br />lOK3  := .F.<br /><br />IF lCLEAN = .T.<br />   lOK3 := .T.<br />   lOK  := .T.<br />   SET RESOURCES to<br /><br />ENDIF<br /><br />RETURN( lOK3 )<br /><br />//---------------------------------<br />Static Func _UserBrow( oWndMDI,oBar1 )<br /><br />LOCAL SAYING, oRsUser, cSQL, oERR, oBar2,oCol<br />LOCAL oBtn1,oBtn2,oBtn3,oBtn4,oBtn5,oBtn6,cDefa<br />LOCAL nWD,nHT<br />LOCAL cTITLE<br /><br />cDEFA := SET(7)<br /><br />SysReFresh()<br /><br />cSQL := "</span><span style="color: #0000ff;">SELECT</span> * <span style="color: #0000ff;">FROM</span> USERINFO <span style="color: #0000ff;">order by</span> userid<span style="color: #ff0000;">"<br /><br />oRsUser := TOleAuto():New( "</span>ADODB.Recordset<span style="color: #ff0000;">" )<br />oRsUser:CursorType     := 1        // opendkeyset<br />oRsUser:CursorLocation := 3        // local cache<br />oRsUser:LockType       := 3        // lockoportunistic<br /><br />TRY<br />  oRsUser:Open(cSQL,xConnect )<br />CATCH oErr<br />  MsgInfo( "</span>Error in Opening USERINFO table<span style="color: #ff0000;">" )<br />  RETURN(.F.)<br />END TRY<br /><br />lOK1 := .F.<br /><br />oBar1:Hide()<br />SysReFresh()<br /><br />DEFINE BUTTONBAR oBar2 OF oWndMDI SIZE 65,70 3DLOOK 2007<br />oBar2:SetColor(0)<br /><br />DEFINE BUTTON oBtn1 OF oBar2 FileName (cDefa+"</span>\Icons\REQADD.bmp<span style="color: #ff0000;">"), ;<br />                                      (cDefa+"</span>\Icons\DREQADD.bmp<span style="color: #ff0000;">"),;<br />                                      (cDefa+"</span>\Icons\DREQADD.bmp<span style="color: #ff0000;">") ;<br />MESSAGE "</span>Add Users<span style="color: #ff0000;">" ;<br />ACTION ( Msginfo( "</span>Unavailable<span style="color: #ff0000;">" )) ;<br />PROMPT "</span>Add<span style="color: #ff0000;">"<br /><br />DEFINE BUTTON oBtn6 OF oBar2 FileName (cDefa+"</span>\Icons\REQCLOSE.bmp<span style="color: #ff0000;">"), ;<br />                                      (cDefa+"</span>\Icons\DREQCLOSE.bmp<span style="color: #ff0000;">"),;<br />                                      (cDefa+"</span>\Icons\DREQCLOSE.bmp<span style="color: #ff0000;">") ;<br />MESSAGE "</span>Close Browse<span style="color: #ff0000;">" ;<br />ACTION ( oWnd1:End() ) ;<br />PROMPT "</span>Close<span style="color: #ff0000;">"<br /><br />cTITLE := "</span>User Information Browse<span style="color: #ff0000;">"<br /><br />lOK1 := .F.<br /><br />DEFINE WINDOW oWnd1                        ;<br />      FROM 0,0 to 30,75                    ;<br />      Menu BuildMenu1()                    ;  // take this Buildmenu out and program will not fail<br />      TITLE cTITLE                         ;  // when mdichild is maximized<br />      NOMINIMIZE                           ;<br />      MDICHILD<br /><br />@ 0, 0 xBROWSE oBrw of oWnd1               ;<br />       RECORDSET oRsUser                   ;<br />       COLUMNS "</span>USERID<span style="color: #ff0000;">",                   ;<br />               "</span>READONLY<span style="color: #ff0000;">",                 ;<br />               "</span>WRITEONLY<span style="color: #ff0000;">",                ;<br />               "</span><span style="color: #00C800;">SUPER</span><span style="color: #ff0000;">",                    ;<br />               "</span>CREATEDATE<span style="color: #ff0000;">",               ;<br />               "</span>LASTLOG<span style="color: #ff0000;">"                   ;<br />       COLSIZES 80,80,80,80,80,80          ;<br />       HEADERS "</span>UserId<span style="color: #ff0000;">",                   ;<br />               "</span>Read<span style="color: #ff0000;">",                     ;<br />               "</span>Write<span style="color: #ff0000;">",                    ;<br />               "</span><span style="color: #00C800;">Super</span><span style="color: #ff0000;">",                    ;<br />               "</span>Created<span style="color: #ff0000;">",                  ;<br />               "</span>LastLog<span style="color: #ff0000;">"                   ;<br />       AUTOSORT AUTOCOLS FASTEDIT LINES CELL    // use fastedit if you want to edit cells<br /><br />       oWnd1:oClient := oBrw<br /><br />       oBrw:lHScroll := .f. // turn off horiz scroll bar<br /><br />       oBrw:lFooter   := .t.<br />       oCol           := oBrw:aCols[ 1 ]<br />       oCol:bFooter   := { || Ltrim( Str( oBrw:KeyNo() ) ) + "</span> / <span style="color: #ff0000;">" + LTrim( Str( oBrw:KeyCount() ) ) }<br />       oCol:cHeader   := "</span>UserId<span style="color: #ff0000;">"<br />       oBrw:bChange   := { || oCol:RefreshFooter() }<br /><br />       oBrw:CreateFromCode()<br /><br />ACTIVATE WINDOW oWND1 ;<br />         ON INIT( oBrw:SetFocus(), .F. ) ;<br />         VALID ( IIF( !lOK1, UserClose(.T.,oWnd1,oRsUser,oBar1,oBar2 ), .F. ))<br /><br />Return(nil)<br /><br />//-------------------------------<br />Static FUNCTION UserClose( lCLEAN,oWndchild,oRsUser,oBar1,oBar2 )<br /><br />LOCAL lOK3<br /><br />IF lCLEAN = .T.<br />   lOK3 := .T.<br />   lOK1 := .T.<br />   oBrw:cALIAS:=nil<br /><br />   try<br />      oRsUser:CLose()<br />   catch<br />   end try<br /><br />   oBar2:End()<br />   oWndChild:End()<br /><br />   oBar1:Show()<br /><br />ENDIF<br /><br />RETURN( lOK3 )<br /><br /> // -- end<br /></span></div>[/code:pr6fazqg]
Buildmenu on MdiChild causes error when child is Maximized
Rick, Just for a quick test, don't Close() the recordset: // oRsUser:CLose() and try it again, please. thanks
Buildmenu on MdiChild causes error when child is Maximized
Antonio I tried that and NO it does not error if you rem out closing the recordset .. seems to only have something to do with maximizing the mdichild .. under normal conditions .. everything works fine. If I take out the BuildMenu1() on the MdiCHild .. everything works .. It has something to do with the buildmenu firing on CLose when the MdiCHild is Maximized .. Rick Lipkin
Buildmenu on MdiChild causes error when child is Maximized
Rick, Do you close it from the menu ? If so, try to close it from the right top red button I guess the problem comes from a generated paint event and as the recordset in closed then it errors
Buildmenu on MdiChild causes error when child is Maximized
Antonio The Test program fails on any close event when the MdiChild is Maximized with a BuildMenu associated on the MdiCHild. Rick
Buildmenu on MdiChild causes error when child is Maximized
Rick, Please try these possibilities after you close the recordSet: a) oXBrowse:nDataType := 0 b) oXBrowse:bKeyCount := { || 0 }
Buildmenu on MdiChild causes error when child is Maximized
Antonio I have tried both of your suggestions without success [code=fw:2c421na4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//-------------------------------</span><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">FUNCTION</span> UserClose<span style="color: #000000;">&#40;</span> lCLEAN,oWndchild,oRsUser,oBar1,oBar2 <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> lOK3<br /><br /><span style="color: #00C800;">IF</span> lCLEAN = .T.<br />&nbsp; &nbsp;lOK3 := .T.<br />&nbsp; &nbsp;lOK1 := .T.<br /><br />&nbsp; * oBrw:<span style="color: #000000;">cALIAS</span>:=<span style="color: #00C800;">nil</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">try</span><br />&nbsp; &nbsp; &nbsp; oRsUser:<span style="color: #000000;">CLose</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;catch<br />&nbsp; &nbsp;end <span style="color: #00C800;">try</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nDataType</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBar2:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oWndChild:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBar1:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDIF</span><br /><br />&nbsp;</div>[/code:2c421na4] .. In the code above I rem'd out [code=fw:2c421na4]<div class="fw" id="{CB}" style="font-family: monospace;"><br />* oBrw:<span style="color: #000000;">cALIAS</span>:=<span style="color: #00C800;">nil</span><br /> </div>[/code:2c421na4] from the valid close as well as the footer Keyno() and KeyCount() [code=fw:2c421na4]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   *   oBrw:<span style="color: #000000;">lFooter</span>   := .t.<br />    *   oCol           := oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />    *   oCol:<span style="color: #000000;">bFooter</span>   := <span style="color: #000000;">&#123;</span> || Ltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</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> + <span style="color: #ff0000;">" / "</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyCount</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> <span style="color: #000000;">&#125;</span><br />    *   oCol:<span style="color: #000000;">cHeader</span>   := <span style="color: #ff0000;">"UserId"</span><br />    *   oBrw:<span style="color: #000000;">bChange</span>   := <span style="color: #000000;">&#123;</span> || oCol:<span style="color: #000000;">RefreshFooter</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:2c421na4] And it left me with this errorlog : [code=fw:2c421na4]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />   Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Fox\Test\Test.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">2</span>,<span style="color: #000000;">153</span>,<span style="color: #000000;">472</span> bytes<br />   Compiler version: <span style="color: #000000;">xHarbour</span> build <span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Rev. <span style="color: #000000;">6476</span><span style="color: #000000;">&#41;</span><br />   FiveWin  Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">11.12</span><br />   Windows version: <span style="color: #000000;">5.1</span>, Build <span style="color: #000000;">2600</span> Service Pack <span style="color: #000000;">3</span><br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">3</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">02</span>/<span style="color: #000000;">15</span>/<span style="color: #000000;">2012</span>, <span style="color: #000000;">08</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">55</span><br />   Error description: <span style="color: #000000;">Error</span> ADODB.Recordset/<span style="color: #000000;">6</span>  DISP_E_UNKNOWNNAME: <span style="color: #000000;">RECORDCOUNT</span><br />   Args:<br /><br /><span style="color: #000000;">Stack</span> Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => TOLEAUTO:<span style="color: #000000;">RECORDCOUNT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">SETADO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4277</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">KEYNO</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2842</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">TXBROWSE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">496</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TXBROWSE:<span style="color: #000000;">VUPDATEPOS</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">TXBROWSE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">407</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TXBROWSE:<span style="color: #000000;">KEYCOUNT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1179</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">MAKEBRUSH</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5358</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE:<span style="color: #000000;">TXBROWSE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">437</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TXBROWSE:<span style="color: #000000;">RESIZE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1700</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">11627</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WNDADJCLIENT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TXBROWSE:<span style="color: #000000;">ADJCLIENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">283</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDICHILD:<span style="color: #000000;">RESIZE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2136</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MDICHILD</span>.PRG => TMDICHILD:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">322</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WNDADJCLIENT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\MDIFRAME.PRG => TMDIFRAME:<span style="color: #000000;">RESIZE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">226</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TMDIFRAME:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => SETMENU<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MENU</span>.PRG => TMENU:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">146</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MDICHILD</span>.PRG => TMDICHILD:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">266</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Main</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>_USERBROW<span style="color: #000000;">&#40;</span> <span style="color: #000000;">302</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">465</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">656</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1690</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1407</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3159</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WINRUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">980</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Main</span>.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">195</span> <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:2c421na4] I appreciate all your help and suggestions .. Rick Lipkin
Buildmenu on MdiChild causes error when child is Maximized
Rick, Please try with: oBrw:bKeyNo := { || nil } // or { || 0 } thanks
Buildmenu on MdiChild causes error when child is Maximized
Antonio YES .. FIXED .. it was the combination of KeyCount and KeyNo .. Is this a modification you will be making in xBrowse or is this code something I will need to include in my applications ? Again, Many Thanks Rick Lipkin [code=fw:3rn4l4gh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//-------------------------------</span><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">FUNCTION</span> UserClose<span style="color: #000000;">&#40;</span> lCLEAN,oWndchild,oRsUser,oBar1,oBar2 <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> lOK3<br /><br /><span style="color: #00C800;">IF</span> lCLEAN = .T.<br />   lOK3 := .T.<br />   lOK1 := .T.<br /><br />   <span style="color: #00C800;">try</span><br />      oRsUser:<span style="color: #000000;">CLose</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   catch<br />   end <span style="color: #00C800;">try</span><br /><br /> *  oBrw:<span style="color: #000000;">nDataType</span> := <span style="color: #000000;">0</span><br />   oBrw:<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br /><br /> *  oBrw:<span style="color: #000000;">bKeyNo</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span> <br />   oBrw:<span style="color: #000000;">bKeyNo</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <br /><br />   oBar2:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oWndChild:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oBar1:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> lOK3 <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:3rn4l4gh]
Builds on Mac Parallels with Visual Studio
I realize this is a very specific situation but perhaps someone else has the answer. I have built my application using FWH 17.xx, Harbour, and Visual Studio Community 2017. I use the following bat file to set the variables and call the nmake program. [code=fw:12bauq6g]<div class="fw" id="{CB}" style="font-family: monospace;">@set oldpath=%path%<br />@set oldinclude=%include%<br />@set oldlib=%lib%<br />@set oldlibpath=%libpath%<br /><br /><span style="color: #00C800;">if</span> exist <span style="color: #ff0000;">"%ProgramFiles%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>017<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> call <span style="color: #ff0000;">"%ProgramFiles%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>017<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> x86<br /><span style="color: #00C800;">if</span> exist <span style="color: #ff0000;">"%ProgramFiles(x86)%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>017<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> call <span style="color: #ff0000;">"%ProgramFiles(x86)%<span style="color: #000000;">\M</span>icrosoft Visual Studio<span style="color: #000000;">\2</span>017<span style="color: #000000;">\C</span>ommunity<span style="color: #000000;">\V</span>C<span style="color: #000000;">\A</span>uxiliary<span style="color: #000000;">\B</span>uild<span style="color: #000000;">\v</span>cvarsall.bat"</span> x86<br />cd c:\projects\mls2015\source\<br />c:\<span style="color: #ff0000;">"Program Files (x86)<span style="color: #000000;">\M</span>icrosoft Visual Studio"</span>\<span style="color: #000000;">2017</span>\Community\VC\Tools\MSVC\<span style="color: #000000;">14.11</span><span style="color: #000000;">.25503</span>\bin\HostX86\x86\nmake -fASW32.mak<br /><br />@set path=%oldpath%<br />@set include=%oldinclude%<br />@set lib=%oldlib%<br />@set libpath=%oldlibpath%<br />@set oldpath=<span style="color: #ff0000;">""</span><br />@set oldinclude=<span style="color: #ff0000;">""</span><br />@set oldlib=<br />@set oldlibpath=<br />&nbsp;</div>[/code:12bauq6g] On the windows machine, I had not updated the call to vcvarsall.bat and it was still pointing to the 2015 files. It has been corrected here. The reason for the cd command was that after running the .bat it ended up in another directory. What is interesting is when I build the app in Visual Studio IDE, it all works fine. However, something in the vcvarsall.bat that is called must be creating a path problem. It errors out saying it doesn't know how to make the file (asw32.mak ). So if anyone else is using an Apple Mac with Parallels and this type of build, and has overcome this problem ( or perhaps the same problem arose on a Windows machine with 2017 ), your assistance is greatly appreciated.
Builds on Mac Parallels with Visual Studio
I've seen on two different computers that Visual Studio 2017 is sometimes installed in the folder %ProgramFiles% and sometimes in the folder %ProgramFiles(x86)% Please copy this line to clipboard and paste in console window and execute [quote:2e7s7n6c] [b:2e7s7n6c]call "%ProgramFiles%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86[/b:2e7s7n6c] [/quote:2e7s7n6c] If this command is executed successfully, then this line is incorrect [quote:2e7s7n6c] c:\"[b:2e7s7n6c]Program Files (x86)[/b:2e7s7n6c]\Microsoft Visual Studio"\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\nmake -fASW32.mak [/quote:2e7s7n6c]
Builds on Mac Parallels with Visual Studio
Even though it is 64 bit visual studio, it gets installed in <x86> HOWEVER, I did take out the first IF exists line ( the file did not exist in that location so it should have been skipped ), and now all is running and building fine. Thank you.
Builds on Mac Parallels with Visual Studio
Not always [img:3doi6etp]https&#58;//s1&#46;postimg&#46;org/8gnmbzw7y7/VS2017&#46;png[/img:3doi6etp]
Builds on Mac Parallels with Visual Studio
Interesting ... maybe I missed a prompt. It's in and working ... so I will leave it alone.
Builds on Mac Parallels with Visual Studio
Tim, Why don't you use Bootcamp ? I have been using it for years
Builds on Mac Parallels with Visual Studio
[quote="Antonio Linares":2qb0aiw8]Tim, Why don't you use Bootcamp ? I have been using it for years[/quote:2qb0aiw8] Because I want to use Windows and Mac programs at the same time. I can do this using Coherence Mode and it works well. To be honest, I was using multiple devices, and this allows me to condense them ... since the iMac allows me to have iMessage and my phone connected through the computer. That is why I want to run these things in iOS w/ Parallels. Sent from my iPhone using Tapatalk
Builds on Mac Parallels with Visual Studio
very good reason <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Built-in text editor
Hello, I need to embed in your program text editor for RTF files. Can I use any ActiveX editor or do I need to create a RichEdit ?
Built-in text editor
Richedit
Built-in text editor
Thank you mr.Rao. As In RichEdit to describe tables ?
Built-in text editor
Please, To see how the main features of the Richedit control are implemented, see the examples TestRtf.prg and TestRtf5.prg (this example explains how to insert a table) into the samples folder of Fivewin
Built-in text editor
I've looked at examples with RichEdit and wrote the editor. But there are no examples for working with tables. Many years ago there was a class TAppBox (for embedding other applications in your window).
Built-in text editor
[b:2ntkt84s]RTF - Rich Text Format (.rtf extension) - working with tables[/b:2ntkt84s] [url:2ntkt84s]http&#58;//www&#46;pindari&#46;com/rtf3&#46;html[/url:2ntkt84s]
Built-in text editor
[quote="Natter":3g30z2t8]I've looked at examples with RichEdit and wrote the editor. But there are no examples for working with tables. Many years ago there was a class TAppBox (for embedding other applications in your window).[/quote:3g30z2t8] Which version of Fw do you use? Do not have the example TestRtf5.prg in the samples folder?
Built-in text editor
Use the example TestRtf5.ptg. I can not inser a table. All works correctly but table doesn't appear. FW 17.12
Built-in text editor
Please try with [code=fw:2dcdk4e0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; oRtf:<span style="color: #000000;">InsertTable</span><span style="color: #000000;">&#40;</span> nRows, nCols <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2dcdk4e0] or [code=fw:2dcdk4e0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;oRtf:<span style="color: #000000;">aTableFormat</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := nRows<br />&nbsp; &nbsp;oRtf:<span style="color: #000000;">aTableFormat</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> := nCols<br />&nbsp; &nbsp;oRtf:<span style="color: #000000;">aTableFormat</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">20</span><br />&nbsp; &nbsp;oRtf:<span style="color: #000000;">aTableFormat</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">60</span><br />&nbsp; &nbsp;oRtf:<span style="color: #000000;">aTableFormat</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;oRtf:<span style="color: #000000;">aTableFormat</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span> := CLR_WHITE<br />&nbsp; &nbsp;oRtf:<span style="color: #000000;">aTableFormat</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#93;</span> := CLR_BLACK<br />&nbsp; &nbsp;<span style="color: #B900B9;">//{ nRows, nColumns, nHeightRows, nWidthColumn, nAlign, nColor1, nColor2 )</span><br />&nbsp; RTInsertTable5<span style="color: #000000;">&#40;</span> oRtf:<span style="color: #000000;">hWnd</span>, oRtf:<span style="color: #000000;">aTableFormat</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2dcdk4e0] and tell me
Built-in text editor
I even rewrote (overread) method InsertTable() in your program. RTInsertTable5() returns TRUE. All good, but table is not inserted
Built-in text editor
Please look [img:jqlckw14]https&#58;//s10&#46;postimg&#46;org/daplwhpnt/rtf02&#46;gif[/img:jqlckw14]
BullZip PDF
Hola a todos, Siguiendo un ejemplo de Pere Codornet he intentado SIN EXITO hacer la impresion con BullZip PDF con el codigo siguiente [code=fw:2jc9pp44]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> TestBullZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oApp<br /><span style="color: #00C800;">Local</span> cNomPdf:= <span style="color: #ff0000;">"TestBull.Pdf"</span><br /><br />Iif<span style="color: #000000;">&#40;</span>File<span style="color: #000000;">&#40;</span>cNomPdf<span style="color: #000000;">&#41;</span>,FErase<span style="color: #000000;">&#40;</span>cNomPdf<span style="color: #000000;">&#41;</span>,<span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><br />oApp := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Bullzip.PDFPrinterSettings"</span> <span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">LoadSettings</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"output"</span>, cNomPdf <span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"showpdf"</span>, <span style="color: #ff0000;">"no"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"showsaveas"</span>, <span style="color: #ff0000;">"never"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"showsettings"</span>, <span style="color: #ff0000;">"never"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"showprogress"</span>,<span style="color: #ff0000;">"no"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"showprogressfinished"</span>,<span style="color: #ff0000;">"no"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"confirmoverwrite"</span>,<span style="color: #ff0000;">"no"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"showsaveas"</span>,<span style="color: #ff0000;">"nofile"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">WriteSettings</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">PRINT</span> oPrn ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"vayita !!"</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Bullzip PDF Printer"</span><br /><br /><span style="color: #0000ff;">PAGE</span><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">ImportWMF</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"algo.wmf"</span>, .F. &nbsp;<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ENDPAGE</span><br /><br /><span style="color: #0000ff;">ENDPRINT</span><br />*<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:2jc9pp44] ¿ A alguien se le ocurre qué puedo estar haciendo mal para que no me genere el TestBull.Pdf ? Saludos
BullZip PDF
Hola Antonio: Si solo necesitas imprimir el PDF, puedes hacer esto: ( es un ejemplo ). [code=fw:ot98k54e]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> PDF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> cPDF := <span style="color: #ff0000;">"C:<span style="color: #000000;">\J</span>LL1109<span style="color: #000000;">\p</span>Mail<span style="color: #000000;">\P</span>df<span style="color: #000000;">\0</span>1.pdf"</span><br /><br />   ShellExecute<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"print"</span>, cPDF,,,<span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:ot98k54e] Para que quede mas profesional, si quieres puedes ejecutarlo en modo oculto y luego capturar la ventana Adobe Reader" para cerrarla desde el programa. Un saludo JLL
BullZip PDF
jll, Gracias por responder. No, lo que necesito es generar el pdf con la impresora virtual BullZip PDF, que como comentaba no me funciona. A ver si pudiera imprimir el pdf. Saludos
BullZip PDF
Hola, quizás sea esto lo que necesitas: Printer oPrn NAME "Impresión de Clientes" to "Bullzip PDF Printer" // funciona si esta la impresora Virtual Bullzip instalada. Saludos Ruben Fernandez
BullZip PDF
Rubén, Yo creo que eso que me comentas ya lo hace el codigo que puse, el trozo es este: [code=fw:3awd7mki]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">PRINT</span> oPrn ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"vayita !!"</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Bullzip PDF Printer"</span><br />&nbsp;</div>[/code:3awd7mki] Gracias en cualquier caso.
BullZip PDF
Hola Antonio, A mi me funciona correctamente con este codigo: [code=fw:pibyqxmo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TestBullZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oApp<br /><span style="color: #00C800;">Local</span> cNomPdf:= CURDRIVE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">":<span style="color: #000000;">\"</span>+Curdir()+"</span>\TestBull.Pdf<span style="color: #ff0000;">"<br /><br />Iif(File(cNomPdf),FErase(cNomPdf),NIL)<br />SetMode(24,80)<br /><br />Altd()<br />oUtil:= CreateObject("</span>Bullzip.PdfUtil<span style="color: #ff0000;">")<br /><br />oApp := CreateObject( "</span>Bullzip.PDFPrinterSettings<span style="color: #ff0000;">" )<br />oApp:LoadSettings(.F.)<br />oApp:SetValue("</span>output<span style="color: #ff0000;">", cNomPdf )<br />oApp:SetValue("</span>showpdf<span style="color: #ff0000;">", "</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showsaveas<span style="color: #ff0000;">", "</span>never<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showsettings<span style="color: #ff0000;">", "</span>never<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showprogress<span style="color: #ff0000;">","</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showprogressfinished<span style="color: #ff0000;">","</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>confirmoverwrite<span style="color: #ff0000;">","</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showsaveas<span style="color: #ff0000;">","</span>nofile<span style="color: #ff0000;">")<br />oApp:WriteSettings(.T.)<br /><br /><br />PRINT oPrn ;<br />      TITLE "</span>vayita !!<span style="color: #ff0000;">";<br />      TO "</span>Bullzip PDF <span style="color: #0000ff;">Printer</span><span style="color: #ff0000;">"<br /><br />PAGE<br />    For n:= 1 To 800 STEP 80<br />      oPrn:Say( n, 1, "</span>Linia: <span style="color: #ff0000;">"+Str(n) )<br />    Next<br />ENDPAGE<br /><br />ENDPRINT<br /><br />RETURN NIL<br /><br /><br /></span></div>[/code:pibyqxmo] Este codigo genera un pdf en el mismo directorio de la prueba llamado "TestBull.Pdf" A ver si te funciona. Pere.
BullZip PDF
Hola Pere, Solucionado ! He probado tu ejemplo y me ha funcionado... he buscado la diferencia con el mio y esta en que hay que [u:e72hq1yf]incluir el path en el nombre del .pdf[/u:e72hq1yf] resultante. Muchas gracias. Te debo una <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> Saludos
BullZip PDF
Hola Antonio, Vamos a mejorar un poco el programa, abrir el pdf después de crearlo. Como no depende de nosotros i no sabemos cuando tardará, tenemos un fichero que existe mientras no esta creado el pdf. [code=fw:14z0cl6b]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TestBullZip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oApp,cRunOnce,oPrn,n<br /><span style="color: #00C800;">Local</span> cNomPdf:= CURDRIVE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">":<span style="color: #000000;">\"</span>+Curdir()+"</span>\TestBull.Pdf<span style="color: #ff0000;">"<br /><br />Iif(File(cNomPdf),FErase(cNomPdf),NIL)<br /><br />oApp := CreateObject( "</span>Bullzip.PDFPrinterSettings<span style="color: #ff0000;">" )<br />oApp:LoadSettings(.F.)<br />oApp:SetValue("</span>output<span style="color: #ff0000;">", cNomPdf )<br />oApp:SetValue("</span>showpdf<span style="color: #ff0000;">", "</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showsaveas<span style="color: #ff0000;">", "</span>never<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showsettings<span style="color: #ff0000;">", "</span>never<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showprogress<span style="color: #ff0000;">","</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showprogressfinished<span style="color: #ff0000;">","</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>confirmoverwrite<span style="color: #ff0000;">","</span>no<span style="color: #ff0000;">")<br />oApp:SetValue("</span>showsaveas<span style="color: #ff0000;">","</span>nofile<span style="color: #ff0000;">")<br /><br />oApp:WriteSettings(.T.)<br /><br />cRunOnce:=  oApp:GetSettingsFileName(.t.)<br /><br />PRINT oPrn ;<br />      TITLE "</span>vayita !!<span style="color: #ff0000;">";<br />      TO "</span>Bullzip PDF <span style="color: #0000ff;">Printer</span><span style="color: #ff0000;">"<br /><br />PAGE<br />    For n:= 1 To 800 STEP 80<br />      oPrn:Say( n, 1, "</span>Linia: <span style="color: #ff0000;">"+Str(n) )<br />    Next<br />ENDPAGE<br /><br />ENDPRINT<br /><br />// Esperando que se cree el pdf.<br />Do While File( cRunOnce )<br />Enddo<br />Inkey(1) // Esperamos 1 seg. <br /><br />// Abrir el pdf<br />ShellExecute( 0, "</span>open<span style="color: #ff0000;">", cNomPdf,,,0 )<br /><br />*<br />RETURN NIL<br /><br /></span></div>[/code:14z0cl6b] Pere
BullZip PDF
Pere, Si me permites, el inkey(1) lo reemplazaria por: [code=fw:3keqedj2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> File<span style="color: #000000;">&#40;</span>cNomPdf<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> h:= FOpen<span style="color: #000000;">&#40;</span>cNomPdf, FO_EXCLUSIVE<span style="color: #000000;">&#41;</span> <= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br />&nbsp; &nbsp;FClose<span style="color: #000000;">&#40;</span>h<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp;Inkey<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span> <br />&nbsp;</div>[/code:3keqedj2] ¿ Que te parece ? Se trata de no tener que esperar el segundo si el fichero ya esta disponible. Saludos
BullZip PDF
Pere, Con la opcion: [code=fw:1cx2ljmn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oApp:<span style="color: #000000;">SetValue</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"showpdf"</span>, <span style="color: #ff0000;">"yes"</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1cx2ljmn] también abre el pdf, sin necesidad de hacerlo programáticamente.
BullZip PDF
Atención Pere, He puesto el test que llevamos entre manos en la ofi de mi cliente y en el momento de generar el pdf le aparece ¡ una caja de dialogo ¡ para seleccionar impresora. ¿ Se te ocurre por qué puede estar pasando ? El cliente corre con una sesion de Terminal Server 2008 y ha instalado el BullZip PDF en su sesion. Me parecio que dijiste que BullZip funcionaba en TS. A ver si me puedes echar una mano que no consigo imprimir pdfs ni con PdfCreator, ni con Image2Pdf y ahora parece que tampoco quiere ir el BullZip. Gracias.
BullZip PDF
Antonio, Seguramente el nombre de la impresora, fijate bien ( normalmente pone en sesion XXx), esto también forma parte del nombre de la impresora. Estoy de acuerdo, el problema es cuando lo quieres guardar a algun sitio concreto, o trabajar con el archivo, necesitas saber cuando estara disponible. de todos modos, gracias por la aclaración. Pere
BullZip PDF
Pere, Me da la sensacion que es lo que tu dices... que el nombre de la impresora no coincide... lo digo porque me pasa lo mismo con el PDFCreator. Pero el problema es que en la lista de impresoras obtenida con GetPrinters(), el nombre de la impresora es exactamente correcto: "Bullzip PDF printer"... no hay error. Alguna idea, porque esto me lleva loco ? El ambiente de pruebas es Windows Terminal Server 2008. Saludos
BullZip PDF
Pere, Parece que el problema pueda estar en lo que devuelve [b:19dgmxdn]GetProfString( "Devices", 0 )[/b:19dgmxdn] en ambiente Terminal Server 2008. He abierto un nuevo hilo a ver si alguien puede echar una luz. Saludos
BullZip PDF
Pere, Finalmente pude decirle la impresora Bullzip con SetPrintDefault(); el problema ahora es que en el cliente (Terminal Server) le da un error de que no puede generar el archivo. A mi en la ofi si me lo hace bien. Has podido tu hacer funcionar el Bullzip en Windows Terminal Server 2008 ? Saludos
BullZip PDF
Hola Antonio, Prueba con esto: [code=fw:2jlzz44n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> aPrinters,i<br /><br />aPrinters:= WIN_PRINTERLIST<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">For</span> i:= <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span>aPrinters<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ? aPrinters<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br />&nbsp;</div>[/code:2jlzz44n] Atención tienes que enlazar la libreria hbwin de Harbour. Pere.
BullZip PDF
Hola Pere, No te he podido responder antes... La verdad es que el tema del pdf me tiene bastante desanimado ya... He probado Image2Pdf (dll), PdfCreator y Bullzip Pdf. Los 3 *si* me han funcionado a mi en mi ofi. Pero en la ofi del cliente, sobre un Terminal Server 2008 tengo que *no* funciona bien porque: Image2Pdf no coge el font bien. PdfCreator pide el nombre del fichero en el momento de imprimir Bullzip da un error de fichero... no sé qué y no genera el pdf ¿ Utilizas tu Terminal Server 2008 ? Saludos
BullZip PDF
Utilizo el image2pdf para convertir los emf de las preview en archivos pdf pero no la dll sino el exe bajo linea de comandos sin problemas, inlcusive en un servidor con server 2008, y por escritorio remoto tambien. La linea que ejecuto es: cLicence := TU CODIGO DE LICENCIA de image2pdf cEMF := el nombre del archivo de preview a convertir con path completo incluido cPDF := el nombre del archivo pdf de salida con path completo cCommand := "C:\Image2PDF.EXE -License " + cLicence + " -image " + cEMF + " -MetaToNativePDF -UseEMFFrameSize -output " + cPDF WaiRun( cCommnand, 0 ) Espero que te sirva. Saludos!
BullZip PDF
Tecnisoftware, Gracias por responder. Mira, lo que me pasa con el image2pdf sobre el TS 2008 es que no traduce bien el font. Yo utilizo archivos .Wmf. He contactado con Adrian de Utility Warrior, y por lo que me dice es que en el TS 2008 no están todos los fonts instalados y por eso traduce al más aproximado. Saludos
BullZip PDF
Hola Para generar pdfs lo mejor es el PDFCREATOR 1. INSTALAS PDFCREATOR 2. LO CONFIGURAS: PDFCREATOR-OPCIONES-AUTOGUARDADO USAR AUTOGUARDADO NOMBRE DE ARCHIVO: TITLE Y ASIGNAS UNA CARPETA DONDE SE GUARDAN (PEJM C:\PDFS) 3. EN TU PROGRAMA HACES LO SIGUIENTE XPDF="PDFCREATOR" TIT1="REP1" PRINT oPrn NAME TIT1 TO (XPDF) . . ENDPRINT AL FINAL TENDRAS UN ARCHIVO EN C:\PDFS\REP1.PDF ESPERO TE SIRVA
Bunch of bug in TGet
Hi All, Again it`s been a long time since I was on this forum. I`m picking up where I left a few months ago. For a while I thought I was crazy, but I went into heavy testing the TGet of FiveWin and found a few exasperating bugs. Fisrt bug occurs when the text of a get object occupies all the positions and the cursor is positionned at the end of the text. In this case if I use the BackSpace key the character deleted is the previous to the last. ex.: This is the text in the get object¦ -> original text This is the text in the get obje¦t -> once backspace pressed Second bug occurs if the text has the same lenght than the get object and the cursor is positioned anywhere in the get object. In this case if I use the right arrow key to reach the end of the text, the cursor wont go any further than the last character. Same situation occurs if I use the end key. ex.: ¦This is the text in the get object -> original text This is the text in the get objec¦t -> right arrow to the end Third bug concerns the oGet:SelectAll() METHOD. Using the ON INIT clause of the activate dialog command to call the method should result in the get object text beeing selected and hilight in the control. This is not the case. Fourth bug is even worst. Trying to use Copy, Cut and Paste METHOD to try to transport data from one get object to another one is absolutely desastrous. This is the case using either the keyboard shortcuts or the contextual menu. Does anyone has an idea on how to fix these problem <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Regards Gilbert <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Bunch of bug in TGet
Hi, If anyone is interested in trying out these scenario, I have created 4 small test program that demonstrates the problems. Regards Gilbert
Bunch of bug in TGet
Gilbert, Are you using FW for Clipper ? What version ? > If anyone is interested in trying out these scenario, I have created 4 small test program that demonstrates the problems. Yes, please
Bunch of bug in TGet
Hi Antonio, I`m using Clipper 5.3 and FiveWin 2.5 For the sample program I will send them to your personal email. Regards Gilbert
Buon 2010
Auguroni! EMG
Buon 2010
Auguri a tutti
Buon 2010
Tantissimi auguri <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Buon 2010
Auguri a tutti!!!
Buon Natale e Felice 2008
[img:a3hspfzv]http&#58;//img212&#46;imageshack&#46;us/img212/6392/auguriwe2&#46;jpg[/img:a3hspfzv]
Buon Natale e Felice 2008
Auguroni anche da parte mia! EMG
Buon Natale e Felice 2008
Tantissimi auguri anche da parte mia. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Buon compleanno caro Enrico
What matters is the state of conservation, not the year of registration, happy birthday!!!
Buon compleanno caro Enrico
Happy birthday my friend !!! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Buon compleanno caro Enrico
Happy Birthday and Many happy returns of the day
Buon compleanno caro Enrico
Thank you, my friends! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Buon compleanno caro Enrico
Hi, Happy Birthay giovanotto! Buona giornata <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> C.
Buon compleanno caro Enrico
Auguri Enrico , Maurizio
Buon compleanno caro Enrico
Querido Enrico, Que tengas un muy feliz cumpleaños junto a los tuyos.
Buon compleanno caro Enrico
Tantissimi auguri Enrico, buon compleanno !!!
Buon compleanno caro Enrico
Zorionak Enrico !!!!
Buon compleanno caro Enrico
Feliz Cumpleaños Enrico Abrazo
Buon compleanno caro Enrico
Many thanks to all! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Buon compleanno caro Enrico
Feliz cumpleaños estimado Enrico que los vientos a favor te acompañen !!
Buon compleanno caro Enrico
[b:1rsp3a86]Auguri in super ritardo [/b:1rsp3a86]
Buona Pasqua
Buona Pasqua a Voi e alle Vostre Famiglie <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Buona Pasqua
Buona Pasqua anche da parte mia! EMG
Buona Pasqua
Buona Pasqua e un pensiero a chi ha avuto la terribile esperienza del terremoto.
Buona Pasqua
Buona Pasqua a tutti!!!
Burn files to CD/DVD
Hi ! Can I burn files to CD/DVD drive ?