topic
stringlengths
1
63
text
stringlengths
1
577k
Catching GPF's
Hi. I'm looking at catching GPF's in xHarbour using SetUnhandledExceptionfilter. Has anybody done this already that can provide me with a sample? Thanks, Alex
Catching GPF's
Alex, If you use the xHarbour build we provide from <!-- w --><a class="postlink" href="http://www.fivetechsoft.com/files/xharbour.exe">www.fivetechsoft.com/files/xharbour.exe</a><!-- w --> it already include GPFs catching using SetUnhandledExceptionfilter(). Both Harbour and xHarbour already include support for SetUnhandledExceptionfilter() but you have to build them using this flag: -DHB_INCLUDE_WINEXCHANDLER Also in xharbour this fix is needed in source\vm\mainwin.c: [code:606zwdul] int WINAPI WinMain&#40; HINSTANCE hInstance, /* handle to current instance */ HINSTANCE hPrevInstance, /* handle to previous instance */ LPSTR lpCmdLine, /* pointer to command line */ int iCmdShow &#41; /* show state of window */ &#123; #ifdef HB_INCLUDE_WINEXCHANDLER LONG WINAPI hb_UnhandledExceptionFilter&#40; struct _EXCEPTION_POINTERS * ExceptionInfo &#41;; LPTOP_LEVEL_EXCEPTION_FILTER ef = SetUnhandledExceptionFilter&#40; hb_UnhandledExceptionFilter &#41;; #endif [/code:606zwdul] And rename UnhandledExceptionFilter() as hb_UnhandledExceptionFilter() in source\vm\estack.c. This code is already included in Harbour CVS files, but it is not in xharbour CVS.
Catching GPF's
We're currently using the commercial version of xHarbour. I'll see what I can find out from their newsgroup. Alex
Catching HB_CompileFromBuf() errors
Its been a long time since this conversation happened in the Harbour development group: [url:2uao77ti]https&#58;//groups&#46;google&#46;com/d/msg/harbour-devel/WFnOTGO91gk/RdLiu_JyAWYJ[/url:2uao77ti] Today I tried to understand Przemek's words again: [quote:2uao77ti]Such redirection should be implemented using GT API because it will in all cases, is portable and much simpler. Anyhow it's still not necessary because we have PRG API for it so it's enough to catch RTE. [/quote:2uao77ti] And after carefully reviewing Przemek's source code, I found the right way to do it. There is an undocumented second parameter than when specified as .T. it generates RTE (run time errors) that we can easily catch: ErrorBlock( { | o | MsgInfo( o:Description ), DoBreak() } ) oHrb = HB_CompileFromBuf( cCode, [b:2uao77ti].T.[/b:2uao77ti], "-n" ) // The .T. does the magic <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> better later than never <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
Catching HB_CompileFromBuf() errors
How I discovered it: function HB_CompileFromBuf() is declared in c:\harbour\src\compiler\hbcmplib.c and it makes this call: hb_compGenArgList( 2, hb_pcount(), &argc, &argv, &pIncItem, &pOpenFunc, &pMsgFunc ); Notice the 2. In hb_compGenArgList() we find this code: [code=fw:lx8ry9nz]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> pMsgFunc <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      *pMsgFunc = <span style="color: #00C800;">NULL</span>;<br />      <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> HB_ISLOG<span style="color: #000000;">&#40;</span> iFirst <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #000000;">&#123;</span><br />         <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hb_parl<span style="color: #000000;">&#40;</span> iFirst <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            *pMsgFunc = s_pp_msg;<br />         ++iFirst;<br />      <span style="color: #000000;">&#125;</span><br />   <span style="color: #000000;">&#125;</span></div>[/code:lx8ry9nz] Which means: If the second parameter (the number 2) is logical and it is true, then s_pp_msg is used to route the compiler msgs. And from s_pp_msg() the runtime error is created: [code=fw:lx8ry9nz]<div class="fw" id="{CB}" style="font-family: monospace;">      pError = hb_errRT_New<span style="color: #000000;">&#40;</span> ES_ERROR, <span style="color: #ff0000;">"COMPILER"</span>, <span style="color: #000000;">1001</span>, <span style="color: #000000;">&#40;</span> HB_ERRCODE <span style="color: #000000;">&#41;</span> iValue,<br />                             szMsgBuf, szLine, <span style="color: #000000;">0</span> <span style="color: #B900B9;">/*OsCode*/</span>, EF_NONE <span style="color: #000000;">&#41;</span>;<br />      hb_errLaunch<span style="color: #000000;">&#40;</span> pError <span style="color: #000000;">&#41;</span>;<br />      hb_errRelease<span style="color: #000000;">&#40;</span> pError <span style="color: #000000;">&#41;</span>;</div>[/code:lx8ry9nz]
Catching errorlevel from old dos app
Hello all How can I determine what error code a dos app returns. I’m using the blat command line mailer. When the email doesn’t get sent the app returns an non zero errorlevel code. Is there a way to get that code without writing a second app to trap it and pass it along to the main app through a file or something. For exaple [code:3l9f57k3] nError &#58;= WaitRun&#40;‘BLAT&#46;EXE &#46;\BODY&#46;HTM –s “Test email 11” –t dummy@dummy&#46;dum –html -noh2 –try 3’&#41; [/code:3l9f57k3] Also can the command be passed to WaitRun through a var. Thank you
Catching errorlevel from old dos app
Try ErrorLevel() function. EMG
Catching errorlevel from old dos app
Here is a beeter example. [code:1dkofsb2] // erelvl&#46;prg #include "fivewin&#46;ch" PROCEDURE Main&#40;&#41; LOCAL nErr nErr &#58;= WaitRun&#40;"tst2&#46;exe"&#41; MSGInfo&#40;nErr&#41; MSGInfo&#40;errorlevel&#40;&#41;&#41; // returns 0 RETURN // tst2&#46;prg ? "hello to you" errorlevel&#40;1&#41; inkey&#40;3&#41; [/code:1dkofsb2]
Catching errorlevel from old dos app
Sorry, I don't think that ErrorLevel() function can help you. EMG
Category tree with xBrowse
I have a table for categories I want to show in xBrowse with a tree can someone help me? Table Structure ID N 3 Parent N 3 Bez C 30 [list:1o4no1ev] Local aData := { ; { 1,0 , "Neu" }, ; { 2,0 , "OK Kat1"}, ; { 3,0 , "OK Marken"}, ; { 4,0 , "OK Kat3"}, ; { 5,3 , "UK Ford"}, ; { 6,3 , "UK Opel"}, ; { 7,3 , "UK VW"}, ; { 8,3 , "UK Porsche"}, ; { 9,3 , "OUK Gel„ndewagen"}, ; { 10,9, "UUK Q7"}, ; { 11,9, "UUK Kuga" }, ; { 12,9, "UUK Tucson"}, ; { 13,9, "UUK Sorento"}, ; { 14,0, "OK Kat4"} } [/list:u:1o4no1ev] Greeting Manfred
Category tree with xBrowse
[code=fw:2zqbmyj4]<div class="fw" id="{CB}" style="font-family: monospace;"><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 />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont, oBrw<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTree<br /><br />&nbsp; &nbsp;CreateTestDBF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oTree &nbsp; &nbsp;:= MakeTree<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE oTree CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;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>:<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> FWDArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, FwRArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\n</span>ew2.bmp"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nStretchCol</span> &nbsp;:= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;oTree:<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;">static</span> <span style="color: #00C800;">function</span> MakeTree<br /><br />&nbsp; &nbsp;field <span style="color: #0000ff;">ID</span>,PARENT,BEZ<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTree, n<br /><br />&nbsp; &nbsp;USE CATG <span style="color: #00C800;">NEW</span> SHARED<br />&nbsp; &nbsp;<span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> STR<span style="color: #000000;">&#40;</span>PARENT,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>+STR<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ID</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> TAG PARID <span style="color: #0000ff;">TO</span> TMP MEMORY<br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;TREE oTree<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> ! eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n &nbsp; &nbsp; := PARENT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TREEITEM <span style="color: #ff0000;">"Parent - "</span> + Str<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TREE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> PARENT == n .and. ! eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TREEITEM BEZ<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SKIP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ENDTREE<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp;ENDTREE<br /><br />&nbsp; &nbsp;oTree:<span style="color: #000000;">OpenAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> oTree<br /><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> CreateTestDBF<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aCols := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ID"</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Parent"</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Bez"</span>, &nbsp;<span style="color: #ff0000;">'C'</span>, &nbsp;<span style="color: #000000;">30</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData := <span style="color: #000000;">&#123;</span> ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"Neu"</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"OK Kat1"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">3</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"OK Marken"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">4</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"OK Kat3"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">5</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK Ford"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">6</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK Opel"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">7</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK VW"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">8</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK Porsche"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">9</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"OUK Gel„ndewagen"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Q7"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">11</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Kuga"</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">12</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Tucson"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">13</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Sorento"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">14</span>,<span style="color: #000000;">0</span>, <span style="color: #ff0000;">"OK Kat4"</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;DBCREATE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CATG"</span>, aCols, <span style="color: #ff0000;">"DBFCDX"</span>, .t., <span style="color: #ff0000;">"CTG"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FW_ArrayToDBF<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;CLOSE CTG<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2zqbmyj4]
Category tree with xBrowse
This is cool! If someone want show 2 columns, ID and Bez, how the code becomes ? Regards, Perry
Category tree with xBrowse
[quote="AntoninoP":csymuz6d]This is cool! If someone want show 2 columns, ID and Bez, how the code becomes ? Regards, Perry[/quote:csymuz6d] [code=fw:csymuz6d]<div class="fw" id="{CB}" style="font-family: monospace;"><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 />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont, oBrw<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTree<br /><br />&nbsp; &nbsp;CreateTestDBF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oTree &nbsp; &nbsp;:= MakeTree<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE oTree COLUMNS <span style="color: #000000;">1</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"ID"</span>, <span style="color: #ff0000;">"BEZ"</span> ;<br />&nbsp; &nbsp; &nbsp; COLSIZES <span style="color: #000000;">100</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;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>:<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> FWDArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, FwRArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\n</span>ew2.bmp"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nStretchCol</span> &nbsp;:= <span style="color: #000000;">2</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">nLevel</span> == <span style="color: #000000;">1</span>, CLR_YELLOW, CLR_WHITE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;oTree:<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;">static</span> <span style="color: #00C800;">function</span> MakeTree<br /><br />&nbsp; &nbsp;field <span style="color: #0000ff;">ID</span>,PARENT,BEZ<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTree, n<br /><br />&nbsp; &nbsp;USE CATG <span style="color: #00C800;">NEW</span> SHARED<br />&nbsp; &nbsp;<span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> STR<span style="color: #000000;">&#40;</span>PARENT,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>+STR<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ID</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> TAG PARID <span style="color: #0000ff;">TO</span> TMP MEMORY<br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;TREE oTree<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> ! eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n &nbsp; &nbsp; := PARENT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TREEITEM Str<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> CARGO <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Parent - "</span> + Str<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TREE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> PARENT == n .and. ! eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TREEITEM STR<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ID</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> CARGO <span style="color: #000000;">&#123;</span> BEZ <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SKIP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ENDTREE<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp;ENDTREE<br /><br />&nbsp; &nbsp;oTree:<span style="color: #000000;">OpenAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> oTree<br /><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> CreateTestDBF<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aCols := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ID"</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Parent"</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Bez"</span>, &nbsp;<span style="color: #ff0000;">'C'</span>, &nbsp;<span style="color: #000000;">30</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData := <span style="color: #000000;">&#123;</span> ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"Neu"</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"OK Kat1"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">3</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"OK Marken"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">4</span>,<span style="color: #000000;">0</span> , <span style="color: #ff0000;">"OK Kat3"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">5</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK Ford"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">6</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK Opel"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">7</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK VW"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">8</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"UK Porsche"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">9</span>,<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"OUK Gel„ndewagen"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Q7"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">11</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Kuga"</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">12</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Tucson"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">13</span>,<span style="color: #000000;">9</span>, <span style="color: #ff0000;">"UUK Sorento"</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">14</span>,<span style="color: #000000;">0</span>, <span style="color: #ff0000;">"OK Kat4"</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;DBCREATE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CATG"</span>, aCols, <span style="color: #ff0000;">"DBFCDX"</span>, .t., <span style="color: #ff0000;">"CTG"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FW_ArrayToDBF<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;CLOSE CTG<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:csymuz6d]
Category tree with xBrowse
Thank Rao Unfortunately, I did not wanted. the tree should be -Neu -OK Kat1 -OK Marken --UK Ford --UK Opel --UK VW --UK Porsche --OUK Geländewagen ---UUK Q7 ---UUK Kuga ---UUK Tucson ---UUK Sorento -OK Kat3 -OK Kat4 I have found the solution ! [code=fw:1cr9ng66]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// -----------------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> BuildXbTree<span style="color: #000000;">&#40;</span> oCon<span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// -----------------------------------------------------------------------------------------------</span><br />    <span style="color: #00C800;">LOCAL</span> oTree  := <span style="color: #00C800;">NIL</span><br />    <span style="color: #00C800;">LOCAL</span> aRows  := <span style="color: #00C800;">NIL</span><br />    <span style="color: #00C800;">LOCAL</span> oRs<br />    <span style="color: #00C800;">LOCAL</span> cSql := <span style="color: #ff0000;">'SELECT * FROM OSKAT'</span><br /><br />    oRs := TRecSet<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 />    oRs :<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> cSql, oCon <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">if</span> oRs :<span style="color: #000000;">Used</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />        <span style="color: #00C800;">IF</span> oRs:<span style="color: #000000;">RecordCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />            aRows := oRs:<span style="color: #000000;">GetRows</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #B900B9;">//oTree := GenSubTree(aRows,0,0,-1)</span><br />            oTree := GenSubTree<span style="color: #000000;">&#40;</span>aRows,<span style="color: #00C800;">NIL</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />       <br />    <span style="color: #00C800;">endif</span><br /><br /><br /><span style="color: #00C800;">return</span> oTree<br /><br /><span style="color: #B900B9;">// -----------------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GenSubTree<span style="color: #000000;">&#40;</span> aRows, cSuchId, nAktLevel, nLastLevel<span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// -----------------------------------------------------------------------------------------------</span><br /><br />    <span style="color: #00C800;">local</span> oTree, oItem<br />    <span style="color: #00C800;">LOCAL</span> cBez   := <span style="color: #ff0000;">""</span><br />    <span style="color: #00C800;">LOCAL</span> aRow   := <span style="color: #00C800;">NIL</span><br />    <span style="color: #00C800;">LOCAL</span> nItems := <span style="color: #000000;">0</span><br /><br />    <span style="color: #B900B9;">//altd()</span><br /><br />    <span style="color: #00C800;">IF</span> len<span style="color: #000000;">&#40;</span>aRows <span style="color: #000000;">&#41;</span>> <span style="color: #000000;">0</span><br /><br />        <span style="color: #00C800;">FOR</span> each aRow in aRows<br />            cBez := aRow<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br /><br />            <span style="color: #00C800;">if</span> aRow<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> == cSuchId<br />                <span style="color: #00C800;">if</span> nAktLevel > nLastLevel<br />                    TREE oTree<br />                <span style="color: #00C800;">ENDIF</span><br />                TREEITEM oItem <span style="color: #0000ff;">PROMPT</span> aRow<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br />                oItem:<span style="color: #000000;">Cargo</span>  := <span style="color: #000000;">&#123;</span> space<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span> , space<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>, space<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />                <span style="color: #00C800;">if</span> nAktLevel > nLastLevel<br />                    nLastLevel := nAktLevel<br />                <span style="color: #00C800;">endif</span><br />                nAktLevel++<br />                GenSubTree<span style="color: #000000;">&#40;</span>  aRows, aRow<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, nAktLevel, nLastLevel <span style="color: #000000;">&#41;</span><br />                nAktLevel--<br />            <span style="color: #00C800;">endif</span><br />        <span style="color: #00C800;">NEXT</span><br />        <span style="color: #00C800;">if</span> nAktLevel == nLastLevel<br />            ENDTREE<br />        <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> oTree<br /> </div>[/code:1cr9ng66] greeting Manfred
Catering for Different User Screen Resolutions
How does one cater for different screen resolutions? I have designed my screens for 800x600, assuming that it would suite most people, even those with large screens and finer resolutions. Typical data input screens e.g.: Company: XXX Acc no. XXXX Surname: XXXX Firstname: XXXX etc. Some users that run 1024 x 768 and better have asked if the screen can be made large for them. How does one cater for this?
Catering for Different User Screen Resolutions
Hi, 1.Modify dialog.prg: add METHOD Autoresize(ntop,nleft) local i,rsl0,rsl1,oCtrol,aRect DEFAULT ntop:=0 DEFAULT nleft:=0 rsl0:=getsysmetrics(0)/800 if rsl0<=1; return ; end //<=800*600, not needed rsl1:=getsysmetrics(1)/600 for i:=1 TO LEN(::acontrols) oCtrol = ::aControls[i] aRect = GetCoors( oCtrol:hWnd ) if oCtrol:classname()=="TCOMBOBOX" oCtrol:Move( aRect[1]*rsl0, aRect[2]*rsl1) else oCtrol:Move( aRect[1]*rsl0, aRect[2]*rsl1, (aRect[4] - aRect[2])*rsl0, (aRect[3] - aRect[1])*rsl1, .t. ) end next aRect = GetWndRect( ::hWnd ) ::Move( ntop,nleft,::nWidth*rsl0, ::nHeight*rsl1, .T. ) if ::lCentered WndCenter( ::hWnd ) else if Empty( ::cResName ) ::Move( ::nTop, ::nLeft ) endif endif return 2. on app activate dialog mydialog on init mydialog:autoresize() 3. need enhance , on 1280*800 wider screen , it's not work fine,it must set to normail, like 1280*1024, 1024*768, 800*600. Regards Shuming Wang
Catering for Different User Screen Resolutions
hi, works in windows (mdi) too?? thanks
Catering for Different User Screen Resolutions
Not yet.
Caution: Windows 10 Fall Creators Update
Reported by Alaska: [quote:2sw0a4ed]// Caution: Windows 10 Fall Creators Update Our final tests with Windows 10 Version 1709 (Fall Creators Update) revealed timing issues with the local file system, which may lead to changed application behavior as well as application runtime errors. In fact, all coding patterns which first delete a file on the local storage and then assume the file is gone may fail. This is valid for all programming languages used as the behaviour is introduced on the Windows API/file-system level. In other words, an FErase( "test.dbf" ) may lead to File( "test.dbf" ) == .T. in some but not all cases. With that finding in mind we can not recommend updating production systems right now to Windows 10 Fall Creators Update.[/quote:2sw0a4ed]
Caution: Windows 10 Fall Creators Update
Dear Antonio, I noticed such behaviour with SMB2 as well. I am not sure but I think Directory() gives better result than file. Is this technically possible or are the underlying function the same? Thanks in advance Otto
Caution: Windows 10 Fall Creators Update
Otto, The underlying function is the same: hb_fsFindFirst() (also hb_fsFindNext() on Directory()) [url:1ry58puq]https&#58;//github&#46;com/harbour/core/blob/master/src/rtl/file&#46;c[/url:1ry58puq] [url:1ry58puq]https&#58;//github&#46;com/harbour/core/blob/master/src/rtl/direct&#46;c[/url:1ry58puq] but as Directory() has to work with more than one file, maybe that makes Windows process pending tasks This is just a guess
Caution: Windows 10 Fall Creators Update
Antonio, Otto Unfortunately .. the Fall Creator has been rolled out to almost everyone in the US .. and as you know, there is no way you can really stop the updates in Windows 10 .. I see many customers walk into the repair shop with the 'spinning wheel of death' 9 out of 10 times due to the Fall Creator update fails for some reason. Also with the Intel and AMD 'meltdown' and 'specter' vulnerabilities .. we have seen 3 ( count um ) 3 January Windows 10 Cumulative security roll ups.... where one roll-up fixes that last roll-up. In my opinion .. Microsoft is it's own worst 'virus' and needs to be slapped with a class action law suit' to stop updates without your consent ... no one should be allowed to update your computer without your permission. As far as the confirmation of deletions ... I generally have one folder in my app for temp file creation and I always wipe all the files in that folder every time anyone logs into my systems .. just in case of a run-time error leaves clutter in the TempFile folder or I forget to ( rarely ) clean up after myself. Rick Lipkin
Caution: Windows 10 Fall Creators Update
I also had problems in this case when I create temporary tables locally. To solve the problem I had to invent a routine. [code=fw:ajp8fb46]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> TAds_TableErase<span style="color: #000000;">&#40;</span>f_nConnection,f_cTableName<span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">Local</span> oDs_Qry, lExecute := .F., iFor := <span style="color: #000000;">0</span><br /><br />&nbsp; <span style="color: #00C800;">Default</span> f_nConnection := tAds_GetConnectionDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">If</span> HB_ISNIL<span style="color: #000000;">&#40;</span>st_lExeTableErase<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; st_lExeTableErase := .F.<br />&nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; <span style="color: #00C800;">For</span> iFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">50</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> st_lExeTableErase<br />&nbsp; &nbsp; &nbsp; hb_idleSleep<span style="color: #000000;">&#40;</span>.<span style="color: #000000;">02</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; Exit<br />&nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; <span style="color: #00C800;">Next</span><br /><br />&nbsp; st_lExeTableErase := .T.<br />&nbsp; <br />&nbsp; <span style="color: #00C800;">If</span> !TAds_TableExist<span style="color: #000000;">&#40;</span>f_nConnection,f_cTableName<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; TADS_LOGFILE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"tAdsError.log"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TAds_TableErase - TAds_TableExist() / Incorrect erase / Table not exist: "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;f_cTableName +<span style="color: #ff0000;">" Con: "</span>+Alltrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>f_nConnection<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, ProcName<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" ("</span>+AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>ProcLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">")"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; st_lExeTableErase := .F.<br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> .T.<br />&nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; <span style="color: #00C800;">If</span> f_nConnection == <span style="color: #000000;">121</span> <span style="color: #B900B9;">// Temporary Table local // error in Windows 10</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #00C800;">For</span> iFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">50</span><br />&nbsp; &nbsp; &nbsp; AdsConnection<span style="color: #000000;">&#40;</span>tAds_GetConnectionHandle<span style="color: #000000;">&#40;</span><span style="color: #000000;">121</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; lExecute := AdsDDRemoveTable<span style="color: #000000;">&#40;</span>f_cTableName,.T.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> lExecute<br />&nbsp; &nbsp; &nbsp; &nbsp; Exit <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; TADS_LOGFILE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"tAdsError.log"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"iFor = "</span>+Alltrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>iFor<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" Con: "</span>+AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span><span style="color: #000000;">121</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; &nbsp; &nbsp;<span style="color: #ff0000;">"TAds_TableErase - AdsDDRemoveTable / Not Remove table: "</span>+f_cTableName, ProcName<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" ("</span>+AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>ProcLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">")"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hb_idleSleep<span style="color: #000000;">&#40;</span>.<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Next</span><br />&nbsp; &nbsp; AdsConnection<span style="color: #000000;">&#40;</span>tAds_GetConnectionDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; oDs_Qry := tAds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">DsNew</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span>,f_nConnection<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oDs_Qry:<span style="color: #000000;">cQrySql</span> := <span style="color: #ff0000;">"DROP TABLE "</span>+f_cTableName+<span style="color: #ff0000;">" FROM DATABASE ;"</span><br />&nbsp; &nbsp; lExecute := oDs_Qry:<span style="color: #000000;">DsExecute</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oDs_Qry:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; <br />&nbsp; <span style="color: #00C800;">If</span> f_nConnection == <span style="color: #000000;">121</span> <span style="color: #B900B9;">// Temporary Table local</span><br />&nbsp; &nbsp; <span style="color: #00C800;">For</span> iFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">80</span> <br />&nbsp; &nbsp; &nbsp; fErase<span style="color: #000000;">&#40;</span>tAds_GetPathTemp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+f_cTableName+<span style="color: #ff0000;">".adt"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; fErase<span style="color: #000000;">&#40;</span>tAds_GetPathTemp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">".adi"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; fErase<span style="color: #000000;">&#40;</span>tAds_GetPathTemp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+f_cTableName+<span style="color: #ff0000;">".adm"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> !File<span style="color: #000000;">&#40;</span>tAds_GetPathTemp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+f_cTableName+<span style="color: #ff0000;">".adt"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Exit<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hb_idleSleep<span style="color: #000000;">&#40;</span>.<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Next</span><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> File<span style="color: #000000;">&#40;</span>tAds_GetPathTemp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+f_cTableName+<span style="color: #ff0000;">".adt"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; TADS_LOGFILE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"tAdsError.log"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TAds_TableErase() - Not fErase "</span>+f_cTableName, ProcName<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" ("</span>+AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>ProcLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">")"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; <br /><span style="color: #00C800;">RETURN</span> lExecute <br />&nbsp;</div>[/code:ajp8fb46]
Caution: Windows 10 Fall Creators Update
When Satya Nadella took over as CEO, he established the "freedom to create" philosophy and shared it with all Microsoft staff ( in a memo later made public ). It places an emphasis on ideas and creative exploration rather than the stability of products, and their use in the "real world." I expressed my concerns at the time ( directly to him by email which he did read, and to which he responded ), followed by specific reports to his assistant. In some cases, I worked with the administrative team for months following up on bugs in their own hardware ( Surface ), and specific software issues. In most cases, the programming engineers will do little or nothing to fix the mistakes they have made. Microsoft support has fallen apart. It is mostly scripted responses to input that often do not at all relate to the actual problems reported. My clients are growing very frustrated with these updates. Every time they happen overnight, the networking doesn't work. They get no real notifications. Instead they are learning to down all computers, and then bring them back up to complete the updates, and return ( hopefully ) to operation. I share this because we are all experiencing issues. I would like to encourage you to send an email with your concerns directly to Satya Nadella. Maybe enough input will get him to return some focus to quality control on a product most of the world's computers depend on to operate essential services and businesses.
Caution: Windows 10 Fall Creators Update
<!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> Anyway, I didn't notice that problem so far... EMG
Caution: Windows 10 Fall Creators Update
Maybe doing a Sysrefresh() before the File() would be a workaround. If that works, you could create your own file checking routine: [code=fw:1ost20v6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> xfile<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> File<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:1ost20v6]
Caution: Windows 10 Fall Creators Update
To All Just my 2 cents worth ( again ) .... sounds like a latency hard disk write problem ... whether it be on a network or a local drive.... unfortunately not everyone can afford a solid state drive .... there is basically zero latency with disk writes and I have a SSD and not seen the problem on my machine. Rick Lipkin
Caution: Windows 10 Fall Creators Update
James, [quote="James Bott":4ie5kg50]Maybe doing a Sysrefresh() before the File() would be a workaround. If that works, you could create your own file checking routine: [code=fw:4ie5kg50]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> xfile<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   Sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> File<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:4ie5kg50][/quote:4ie5kg50] yes, very good idea
Caution: Windows 10 Fall Creators Update
Hello, I found this post: <!-- m --><a class="postlink" href="https://support.microsoft.com/en-us/help/4034314/smbv1-is-not-installed-windows-10-and-windows-server-version-1709">https://support.microsoft.com/en-us/hel ... rsion-1709</a><!-- m --> Maybe missing SMB is the problem. Best regards, Otto
Cayetano's BarLib
Original Cayetano's BarLib to create barcodes: <!-- m --><a class="postlink" href="http://hyperupload.com/download/02bd8de195/barlib.zip.html">http://hyperupload.com/download/02bd8de ... b.zip.html</a><!-- m -->
Cayetano's BarLib
Cayetano's BarLib enhanced by Enrico: <!-- m --><a class="postlink" href="http://hyperupload.com/download/029e8f4142/BarLib2.zip.html">http://hyperupload.com/download/029e8f4 ... 2.zip.html</a><!-- m -->
Cayetano's BarLib
Not so enhanced. Only some little bugfixes. EMG
Cayetano's BarLib
EMG or Antonio When I download from Hypersys there is a bug I not can see anything into Barlib2.zip Can you correct the problem ? Best Regards
Cayetano's BarLib
I just tried to download it and it seems ok. Anyway, I'm going to send it to your private mailbox. EMG
Cayetano's BarLib
All, May I know the availability of barlib2? Looks like not found in the download site. Thanks, Jose
Cayetano's BarLib2
All, May I know the availability of barlib2? Looks like not found in the mentioned download site. (<!-- m --><a class="postlink" href="http://hyperupload.com/download/029e8f4142/BarLib2.zip.html">http://hyperupload.com/download/029e8f4 ... 2.zip.html</a><!-- m -->) Thanks, Jose
Cayetano's BarLib2
Barlib2 is a Barlib modified from EMG try to ask to Emg please Not send me any message please
Cayetano's BarLib2
I have no Barlib2. I only made a little fix to Barlib, nothing more. EMG
Cayetano's BarLib2
Jose, Try this link <!-- m --><a class="postlink" href="http://www.esnips.com/doc/1e78c161-35ce-4cb8-acf0-1c918b403853/BarLib">http://www.esnips.com/doc/1e78c161-35ce ... 853/BarLib</a><!-- m --> . I'm not sure whether this is the one you wanted or not
Ccmo puedo mostrar solo el body de email en testpop3
Estimado Colegas Como puedo mostrar el body del email solamente en testpop3 y grabarlo en un txt si alguien me puede orientar desde ya mucha gracias Fabian
Celda editable en Browse
Estimados; En un browse, en el que se puede editar una celda para introducir un valor numérico quisiera: Que detecte el valor pulsado tanto si es desde el teclado horizontal (ya lo probé y funciona), como desde el teclado numérico (cual es codigo inkey) La otra es: como muevo el cursor a la derecha del valor ingresado, esperando por un próximo ingreso muchas gracias Saludos
Celda editable en Browse
Mario... Tienes varias opciones Puedes usar FastEdit, esto hara que el "cursor" se dirija hasta la proxima celda editable, en cambio si no quieres usar el FastEdit puedes usar en en el bOnPostEdit, GoRight(), tienes otra opcion es una modificacion a la clase que te permite ir a la direccion que quieras despues de la edicion, usando fastedit o no, revisa este post <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=75203#p75203">viewtopic.php?p=75203#p75203</a><!-- l -->
Celda editable en Browse
muchas gracias Daniel; me olvidé de un detalle muuuuy importante uso FWH DIC2007 y wBrowse, si bien es el de Hernán, uso el método lEditcol <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Celda transparente
Hola amigos. En xBrowse tenemos la data oBrw:lTransparent := .t., que pinta todo el browse transparente, sobre el dialogo o ventana contenedora. Pregunta: Es posible, basado en una condicion, pintar transparentes determinadas celdas? Me explico: Tenemos un dialog que contiene una imagen como background. Sobre esta imagen tenemos un xBrowse, con varias lineas y columnas. Algunas celdas contienen valores, otras no. Precisamente, las celdas que no contienen valores son las que se desea presentar transparentes. Es decir, hacer transparente el fondo de estas celdas y que se vea como fondo la imagen-background de la ventana o dialogo contenedor. Es posible? Gracias.
Celda transparente
Lo siguiente no hace nada: [code=fw:1cxnehjd]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><span style="color: #00C800;">local</span> n1, n, uVal<br /><br />&nbsp; <span style="color: #00C800;">For</span> n1 := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw2:<span style="color: #000000;">nLen</span><br />&nbsp; &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>oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; uVal := oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span>uVal<span style="color: #000000;">&#41;</span> .or. uVal = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lColTransparent</span> := .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Next</span> <br />&nbsp; <span style="color: #00C800;">Next</span><br /><br />&nbsp; oBrw2:<span style="color: #0000ff;">Refresh</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 />&nbsp;</div>[/code:1cxnehjd]
Celda transparente
Otro intento sin resultados deseados: [code=fw:34zdun2g]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> n1, n<br /><br />  <span style="color: #00C800;">For</span> n1 := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw2:<span style="color: #000000;">nLen</span><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>oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />        oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lColTransparent</span> := TranspDeCelda<span style="color: #000000;">&#40;</span> oBrw2, n <span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Next</span> <br />&nbsp; &nbsp; &nbsp;oBrw2:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> TranspDeCelda<span style="color: #000000;">&#40;</span> oBrw, n <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> uDato := oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>, lTransparent := .f.<br /><br />   <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span>uDato<span style="color: #000000;">&#41;</span> .or. uDato = <span style="color: #00C800;">nil</span><br />      lTransparent := .t.<br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> lTransparent<br /> </div>[/code:34zdun2g]
Celda transparente
Parece que encontré la solución: [code=fw:s26pnzls]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//Celdas sin valor serán transparentes. Para ello, oBrw2:lTransparent := .t., y ClrBck de celda debe ser NIL</span><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> n<br /><br />&nbsp; <span style="color: #00C800;">For</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw2:<span style="color: #000000;">nLen</span><br />&nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw2:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o|o:<span style="color: #000000;">lColTransparent</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Empty<span style="color: #000000;">&#40;</span>o:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span>,.t.,.f.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;oBrw2:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">Next</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:s26pnzls] Saludos.
Celda transparente
[quote="FranciscoA":11glm4fy]Parece que encontré la solución: [code=fw:11glm4fy]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//Celdas sin valor serán transparentes. Para ello, oBrw2:lTransparent := .t., y ClrBck de celda debe ser NIL</span><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> n<br /><br />  <span style="color: #00C800;">For</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw2:<span style="color: #000000;">nLen</span><br />     AEval<span style="color: #000000;">&#40;</span> oBrw2:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o|o:<span style="color: #000000;">lColTransparent</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Empty<span style="color: #000000;">&#40;</span>o:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span>,.t.,.f.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <br />     oBrw2:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">Next</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:11glm4fy] Saludos.[/quote:11glm4fy] oCol:lTransparent applies to the entire column, not to individual cells
Celda transparente
[quote:27eeafvq]oCol:lTransparent applies to the entire column, not to individual cells[/quote:27eeafvq] Nages. I know it. After so much testing I reached that solution, and it's working for the litle proyect I am making. Despues de muchas pruebas salió esa solución y está funcionando para el pequeño proyecto, hasta el momento. [url:27eeafvq]https&#58;//www&#46;4shared&#46;com/photo/7kj6nn-mea/ruleta&#46;html[/url:27eeafvq]
Celda transparente
He notado que si en la ultima fila hay celda sin valor, pone transparente toda esa columna.
Celda transparente
Aqui dejo el codigo, por si alguien quiere mejorarlo. [code=fw:13igl5r7]<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> aM, aR, cClr := <span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">static</span> oBrw1, oBrw2<br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont1<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrush, cBrush := <span style="color: #ff0000;">"C:<span style="color: #000000;">\F</span>WH1204<span style="color: #000000;">\B</span>ITMAPS<span style="color: #000000;">\B</span>ACKGRND<span style="color: #000000;">\B</span>EACH.BMP"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nWd := <span style="color: #000000;">240</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nHt := <span style="color: #000000;">600</span> &nbsp;<br /><br />&nbsp; &nbsp;CreaMatrices<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"CONSOLAS"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span> BOLD ITALIC<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWd,nHt <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE cBrush RESIZE<br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;PintaBrowse<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span> &nbsp;<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; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> oFont1<br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br />&nbsp; &nbsp; <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CreaMatrices<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<br /><span style="color: #00C800;">local</span> n, aNms, aClr &nbsp; &nbsp; <br /><br />&nbsp; &nbsp;aNms := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'00'</span>, <span style="color: #ff0000;">'27'</span>, <span style="color: #ff0000;">'10'</span>, <span style="color: #ff0000;">'25'</span>, <span style="color: #ff0000;">'29'</span>, <span style="color: #ff0000;">'12'</span>, <span style="color: #ff0000;">'8'</span>, <span style="color: #ff0000;">'19'</span>, <span style="color: #ff0000;">'31'</span>, <span style="color: #ff0000;">'18'</span>, <span style="color: #ff0000;">'6'</span>, <span style="color: #ff0000;">'21'</span>, <span style="color: #ff0000;">'33'</span>, <span style="color: #ff0000;">'16'</span>, <span style="color: #ff0000;">'4'</span>, <span style="color: #ff0000;">'23'</span>, <span style="color: #ff0000;">'35'</span>, <span style="color: #ff0000;">'14'</span>, <span style="color: #ff0000;">'2'</span>, &nbsp;<span style="color: #ff0000;">'0'</span>, <span style="color: #ff0000;">'28'</span>, <span style="color: #ff0000;">'9'</span>, <span style="color: #ff0000;">'26'</span>, <span style="color: #ff0000;">'30'</span>, <span style="color: #ff0000;">'11'</span>, <span style="color: #ff0000;">'7'</span>, <span style="color: #ff0000;">'20'</span>, <span style="color: #ff0000;">'32'</span>, <span style="color: #ff0000;">'17'</span>, <span style="color: #ff0000;">'5'</span>, <span style="color: #ff0000;">'22'</span>, <span style="color: #ff0000;">'34'</span>, <span style="color: #ff0000;">'15'</span>, <span style="color: #ff0000;">'3'</span>, <span style="color: #ff0000;">'24'</span>, <span style="color: #ff0000;">'36'</span>, <span style="color: #ff0000;">'13'</span>, <span style="color: #ff0000;">'1'</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aClr := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'V'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp; <span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'V'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; aR := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <br />&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>aNms<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> aR, <span style="color: #000000;">&#123;</span>,,,<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Posicion</span><br />&nbsp; &nbsp; &nbsp; aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>aNms<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>=<span style="color: #000000;">1</span>, aNms<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>+<span style="color: #ff0000;">" "</span>, aNms<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Numero (debe ser long 2 char)</span><br />&nbsp; &nbsp; &nbsp; aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>upper<span style="color: #000000;">&#40;</span>aClr<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> =<span style="color: #ff0000;">"V"</span>,<span style="color: #ff0000;">"VERDE"</span> ,; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Color</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>upper<span style="color: #000000;">&#40;</span>aClr<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> =<span style="color: #ff0000;">"R"</span>,<span style="color: #ff0000;">"ROJO"</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>upper<span style="color: #000000;">&#40;</span>aClr<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> =<span style="color: #ff0000;">"N"</span>,<span style="color: #ff0000;">"NEGRO"</span>,<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">Next</span><br /><br />&nbsp; aM := Array<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span><br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'0 '</span>, <span style="color: #ff0000;">'00'</span>, <span style="color: #ff0000;">' &nbsp;'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'2 '</span>, <span style="color: #ff0000;">'3 '</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'5 '</span>, <span style="color: #ff0000;">'6 '</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'7 '</span>, <span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">' &nbsp;'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'10'</span>, <span style="color: #ff0000;">'11'</span>, <span style="color: #ff0000;">'12'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">' &nbsp;'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'16'</span>, <span style="color: #ff0000;">'17'</span>, <span style="color: #ff0000;">'18'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'20'</span>, <span style="color: #ff0000;">'21'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'23'</span>, <span style="color: #ff0000;">'24'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'25'</span>, <span style="color: #ff0000;">'26'</span>, <span style="color: #ff0000;">'27'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'28'</span>, <span style="color: #ff0000;">'29'</span>, <span style="color: #ff0000;">'30'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'31'</span>, <span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'33'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'34'</span>, <span style="color: #ff0000;">'35'</span>, <span style="color: #ff0000;">'36'</span><span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> PintaBrowse<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> n, cCol, oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-24</span> BOLD ITALIC<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">XBROWSE</span> oBrw2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-1</span>,<span style="color: #000000;">-1</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;DATASOURCE aM ; <br />&nbsp; &nbsp;COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> &nbsp;HEADERS <span style="color: #ff0000;">"Col1"</span>,<span style="color: #ff0000;">"Col2"</span>,<span style="color: #ff0000;">"Col3"</span> ;<br />&nbsp; &nbsp;CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> EACH cCol IN <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"COL1"</span>, <span style="color: #ff0000;">"COL2"</span>, <span style="color: #ff0000;">"COL3"</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oBrw2:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> cCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#40;</span>oBrw2:<span style="color: #000000;">nWidth</span>/<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><br />&nbsp; &nbsp; &nbsp; &nbsp;END<br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw2<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowHeight</span> &nbsp; &nbsp; := <span style="color: #000000;">42</span> <br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHeader</span> &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lFooter</span> &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHScroll</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lVScroll</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lRecordSelector</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nDataStrAligns</span> := AL_CENTER<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFont<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lTransparent</span> &nbsp;:= &nbsp;.t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;ColorFondoCelda<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> oFont<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> ColorFondoCelda<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><span style="color: #00C800;">local</span> 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>oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrStd</span> := ColorDeCelda<span style="color: #000000;">&#40;</span> oBrw2, n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> ColorDeCelda<span style="color: #000000;">&#40;</span> oBrw, n <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span>|| ElijeColor<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> ElijeColor<span style="color: #000000;">&#40;</span> uDato <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n, nClrBck, nClrTxt := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cClr:=<span style="color: #ff0000;">""</span><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>aR<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> == uDato<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cClr := aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span><br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cClr == <span style="color: #ff0000;">"VERDE"</span><br />&nbsp; &nbsp; &nbsp; nClrBck := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;elseif cClr == <span style="color: #ff0000;">"ROJO"</span><br />&nbsp; &nbsp; &nbsp; nClrBck := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">225</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;elseif cClr == <span style="color: #ff0000;">"NEGRO"</span><br />&nbsp; &nbsp; &nbsp; nClrBck := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; nClrBck := <span style="color: #00C800;">NIL</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> nClrTxt, nClrBck <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//Celdas sin valor serán transparentes. Para ello, oBrw2:lTransparent := .t., y ClrBck de celda debe ser NIL</span><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> n<br /><br />&nbsp; <span style="color: #00C800;">For</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw2:<span style="color: #000000;">nLen</span><br />&nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw2:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o|o:<span style="color: #000000;">lColTransparent</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Empty<span style="color: #000000;">&#40;</span>o:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span>,.t.,.f.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;oBrw2:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <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:13igl5r7]
Celda transparente
Resultado: [url=https&#58;//imgbb&#46;com/:1dhnb7xu][img:1dhnb7xu]https&#58;//i&#46;ibb&#46;co/cC2vBzD/mesa&#46;png[/img:1dhnb7xu][/url:1dhnb7xu]
Celda transparente
Proyecto finalizado: [url=https&#58;//ibb&#46;co/V96N9wh:3h6aa05n][img:3h6aa05n]https&#58;//i&#46;ibb&#46;co/r09t0dL/ruleta&#46;png[/img:3h6aa05n][/url:3h6aa05n]
Celda transparente
Hola Francisco. Grande Maestro, te pasaste? Te Felicito, se ve súper. Muchos Saludos Antonio.
Celda transparente
Francisco, muy bien, ya sabes que este tipo de "tips" de efectos estéticos me gustan mucho. Tu implementación es muy muy buena ( "nivelazo" ). Como siempre he dicho "Imaginación al poder" Enhorabuena
Celda transparente
Hola Cristóbal. Mi estimado Maestro, gracias por sus comentarios.
Celda transparente
Hola Antonio. Gracias por tu comentario. Estamos a la orden. Saludos.
Celda transparente
[quote="FranciscoA":1yzso767]He notado que si en la ultima fila hay celda sin valor, pone transparente toda esa columna.[/quote:1yzso767] Aqui está la solucion: [code=fw:1yzso767]<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: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont1, oBrw2, n, cCol, oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrush, cBrush := <span style="color: #ff0000;">"C:<span style="color: #000000;">\F</span>WH1204<span style="color: #000000;">\B</span>ITMAPS<span style="color: #000000;">\B</span>ACKGRND<span style="color: #000000;">\B</span>EACH.BMP"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nWd := <span style="color: #000000;">240</span>, nHt := <span style="color: #000000;">600</span> &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aArr := CreaMatrices<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, aR := aArr<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, aM := aArr<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-24</span> BOLD ITALIC<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"CONSOLAS"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span> BOLD ITALIC<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWd,nHt <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE cBrush RESIZE<br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">XBROWSE</span> oBrw2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-1</span>,<span style="color: #000000;">-1</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;DATASOURCE aM ; <br />&nbsp; &nbsp;COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> &nbsp;HEADERS <span style="color: #ff0000;">"Col1"</span>,<span style="color: #ff0000;">"Col2"</span>,<span style="color: #ff0000;">"Col3"</span> ;<br />&nbsp; &nbsp;CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> EACH cCol IN <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"COL1"</span>, <span style="color: #ff0000;">"COL2"</span>, <span style="color: #ff0000;">"COL3"</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oBrw2:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> cCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#40;</span>oBrw2:<span style="color: #000000;">nWidth</span>/<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><br />&nbsp; &nbsp; &nbsp; &nbsp;END<br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw2<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowHeight</span> &nbsp; &nbsp; := <span style="color: #000000;">42</span> <br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHeader</span> &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lFooter</span> &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHScroll</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lVScroll</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lRecordSelector</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nDataStrAligns</span> := AL_CENTER<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFont<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lTransparent</span> &nbsp;:= &nbsp;.t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;ColorFondoCelda<span style="color: #000000;">&#40;</span>oBrw2, aR<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> oFont1, oFont<br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br />&nbsp; &nbsp; <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CreaMatrices<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<br /><span style="color: #00C800;">local</span> n, aNms, aClr, aR, aM &nbsp; &nbsp; <br /><br />&nbsp; &nbsp;aNms := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'00'</span>, <span style="color: #ff0000;">'27'</span>, <span style="color: #ff0000;">'10'</span>, <span style="color: #ff0000;">'25'</span>, <span style="color: #ff0000;">'29'</span>, <span style="color: #ff0000;">'12'</span>, <span style="color: #ff0000;">'8'</span>, <span style="color: #ff0000;">'19'</span>, <span style="color: #ff0000;">'31'</span>, <span style="color: #ff0000;">'18'</span>, <span style="color: #ff0000;">'6'</span>, <span style="color: #ff0000;">'21'</span>, <span style="color: #ff0000;">'33'</span>, <span style="color: #ff0000;">'16'</span>, <span style="color: #ff0000;">'4'</span>, <span style="color: #ff0000;">'23'</span>, <span style="color: #ff0000;">'35'</span>, <span style="color: #ff0000;">'14'</span>, <span style="color: #ff0000;">'2'</span>, &nbsp;<span style="color: #ff0000;">'0'</span>, <span style="color: #ff0000;">'28'</span>, <span style="color: #ff0000;">'9'</span>, <span style="color: #ff0000;">'26'</span>, <span style="color: #ff0000;">'30'</span>, <span style="color: #ff0000;">'11'</span>, <span style="color: #ff0000;">'7'</span>, <span style="color: #ff0000;">'20'</span>, <span style="color: #ff0000;">'32'</span>, <span style="color: #ff0000;">'17'</span>, <span style="color: #ff0000;">'5'</span>, <span style="color: #ff0000;">'22'</span>, <span style="color: #ff0000;">'34'</span>, <span style="color: #ff0000;">'15'</span>, <span style="color: #ff0000;">'3'</span>, <span style="color: #ff0000;">'24'</span>, <span style="color: #ff0000;">'36'</span>, <span style="color: #ff0000;">'13'</span>, <span style="color: #ff0000;">'1'</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;aClr := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'V'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp; <span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'V'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, <span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, <span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span>, &nbsp;<span style="color: #ff0000;">'N'</span>, &nbsp;<span style="color: #ff0000;">'R'</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; aR := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <br />&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>aNms<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aadd<span style="color: #000000;">&#40;</span> aR, <span style="color: #000000;">&#123;</span>,,,<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Posicion</span><br />&nbsp; &nbsp; &nbsp; aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>aNms<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>=<span style="color: #000000;">1</span>, aNms<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>+<span style="color: #ff0000;">" "</span>, aNms<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Numero (debe ser long 2 char)</span><br />&nbsp; &nbsp; &nbsp; aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>upper<span style="color: #000000;">&#40;</span>aClr<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> =<span style="color: #ff0000;">"V"</span>,<span style="color: #ff0000;">"VERDE"</span> ,; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Color</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>upper<span style="color: #000000;">&#40;</span>aClr<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> =<span style="color: #ff0000;">"R"</span>,<span style="color: #ff0000;">"ROJO"</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>upper<span style="color: #000000;">&#40;</span>aClr<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> =<span style="color: #ff0000;">"N"</span>,<span style="color: #ff0000;">"NEGRO"</span>,<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">Next</span><br /><br />&nbsp; aM := Array<span style="color: #000000;">&#40;</span><span style="color: #000000;">14</span><span style="color: #000000;">&#41;</span><br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Rojo'</span>, <span style="color: #ff0000;">'Negro'</span>, <span style="color: #ff0000;">'Verde'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'0 '</span>, <span style="color: #ff0000;">'00'</span>, <span style="color: #ff0000;">' &nbsp;'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'2 '</span>, <span style="color: #ff0000;">'3 '</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'5 '</span>, <span style="color: #ff0000;">'6 '</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'7 '</span>, <span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">' &nbsp;'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'10'</span>, <span style="color: #ff0000;">'11'</span>, <span style="color: #ff0000;">'12'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">' &nbsp;'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'16'</span>, <span style="color: #ff0000;">'17'</span>, <span style="color: #ff0000;">'18'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'20'</span>, <span style="color: #ff0000;">'21'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'23'</span>, <span style="color: #ff0000;">'24'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'25'</span>, <span style="color: #ff0000;">'26'</span>, <span style="color: #ff0000;">'27'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'28'</span>, <span style="color: #ff0000;">'29'</span>, <span style="color: #ff0000;">'30'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'31'</span>, <span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'33'</span><span style="color: #000000;">&#125;</span> <br />&nbsp; aM<span style="color: #000000;">&#91;</span><span style="color: #000000;">14</span><span style="color: #000000;">&#93;</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">' &nbsp;'</span>, <span style="color: #ff0000;">'36'</span><span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">&#123;</span> aR, aM <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> ColorFondoCelda<span style="color: #000000;">&#40;</span>oBrw2, aR<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><span style="color: #00C800;">local</span> 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>oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrStd</span> := ColorDeCelda<span style="color: #000000;">&#40;</span> oBrw2, n, aR <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> ColorDeCelda<span style="color: #000000;">&#40;</span> oBrw, n, aR <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span>|| ElijeColor<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, aR <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> ElijeColor<span style="color: #000000;">&#40;</span> uDato, aR <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n, nClrBck, nClrTxt := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, cClr<br /><br />&nbsp; &nbsp;cClr:=<span style="color: #ff0000;">""</span><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>aR<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> == uDato<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cClr := aR<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span><br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cClr == <span style="color: #ff0000;">"VERDE"</span> .or. uDato == <span style="color: #ff0000;">"Verde"</span> &nbsp;<span style="color: #B900B9;">//Si dato es Verde,Rojo,Negro, es apuesta por color.</span><br />&nbsp; &nbsp; &nbsp; nClrBck := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;elseif cClr == <span style="color: #ff0000;">"ROJO"</span> .or. uDato == <span style="color: #ff0000;">"Rojo"</span><br />&nbsp; &nbsp; &nbsp; nClrBck := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">225</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;elseif cClr == <span style="color: #ff0000;">"NEGRO"</span> .or. uDato == <span style="color: #ff0000;">"Negro"</span><br />&nbsp; &nbsp; &nbsp; nClrBck := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; nClrBck := <span style="color: #00C800;">NIL</span> &nbsp;<span style="color: #B900B9;">//GetSysColor( 5 )</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> nClrTxt, nClrBck <span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #B900B9;">//Celdas sin valor serán transparentes. Para ello, oBrw2:lTransparent := .t., y ClrBck de celda debe ser NIL</span><br /><span style="color: #B900B9;">//-----------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> CeldaTransparente<span style="color: #000000;">&#40;</span>oBrw2<span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">local</span> 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>oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lColTransparent</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Empty<span style="color: #000000;">&#40;</span>oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span>,.t.,.f.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1yzso767] Saludos.
Celdas con dos Colores en Tsbrowse es posible ?
Estimado colegasEstoy desarrollando un planning de hotel , es posible ponerle2 colores a una celda GraciasFabian
Celdas con dos Colores en Tsbrowse es posible ?
Fabian,Te refieres a usar un degradado de colores en una celda ?O a que una linea sea de un color y la siguiente de otro ?
Celdas con dos Colores en Tsbrowse es posible ?
AntonioLo que quiero hacer es que la misma celda tenga por ejemplo mitad color rojo mitad color verdeGracias Fabian
Celdas con dos Colores en Tsbrowse es posible ?
[quote="Databaselab2002":74wfkw4o]Lo que quiero hacer es que la misma celda tenga por ejemplo mitad color rojo mitad color verde[/quote:74wfkw4o]Hola Fabián:Cual mitad: Superior/Inferior, Izquierda/Derecha, Recta/Diagonal?Podrías ilustrar aproximadamente tu idea?Saludos.Manuel Mercado
Celdas con dos Colores en Tsbrowse es posible ?
Estimado ManuelComo comente anteriormente , he desarrollado un planning de ocupacion hotelera ,lo que quiero realizar es lo siguiente si un pasajero termina su estadia el 13/9 a las 10hs y a las 11hsingresa otro pasajero tener dos colores en una misma celda ej: 13/9 -------------------------------- color rojo l color verde --------------------------------desde ya muchas graciasFabian
Celdas en blanco con xbrowse
Buenas tardes, Tengo un Browse con varias columnas y quiero que si el valor de la celda es cero que se muestre la celda en blanco. ¿hay alguna forma más elegante de hacer esto? oBrw1:aCols[1]:bStrData := { || if( !empty(oBrw1:aArrayData[oBrw1:nArrayAt,1]),str(oBrw1:aArrayData[oBrw1:nArrayAt,1])," ") } oBrw1:aCols[2]:bStrData := { || if( !empty(oBrw1:aArrayData[oBrw1:nArrayAt,2]),str(oBrw1:aArrayData[oBrw1:nArrayAt,2])," ") } oBrw1:aCols[3]:bStrData := { || if( !empty(oBrw1:aArrayData[oBrw1:nArrayAt,3]),str(oBrw1:aArrayData[oBrw1:nArrayAt,3])," ") } Como son varias columnas, me gustaría meterlas en un bucle, pero esto no funciona: for i=1 to 15 oBrw1:aCols[i]:bStrData := { || if( !empty(oBrw1:aArrayData[oBrw1:nArrayAt,i]),str(oBrw1:aArrayData[oBrw1:nArrayAt,i])," ") } next i No funciona porque en ejecución toma el valor actual de i. Igual que nArrayAt designa la fila de la matriz, ¿cual es el equivalente para designar la columna? Muchas gracias. Alvaro
Celdas en blanco con xbrowse
Hola Alvaro... Intentalo de esta forma oBrw1:aCols[i]:bStrData := GenBloque( oBrw, i ) Function GenBloque( oBrw, i ) return { || if( !empty(oBrw1:aRow[ i ]), str(oBrw1:aRow[ i ])," ") }
Celdas en blanco con xbrowse
Muchas gracias. Alvaro
Cell font
Hi, There is an xBrowse from one column. I need the cells in this column to have a different font. How to do it ?
Cell font
Natter: Look [b:4y7cn6ie]FWH\Samples\xbfntclr.prg[/b:4y7cn6ie]
Cell font
Thanks Cgallegoa, but that's not exactly what I need. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> I need one cell to have one font and the second one another.
Cell font
Creo que es lo que necesitas [url:trurifdb]https&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=37872&p=226349&hilit=leandro+font+xbrowse&sid=28a1ec26ef7233a68ade4c76928fdab1&sid=7f0fd57a391b1cc18625b3c8cb3b4b7e#p226349[/url:trurifdb]
Cell font
You can assign a codeblock to oCol:oDataFont
Cell font
Leandro, Rao, thank you, this is what I need !
Cells format in Excel 2013 Mr Rao ??
Greetings ... I have a problem creating an Excel file with Office 2013, I have no problem with previous versions, in all previous cases put the following line: oSheet: Cells (NFIL, 6): NumberFormat: = "#, ## 0.00" And I format the cell with "," as thousand separator, with "." as decimal point and 2 decimal digits, but in Office 2013 I do not respect that format and I placed the numbers "without" thousands separator and 3, 4-5 decimal ... Anyone have any idea how to fix it, thank you very much
Cells format in Excel 2013 Mr Rao ??
Please try [code=fw:3abptryq]<div class="fw" id="{CB}" style="font-family: monospace;">oSheet: <span style="color: #000000;">Cells</span> <span style="color: #000000;">&#40;</span>NFIL, <span style="color: #000000;">6</span><span style="color: #000000;">&#41;</span>: <span style="color: #000000;">NumberFormat</span>: &nbsp; &nbsp; &nbsp;= <span style="color: #ff0000;">"#, ## 0.00"</span> <br />oSheet: <span style="color: #000000;">Cells</span> <span style="color: #000000;">&#40;</span>NFIL, <span style="color: #000000;">6</span><span style="color: #000000;">&#41;</span>: <span style="color: #000000;">NumberFormatLocal</span>: = <span style="color: #ff0000;">"#, ## 0.00"</span></div>[/code:3abptryq] I don't think it is due to the MS Office version. May be the the locale settings on your PC and the thousands separator and the decimal separator. I haven't tested it personally. Regards [b:3abptryq]Anser[/b:3abptryq]
Cells format in Excel 2013 Mr Rao ??
Thank you I check the configuration of the PC, but proves again with your indication. Thank you very much
Cells format in Excel 2013 Mr Rao ??
When I have a question like this. I record a macro, set the format I want, stop macro recording, then edit the macro and check out what Excel thinks it should be.
Cells format in Excel 2013 Mr Rao ??
Buena idea Gale, voy a probar, gracias
Cells on xBrowse
Dear friends of the forum how to display a message or trigger an action to select a cell in XBROWSE with just one click, no double click or right click <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> I have developed a pattern of weekly visits and each visit is, clearly be seen. And I have sought ways to do this and I could not, no one has done something like that I made a thread. FWH 9.06, xHarbour regards
Cells on xBrowse
Have you tried bLClicked? James
Cells on xBrowse
James, Brief precise and concise! To know which row guided me to the current record, but as I find out which column was clicked? With a right click have the bRClickData in each column. A Greeting from Honduras <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Cells on xBrowse
Try: oBrw:bLClicked:= {| nRow, nCol, nFlags| msgInfo( nCol ) } Regards, James
Cells on xBrowse
[code=fw:r5ocz20x]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bLClicked</span>:= <span style="color: #000000;">&#123;</span>| nRow, nCol, nFlags| MyFunc<span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:r5ocz20x] and [code=fw:r5ocz20x]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> MyFunc<span style="color: #000000;">&#40;</span> nColPix <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCol, oCol<br /><br />&nbsp; &nbsp;nCol &nbsp;:= oBrw:<span style="color: #000000;">MouseColPos</span><span style="color: #000000;">&#40;</span> nColPix <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// nCol is the number of displayed column</span><br />&nbsp; &nbsp;oCol &nbsp;:= oBrw:<span style="color: #000000;">ColAtPos</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Column object on which clicked</span><br /><br /><br />&nbsp;</div>[/code:r5ocz20x]
Cells on xBrowse
Thanks friends the nCol is the current position based on the current display columns. There will have to make a calculation that pretended to jump, to find the field in the table to see. Thanks for your time, it's bLClicked has been very helpful A Greeting from Honduras <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Cells on xBrowse
Try [code=fw:1afi40jv]<div class="fw" id="{CB}" style="font-family: monospace;">nCol := oBrw:<span style="color: #000000;">ColAtPos</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nColSel</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span></div>[/code:1afi40jv] Regards, Marc
Cells on xBrowse
what we need to know is on which column of the browse the user clicked. method MouseColPos( nColPixelClicked ) --> nCol clicked oBrw:ColAtPos( oBrw:MouseColPos( nColPixelClicked ) ) --> oCol clicked
Center bitmap
Hello, I have a blank area between menu and message and I need to place a bitmap (logo) in this area. Can someone send me code to place a bitmap centerd in maximized window based on length and width of bitmap and length and width of display? Thank you,
Center bitmap
Darrell, Try the example below. James [code:w2bdfrgv]> #INCLUDE "C&#58;\FW192\INCLUDE\FIVEWIN&#46;CH" > * > STATIC oWnd,nWndWid,nWndHgt > * > FUNCTION Main&#40;&#41; > DEFINE WINDOW oWnd; > FROM 1,2 TO MaxRow&#40;&#41;-3,MaxCol&#40;&#41;-2; > TITLE "BMP Logo Centering" > ACTIVATE WINDOW oWnd ON INIT &#40;Calc_Wnd&#40;&#41;,Disp_Bmp&#40;&#41;&#41; > RETURN nil > * > STATIC FUNCTION Disp_Bmp&#40;&#41; > LOCAL oBmp,nRow,nCol,nBmpWid,nBmpHgt,cFile&#58;="TEST&#46;BMP" > IF File&#40;cFile&#41; > DEFINE BITMAP oBmp FILE cFile OF oWnd > nRow = nWndHgt/2 - oBmp&#58;nHeight/2 > nCol = nWndWid/2 - oBmp&#58;nWidth/2 > oBmp&#58;End&#40;&#41; > @ nRow,nCol BITMAP oBmp FILE cFile PIXEL NOBORDER OF oWnd > ENDIF > RETURN nil > * > STATIC FUNCTION Calc_Wnd&#40;&#41; > LOCAL x1,y1,x2,y2,aWind&#58;=oWnd&#58;GetRect&#40;&#41; > x1 = aWind&#91;1&#93; > y1 = aWind&#91;2&#93; > x2 = aWind&#91;3&#93; > y2 = aWind&#91;4&#93; > nWndHgt = x2 - x1 > nWndWid = y2 - y1 > RETURN nil > ************** > > Hope this helps&#46; > > Gary Beam > Extensions Software Corp&#46; > http&#58;//www&#46;ext&#46;com[/code:w2bdfrgv]
Center bitmap
Darrell, I found some old code where I did it like this. This code will redraw the bitmap centered whenever the window is resized. James [code:2hffkrsz] ACTIVATE WINDOW ownd maximized ; on paint &#40;PalBmpDraw&#40; oWnd&#58;oWndClient&#58;hDC, &#40;oWnd&#58;nHeight/2-oBmp&#58;nHeight/2&#41;-50,&#40;oWnd&#58;nWidth/2-oBmp&#58;nWidth/2&#41;, oBmp&#58;hBitmap, oBmp&#58;hPalette &#41;[/code:2hffkrsz]
Center bitmap
Hi James, Thank you very much!
Center caption on ribbon
The code is working but on taskbar only 3 points are shown. Does someone have a better solution? Best regards, Otto [code=fw:2is8uet8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> onresize<span style="color: #000000;">&#40;</span>oWnd<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> nSpaceWidth  := oWnd:<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" "</span>, <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cCaption:= <span style="color: #ff0000;">"RibbonBar Test "</span> + FWVERSION<br /><span style="color: #00C800;">local</span> nSpaces := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">local</span> nSpaceBTNs := <span style="color: #000000;">140</span><br /><br />nSpaces :=  <span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nWidth</span> - nSpaceBTNs - oWnd:<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span>cCaption, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span>  / nSpaceWidth<br />oWnd:<span style="color: #000000;">cTitle</span><span style="color: #000000;">&#40;</span> space<span style="color: #000000;">&#40;</span> nSpaces <span style="color: #000000;">&#41;</span> + cCaption <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2is8uet8] [img:2is8uet8]http&#58;//www&#46;atzwanger-software&#46;com/fw/taskbar&#46;jpg[/img:2is8uet8] [img:2is8uet8]http&#58;//www&#46;atzwanger-software&#46;com/fw/hinten&#46;jpg[/img:2is8uet8]
Center caption on ribbon
Otto, Have you tried to use tabs (Chr( 9 )) instead of spaces (Chr(32)) ?
Center caption on ribbon
Hello Antonio, TAB does not work on the caption. If I insert TAB the caption remains on the left side. Best regards, Otto
Center caption on ribbon
Otto, Have you tried using Chr( 255 ) ?
Center caption on ribbon
Hello Antonio, chr(255) does not work. Best regards, Otto [img:1gryhcwl]http&#58;//www&#46;atzwanger-software&#46;com/fw/center&#46;jpg[/img:1gryhcwl]
Center say vertically
Perfect. Thank you for your help
Center say vertically
Hello friends. @ 13,95 SAY oSay VAR cMESSAGE SIZE 250,46 OF oDlg oSay:nStyle := nOr( SS_CENTERIMAGE ) Not work ? Thanks
Center say vertically
This works [code=fw:212jk9pu]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; oSay:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">&#40;</span> oSay:<span style="color: #000000;">nStyle</span>, SS_CENTERIMAGE &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:212jk9pu]
CenterMsgs()
If on start of the app CenterMsgs() are using, then freezes the programm after call a msgrun() with title!
CenterMsgs()
To center msgRun() in a window/dialog, use this syntax" [code=fw:1948ql6e]<div class="fw" id="{CB}" style="font-family: monospace;">MsgRun<span style="color: #000000;">&#40;</span> cCaption, cTitle, bAction, oWndParent <span style="color: #000000;">&#41;</span></div>[/code:1948ql6e]
CenterMsgs()
[quote="byte-one":1hvzioyv]If on start of the app CenterMsgs() are using, then freezes the programm after call a msgrun() with title![/quote:1hvzioyv] Please make the following correction to fwh\source\function\msgrun.prg: Please locate the following lines in the function msgrun(...) lines 25 to 34 [code=fw:1hvzioyv]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; <span style="color: #00C800;">IF</span> cTitle == <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span>, Len<span style="color: #000000;">&#40;</span> cCaption <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">4</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">4</span>, <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> cCaption <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> cTitle <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">4</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> cTitle ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> DS_MODALFRAME<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp;</div>[/code:1hvzioyv] Please modify the last lines like this: [code=fw:1hvzioyv]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; <span style="color: #00C800;">IF</span> cTitle == <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span>, Len<span style="color: #000000;">&#40;</span> cCaption <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">4</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">4</span>, <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> cCaption <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> cTitle <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">4</span> + <span style="color: #000000;">2</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> cTitle<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp;</div>[/code:1hvzioyv]