topic
stringlengths
1
63
text
stringlengths
1
577k
oGet:bGotFocus Problem
[code:2cdotxor]#include "fivewin.ch" function main() local oDlg, oGet, cName:= "Microsoft ", oGet2, cAddress:=space(22), oBtn define dialog oDlg @ 1,1 get oGet var cName of oDlg // oGet:bGotFocus:= {|| oGet:gohome(), oGet:oGet:clear:=.t., tone(300,1), sysrefresh() } oGet:bGotFocus := { || oGet:PostMsg( WM_KEYDOWN, VK_HOME ) } @ 2,1 get oGet2 var cAddress of oDlg update activate dialog oDlg return nil[/code:2cdotxor] EMG
oGet:bGotFocus Problem
Alternative (maybe better): [code:1hf8r1pc]#include "fivewin.ch" #define EM_SETSEL 177 function main() local oDlg, oGet, cName:= "Microsoft ", oGet2, cAddress:=space(22), oBtn define dialog oDlg @ 1,1 get oGet var cName of oDlg // oGet:bGotFocus:= {|| oGet:gohome(), oGet:oGet:clear:=.t., tone(300,1), sysrefresh() } // oGet:bGotFocus := { || oGet:PostMsg( WM_KEYDOWN, VK_HOME ) } oGet:bGotFocus := { || oGet:PostMsg( EM_SETSEL, Len( RTrim( cName ) ), 0 ) } @ 2,1 get oGet2 var cAddress of oDlg update activate dialog oDlg return nil[/code:1hf8r1pc] EMG
oGet:bGotFocus Problem
Enrico, > oGet:bGotFocus := { || oGet:PostMsg( WM_KEYDOWN, VK_HOME ) } I already tried that. First it only has an effect when tabbing or shift-tabbing into the Get. What it does is select the text from position 1 to the current postion without changing the position. I need it to go to position 1 without selecting any text. Also, your proposed solution does nothing when you click into the GET. James
oGet:bGotFocus Problem
Enrico, >oGet:bGotFocus := { || oGet:PostMsg( EM_SETSEL, Len( RTrim( cName ) ), 0 ) } This one selects all the text from 1 to the current cursor position. Still not what I need. James
oGet:bGotFocus Problem
[quote="James Bott":1zqu7i5z]Enrico, > oGet:bGotFocus := { || oGet:PostMsg( WM_KEYDOWN, VK_HOME ) } I already tried that. First it only has an effect when tabbing or shift-tabbing into the Get. What it does is select the text from position 1 to the current postion without changing the position. I need it to go to position 1 without selecting any text. Also, your proposed solution does nothing when you click into the GET. James[/quote:1zqu7i5z] What it does here is the following: 1. I click on the second GET. 2. Then I click on the first GET (not on the first position). 3. The caret is now on the first position of the first GET. Is it what you need? EMG
oGet:bGotFocus Problem
Enrico, [quote:2gy3w5m5]What it does here is the following: 1. I click on the second GET. 2. Then I click on the first GET (not on the first position). 3. The caret is now on the first position of the first GET. Is it what you need?[/quote:2gy3w5m5] Yes, that is what I need but not what I am getting here. When I do exactly what you describe above, the text is highlighted from position 1 to the place where I clicked, and the cursor is flashing at the place where I clicked. I have double checked the code and it is the same as yours. I am using FWH, May 2006 and the Harbour that came with it. Are you using xHarbour? Maybe that is the difference. James
oGet:bGotFocus Problem
Enrico, I also see exactly the same behavior that I get with Harbour with Clipper. James
oGet:bGotFocus Problem
I'm using latest FWH with latest xHarbour or latest Harbour. EMG
oGet:bGotFocus Problem
Do you want my EXE to test it there? EMG
oGet:bGotFocus Problem
Enrico, Yes, please send me both the PRG and the EXE. Thanks, James
oGet:bGotFocus Problem
After evaluating my situation again, I have figured out that what I really needed was to just clear the GET whenever it was clicked into. I have been able to do this with this code: oGet:bGotFocus := { || oGet:varPut(space(len(oGet:varGet()))), oGet:refresh() } The reason I needed this is that the GET is an incremental search field for a listbox, so you really can't allow editing, typeover, etc. I want the field cleared when entered so the user doesn't have to backspace or deleted all the previous data to start a new search. It works OK now. I am still at a loss as to why Enrico and I are seeing different results with his code. One of use must be linking in something different. Thanks for your time, Enrico. James
oGet:bGotFocus Problem
[quote="James Bott":3j3sdlhy]Enrico, Yes, please send me both the PRG and the EXE. Thanks, James[/quote:3j3sdlhy] Sent. Let me know. EMG
oGet:bGotFocus Problem
[quote="James Bott":21s57c2o]Thanks for your time, Enrico.[/quote:21s57c2o] It's my great pleasure. EMG
oGet:bKeyDown
LOCAL ccodibar14 := Space( 14 ) @ 9, 2 GET aoGt[ 2 ] VAR ccodibar14 PIXEL SIZE 62, 10 ; PICTURE "@! " + Replicate("X",14) OF oDlg aoGt[ 2 ]:bKeyDown := { | nKey | ; IF( nKey == K_ENTER, MsgInfo( "ccodibar14 " + ; ccodibar14, "Valor" ), ) } Con la versión 7.07 - Julio 2007 Hay que darle 2 veces al Intro para que MsgInfo() muestre el contenido, a la primera se queda con el valor anterior. Con la versión 2.8 - September 2006 funciona perfectamente. Gracias
oGet:bKeyDown
aoGt[ 2 ]:bKeyDown := { | nKey | ; IF( nKey == K_ENTER, MsgInfo( "ccodibar14 " + ; ccodibar14, "Valor" ), ) } No funciona, compila y enlaza bien pero al pulsar intro no pasa el valor del GET a la variable ccodibar14. Cambiando bKeyDown por bKeyChar funciona perfectamente con FWH 7.09 recien instalada. aoGt[ 2 ]:bKeyChar := { | nKey | ; IF( nKey == K_ENTER, MsgInfo( "ccodibar14 " + ; ccodibar14, "Valor" ), ) } Ok Si alguien sabe por qué que me lo explique. Gracias Saludos
oGet:lValid no me funciona (Solucionado)
Hola cuates, Quiero usar la validacion de un GET pero sin usar directamente la clausula VALID (Resp2>=Resp1) sino usando el oGet:lValid pero no logro que lo valide. [code=fw:15cwfnhj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> Resp1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> DCoDlg <span style="color: #0000ff;">UPDATE</span> <span style="color: #B900B9;">//Rango minimo</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet2 <span style="color: #0000ff;">VAR</span> Resp2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">30</span> <span style="color: #0000ff;">OF</span> DCoDlg <span style="color: #0000ff;">UPDATE</span> <span style="color: #B900B9;">//Rango maximo</span><br />   oGet2:<span style="color: #000000;">lValid</span><span style="color: #000000;">&#40;</span>Resp2>=Resp1<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//<-No valida esta condicion</span><br />....<br /> </div>[/code:15cwfnhj] Ya lo intente colocandolo en ON INIT, metiendolo en un Bloque de codigo y aun asi no hace la validacion. Alguna idea?
oGet:lValid no me funciona (Solucionado)
Rodolfo... prueba oGet2:lValid = ( Resp2>=Resp1 )
oGet:lValid no me funciona (Solucionado)
Gracias por tu respuesta Daniel, pero al hacerlo asi me aparece el siguiente error: Error description: Warning BASE/1005 Message not found: TGET:_LVALID
oGet:lValid no me funciona (Solucionado)
Rodolfo, Prueba asi: oGet2:bValid := { || Resp2 >= Resp1 } ojo, es bValid no lValid, ya que lValid() es un método que lo que hace es evaluar bValid <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
oGet:lValid no me funciona (Solucionado)
Don Antonio, ese era el detalle, asi si funciono, Gracias.
oGet:lchanged not functioning correct
If i am using oGet:lchanged this is only functioning on first edit. After editing a second,... one the lChanged is always .T. also when i not change the value! It sems ::uOriginalValue are not updated to the new value after editing.
oGet:lchanged not functioning correct
[quote:3hhddu3v]::uOriginalValue are not updated to the new value after editing.[/quote:3hhddu3v] Will not be changed every time the user edits. uOriginalValue is the value at the time the Get is created and will remain the same till the Get ends. lChanged is .T. if the present value is different from the value when the Get is created. This is the intended and desirable behavior.
oGet:lchanged not functioning correct
Rao, but what the sin from knowing the value of the control at create-time? The interest is the change .t. or .f. ! If you make the ::lchanged not PROTECTED we can use it as programmer. Or is there another method to determine a get is edited or not?
oGet:nClrDef in FW27
With fw27 i got a error which is not present in fw2.6 : NclrDef is also present in the documentation Error description: Error BASE/1004 Message not found: TGET:NCLRDEF Stack Calls =========== Called from: => TGET:ERROR(180) Called from: tobject.prg => (b)HBOBJECT:HBOBJECT(106) Called from: => TGET:MSGNOTFOUND(0) Called from: tget.prg => TGET:NCLRDEF(168) Frank
oGet:nClrDef in FW27
Frank, Do you use a modified Class TGet of your own ? nClrDef is no longer used in all FWH PRGs.
oGet:nClrDef in FW27
Where is it documented ? It was present in fw26 , AND ALSO IN THE DOCUMENTATION FROM 2.7 I was so lucky that after the instalation from the new release mine client saw this error while i was there , if not i had maybe to return ( 100 km) Frank
oGet:nClrDef in FW27
Frank, Our apologies if we have not documented it. Just search in all FWH PRGs for such name and you will see it is not there.
oGet:nClrDef in FW27
Antonio, in latest issue of fwh 2.6 i found in tget.prg this: /----------------------------------------------------------------------------// CLASS TGet FROM TControl DATA oGet DATA bMin, bMax DATA nClrDef DATA nPos DATA lReadOnly, lPassword DATA cError AS String DATA hHeap AS NUMERIC INIT 0 // Own heap for @ ..., ... GET DATA cPicture METHOD New( nRow, nCol, bSetGet, oWnd, nWidth, nHeight, cPict, bValid,; nClrFore, nClrBack, oFont, lDesign, oCursor, lPixel,; cMsg, lUpdate, bWhen, lCenter, lRight, bChanged,; lReadOnly, lPassword, lNoBorder, nHelpId,; lSpinner, bUp, bDown, bMin, bMax ) CONSTRUCTOR METHOD Assign() INLINE ::oGet:Assign() regards Eugeniusz
oGet:oGet:Changed in HARBOUR
Hello , Doesn't work Frank
oGet:oGet:Changed in HARBOUR
Look, please <!-- m --><a class="postlink" href="http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=13517">http://www.pctoledo.com.br/forum/viewto ... =4&t=13517</a><!-- m --> <!-- m --><a class="postlink" href="http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=10480">http://www.pctoledo.com.br/forum/viewto ... =4&t=10480</a><!-- m --> Regards,
oGet:setSel in XP
Hi all, The oGet:setSel() (Clipper 52 + FW24) is not highlighting text in XP at least in our system. Is this a known issue?. Any work around? Thanks, jose
oGet:setSel in XP
oGet:selectall()
oGet:setSel in XP
hi easywin, Kindly confirm that the environment is Clipper52, FW24 and Windows XP. Thanks,
oGet:setSel in XP
oGet:bGotfocus:={||oGet:selectall()} Test under Clipper52/FW195/WindowXP
oGet:setSel() not working?
I can't seem to get the setSel() method of the TGet class to work. The following code doesn't show any highlighted text. [code:gia9yzsw]#include "fivewin&#46;ch" function main&#40;&#41; local oDlg, oGet, cString&#58;= "1234567" define dialog oDlg title "Test Get Select" @ 2,2 get oGet var cString of oDlg update activate dialog oDlg; on init &#40;oGet&#58;setSel&#40;2,5&#41;, oGet&#58;refresh&#40;&#41;&#41; return nil[/code:gia9yzsw] It doesn't work with FWH 2.6, May 2005 build/Harbour 43, nor with Clipper. Am I doing something wrong, or maybe setSel() does something else? James
oGet:setSel() not working?
This is a working sample: [code:j3t4oq62]#include "fivewin&#46;ch" function main&#40;&#41; local oDlg, oGet, cString&#58;= "1234567" define dialog oDlg title "Test Get Select" @ 2,2 get oGet var cString of oDlg update oDlg&#58;bStart = &#123; || oGet&#58;SetSel&#40;2,5&#41; &#125; activate dialog oDlg; // on init &#40;oGet&#58;setSel&#40;2,5&#41;, oGet&#58;refresh&#40;&#41;&#41; return nil[/code:j3t4oq62] EMG
oGet:setSel() not working?
Enrico, How odd. When I use the ON INIT it actually preprocesses to this: { |self| oGet:SetSel(2,5) } If I do: oDlg:bInit:= { |self| oGet:SetSel(2,5) } It works just like you said also. But the same code doesn't work when assigned via the ON INIT clause. Strange. I also tried doing it from a button action, but that wouldn't work either. I really need to do it via the GET's ON CHANGE clause. I have tried this: @ 2,2 get oGet var cString of oDlg update on change oGet:setSel(2,5) But that doesn't work either. The GET must be getting refreshed after bChange is called. I guess that is expected. I am trying to build an autoComplete system, so I need to set the selected text after each keystroke. Any ideas? James
oGet:setSel() not working?
Enrico, Whoops. I didn't realize you were using oDlg:bStart NOT oDlg:bInit. bInit does not work, but bStart does. Now I get it. I still need to figure out how to highlight text after each keystroke. I tried bKeydown also and that doesn't work either. James
oGet:setSel() not working?
Try this: [code:1ni1mlne]#include "fivewin&#46;ch" #define EM_SETSEL 177 function main&#40;&#41; local oDlg, oGet, cString&#58;= "1234567" define dialog oDlg title "Test Get Select" @ 2,2 get oGet var cString of oDlg update on change oGet&#58;PostMsg&#40; EM_SETSEL, 2, 5 &#41; activate dialog oDlg return nil[/code:1ni1mlne] EMG
oGet:setSel() not working?
Enrico, Wow, that seems to work! I had already tried: SendMessage( oGet:hWnd, EM_SETSEL, 2, 5 ) but that didn't work. Thanks a lot. James
oGet:setSel() not working?
You're welcome, James! By the way, can we have the honour to see your face? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
oGet:setSel() not working?
James, Sandeep's TDD class does it : Auto-complete from dbf I use it since fw 1.95 U can download it from Patrick Mast's <!-- w --><a class="postlink" href="http://www.fivewin.info">www.fivewin.info</a><!-- w -->
oGet:setSel() not working?
Hoe, Thanks. I'll take a look. I do have mine working also, so it will be interesting to see how he did it too. James
oGraph- how to save into bmp in silent mode
To all, I use xBrowse as a preview for a report. Now I would like to print this report. On each single line I would like to print the corresponding graph. Does someone know how to convert oGraphs in silent mode to bmp. Best regards, Otto [img:38qr2tak]http&#58;//www&#46;atzwanger-software&#46;com/fw/ograph&#46;jpg[/img:38qr2tak]
oGraph- how to save into bmp in silent mode
I assume you are using the TGraph() class. If so, it has a Save2Bmp() method, have you tried that? I haven't tried it but I don't see anything that make it to be not silent. METHOD Save2Bmp( cFile ) CLASS TGraph LOCAL hBmp, hDib DEFAULT cFile := "TGraph.Bmp" hBmp := WndBitmap( Self:hWnd ) hDib := DibFromBitmap( hBmp ) DibWrite( cFile, hDib ) GloBalFree( hDib ) DeleteObject( hBmp ) RETURN ( FILE( cFile ) ) Best regards, Robb
oGraph- how to save into bmp in silent mode
Hello Robb, thank you for your help. The method is working. After a long time I am using again ER. I have to re-learn the handling and find a workflow for me. I have also to look into the paint method of oGraph to reduce the margin. The margin around the graphs consume to much space. Thanks again and best regards, Otto [img:g9t52xc5]http&#58;//www&#46;atzwanger-software&#46;com/fw/ERP1&#46;jpg[/img:g9t52xc5]
oGraph- how to save into bmp in silent mode
This is the source code for calling the Report: [code=fw:1sz1rbve]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> printMonatsvgl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oVRD<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cBmp := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> I := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;*----------------------------------------------------------<br /><br />&nbsp; &nbsp;EASYREPORT oVRD <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">".<span style="color: #000000;">\x</span>VRD<span style="color: #000000;">\E</span>asyReportExample1.vrd"</span> <span style="color: #B900B9;">//;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp; PREVIEW lPreview TO cPrinter &nbsp; PRINTDIALOG IIF( lPreview, .F., .F. )</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> oVRD:<span style="color: #000000;">lDialogCancel</span> = .T.<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">select</span> jahresvgl<br />&nbsp; &nbsp;go top<br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> .not. eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; I:= I + <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; PRINTAREA <span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> oVRD<br />&nbsp; &nbsp; &nbsp; cbmp := <span style="color: #ff0000;">"BMP"</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>I<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">".bmp"</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> I > <span style="color: #000000;">12</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> oVRD:<span style="color: #000000;">nNextRow</span> > oVRD:<span style="color: #000000;">nPageBreak</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PAGEBREAK oVRD<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp;PRINTAREA 2 OF oVRD</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PRINTAREA <span style="color: #000000;">4</span> <span style="color: #0000ff;">OF</span> oVRD;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ITEMIDS &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">110</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">130</span>,<span style="color: #000000;">140</span>,<span style="color: #000000;">150</span>,<span style="color: #000000;">160</span>,<span style="color: #000000;">170</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ITEMVALUES <span style="color: #000000;">&#123;</span> &nbsp;jahresvgl->MONAT &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHR &nbsp; &nbsp; &nbsp;, <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->DIFF_J_1 &nbsp; , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS1 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS2 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS3 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS4 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>, cbmp <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PRINTAREA <span style="color: #000000;">3</span> <span style="color: #0000ff;">OF</span> oVRD;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ITEMIDS &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">110</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">130</span>,<span style="color: #000000;">140</span>,<span style="color: #000000;">150</span>,<span style="color: #000000;">160</span>,<span style="color: #000000;">170</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ITEMVALUES <span style="color: #000000;">&#123;</span> &nbsp;jahresvgl->MONAT &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHR &nbsp; &nbsp; &nbsp;, <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->DIFF_J_1 &nbsp; , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS1 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS2 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS3 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform<span style="color: #000000;">&#40;</span>jahresvgl->JAHRMINUS4 , <span style="color: #ff0000;">"@E 9999,999"</span> <span style="color: #000000;">&#41;</span>, cbmp <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; skip<br />&nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp;oVRD:<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: #0000ff;">select</span> jahresvgl<br />&nbsp; &nbsp;go top<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:1sz1rbve] Best regards, Otto
oGraph- how to save into bmp in silent mode
Hello, please see how nice xBrowse and EasyReport are working. Frist you see a report-live-preview. The user can add and delete subtotals wherever you need in your report. Then you can print the report including the graphs. Best regards, Otto VIDEO [url:31hjag05]http&#58;//www&#46;atzwanger-software&#46;com/fw/Jahrsvergleich&#46;mp4[/url:31hjag05]
oGraph- how to save into bmp in silent mode
Otto In the spanish section of Easyreport forum they're making great progress and building an awesome product.
oGraph- how to save into bmp in silent mode
Otto Good afternoon, thing is, I need to create graphics in silent mode and then print a report on EasyReport , by chance you have an example of how. I'm using the tgraph . At this point I think a dialogue to show the image, but it only works when the dialog is closed. This is the function . Cheers [code=fw:h608fi8l]<div class="fw" id="{CB}" style="font-family: monospace;"><br />*********************************************<br />**esta funcion genera el bmp con los consumos<br />*********************************************<br /><span style="color: #00C800;">FUNCTION</span> creabmp<span style="color: #000000;">&#40;</span>vMan,vLot,vPer<span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">LOCAL</span> oGraph ,aCan:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> ,aDia:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">Local</span> vRuta:=alltrim<span style="color: #000000;">&#40;</span>vMan<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"-"</span>+alltrim<span style="color: #000000;">&#40;</span>vLot<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"-"</span>+alltrim<span style="color: #000000;">&#40;</span>vPer<span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">500</span> <br />   <br /><span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">5</span><br />  AAdd<span style="color: #000000;">&#40;</span>aDia,<span style="color: #ff0000;">"mes"</span>+Str<span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />  AAdd<span style="color: #000000;">&#40;</span>aCan,n<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span>    <br />    <br />@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> GRAPH oGraph <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">200</span> TYPE <span style="color: #000000;">1</span> XVALUES YVALUES 3D XGRID YGRID <span style="color: #B900B9;">//LEGENDS </span><br />    <br />  oGraph:<span style="color: #000000;">cTitX</span>   :=<span style="color: #ff0000;">"Consumo Manzana"</span>+alltrim<span style="color: #000000;">&#40;</span>vMan<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" - Lote:"</span>+alltrim<span style="color: #000000;">&#40;</span>vLot<span style="color: #000000;">&#41;</span><br />  oGraph:<span style="color: #000000;">cTitY</span>   :=<span style="color: #ff0000;">"Meses"</span><br />  oGraph:<span style="color: #000000;">lPopUp</span>  :=.F.<br />  oGraph:<span style="color: #000000;">nClrX</span> = CLR_GREEN <br />  oGraph:<span style="color: #000000;">nClrY</span> = CLR_RED <br />  oGraph:<span style="color: #000000;">AddSerie</span><span style="color: #000000;">&#40;</span>aCan,<span style="color: #ff0000;">""</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">128</span>,<span style="color: #000000;">128</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span>oGraph:<span style="color: #000000;">save2bmp</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"c:<span style="color: #000000;">\c</span>artera<span style="color: #000000;">\p</span>ictures<span style="color: #000000;">\"</span>+vRuta+"</span>.bmp<span style="color: #ff0000;">"),.T.)<br /><br />RETURN NIL<br /></span></div>[/code:h608fi8l]
oGraph- how to save into bmp in silent mode
Otto, I am not sure exactly what you are trying to do, but if you need to draw the graph, then save it to a bitmap, then you probably can draw it on an invisible window or dialog, then save it and end the window or dialog. James
oHoja:Cells(43):Comment:Text:=""Comentari"" SOLUCIONADO
Hola a todos, Aún estoy encontrando problemas on las hojas de Excel que estoy creando desde que he actualizado a FWH 10.09. Ahora el que no quiere funcionar es: oHoja:Cells( nLinea, 3 ):Comment:Text := "Comentario" Antes con la versión FWH 9.03 no tenía problemas. Cómo puedo resolverlo? Que es lo que sustituye a esta igualdad? Gracias
oHoja:Cells(43):Comment:Text:=""Comentari"" SOLUCIONADO
Ahora es así: oHoja:Cells( 4, 3 ):Comment:Text( "Comentari" )
oImage no muetra algunas imagenes
Buenos días compañeros del foro, tengo un comportamiento extraño con el siguiente código: [code=fw:24gjw7po]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">image</span> oImage <span style="color: #0000ff;">of</span> oDialfd FILENAME <span style="color: #00C800;">NIL</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">9</span> <span style="color: #0000ff;">pixel</span> border<br />oImage:<span style="color: #000000;">CTooltip</span>:=<span style="color: #ff0000;">"Foto 1A"</span><br />oImage:<span style="color: #000000;">LoadImage</span><span style="color: #000000;">&#40;</span>,picfile<span style="color: #000000;">&#41;</span><br /> </div>[/code:24gjw7po] El problema es que si me muestra algunas imágenes y otras no, como se usará en un sistema de verificación de calidad recibiremos fotografías de clientes, no tengo forma de saber que tipo de cámara usaron para tomar las fotografías, existe alguna manera de asegurar que todos los archivos (que serán exclusivamente .JPG) sean visibles? Gracias anticipadas por su ayuda
oImage no muetra algunas imagenes
Que versión de FWH usas ?
oImage:LoadImage no carga la imagen a un dialogo
Buenas tardes compañeros del foro, tengo un pequeño problema, en un dialogo tengo un objeto imagen donde se cargaran imagenes de forma dinamica, el usuario dará click al botón siguiente o anterior y el sistema mostrará la foto anterior o siguiente, el problema es que no carga la imagen al pulsar alguno de estos botones, me deja el espacio en blanco, de inicio cargo una imagen (estan en .JPG) y la despliega correcto, el problema es al querer ver la siguiente imagen, no la muestra, aqui una parte de mi código: Aqui si carga la primera imagen [code=fw:1n9ckqul]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDialfoto <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"dlgfotos"</span> <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Fotografías asociadas a la reclamación de material "</span>+cNode <span style="color: #0000ff;">of</span> oVentprinc <span style="color: #0000ff;">icon</span> <span style="color: #ff0000;">"icono1"</span> <span style="color: #0000ff;">font</span> oFont1g<br /><span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">image</span> oImage <span style="color: #0000ff;">ID</span> <span style="color: #000000;">0</span> <span style="color: #0000ff;">of</span> oDialfoto file cArchifoto <span style="color: #0000ff;">adjust</span> <span style="color: #0000ff;">update</span><br /><span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">btnbmp</span> <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"BMPBACK"</span> oBtnbmp1 <span style="color: #0000ff;">id</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">of</span> oDialfoto <span style="color: #0000ff;">action</span> antfoto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">btnbmp</span> <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"BMPFORWARD"</span> oBtnbmp2 <span style="color: #0000ff;">id</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">of</span> oDialfoto <span style="color: #0000ff;">action</span> sigfoto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">say</span> <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Archivo "</span>+cAdju <span style="color: #0000ff;">id</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">of</span> oDialfoto<br /><span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">button</span> oBtn1f <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4</span> <span style="color: #0000ff;">of</span> oDialfoto <span style="color: #0000ff;">action</span> oDialfoto:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDialfoto</div>[/code:1n9ckqul] Para hacer un refresh de la imagen lo hago asi: [code=fw:1n9ckqul]<div class="fw" id="{CB}" style="font-family: monospace;">oImage:<span style="color: #000000;">LoadImage</span><span style="color: #000000;">&#40;</span>cArchifoto<span style="color: #000000;">&#41;</span><br />oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oDialfoto:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:1n9ckqul] Aqui incluso puse un if file(cArchifoto) y me confirma que el archivo existe en la ruta especificada [code=fw:1n9ckqul]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> file<span style="color: #000000;">&#40;</span>cArchifoto<span style="color: #000000;">&#41;</span><br />msgalert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Si existe el archivo"</span>,cArchifoto<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br />msgalert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"No se encontro el archivo"</span>,cArchifoto<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span></div>[/code:1n9ckqul] Alguna sugerencia para corregirlo? Gracias
oImage:LoadImage no carga la imagen a un dialogo
Mario: Yo uso [code=fw:35l1lo2p]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">&#40;</span>cArchifoto<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:35l1lo2p] Será por ahí? Saludos
oImage:LoadImage no carga la imagen a un dialogo
<!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Pues si, al cambiarlo a LoadBmp ya funciono.... Mil gracias
oImage:Progress
Al cargar una imagen con LoadBmp(), si el fichero es jpg, oImage:Progress(.t.) funciona correcto, pero si la imagen en BMP, sale la pantallita de progress, pero no se ve el avance del timer. ¿Alguna idea? Gracias y un saludo Manuel
oJump for Antonio
Antonio, you set oJump after one navigation to this control to NIL, but if going again to the same control now the oJump is no further functioning as it is NIL!? [code=fw:3mufbbn8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> ForWhen<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TControl<br />……...<br />   <span style="color: #B900B9;">// keyboard navigation</span><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oJump</span> != <span style="color: #00C800;">nil</span><br />      SetFocus<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oJump</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oJump</span> = <span style="color: #00C800;">nil</span><br />…...</div>[/code:3mufbbn8]
oJump for Antonio
Günther I deleted my post after re-reading your initial post about oBtn ... here is the code I deleted that pertained to the oJump method .. [code=fw:15kt2f4o]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oPosition  <span style="color: #0000ff;">VAR</span> cPosition  <span style="color: #0000ff;">ID</span> <span style="color: #000000;">142</span> <span style="color: #0000ff;">of</span> oGrps <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> BITMAP <span style="color: #ff0000;">"find"</span>;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> _PosGet<span style="color: #000000;">&#40;</span> cMode,@cPosition,oPosition,oPositionAbbr,@cPositionAbbr,<span style="color: #ff0000;">"BUTTON"</span>,;<br />                          oButt1,oButt2,oRsEmp <span style="color: #000000;">&#41;</span>,;<br />                          oPositionAbbr:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oPositionAbbr:<span style="color: #000000;">oJump</span> := oPositionAbbr <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />       oPosition:<span style="color: #000000;">lAdjustBtn</span> := .t.<br /><br />       oPosition:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>|nK| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nK==VK_RETURN,<span style="color: #000000;">&#40;</span> ;<br />               _PosGet<span style="color: #000000;">&#40;</span> cMode,@cPosition,oPosition,oPositionAbbr,@cPositionAbbr,<span style="color: #ff0000;">"FIELD"</span>,;<br />                          oButt1,oButt2,oRsEmp <span style="color: #000000;">&#41;</span>,;<br />                          oOrganU:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oOrganU:<span style="color: #000000;">oJump</span> := oOrganU <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oPositionAbbr     <span style="color: #0000ff;">VAR</span> cPositionAbbr <span style="color: #0000ff;">ID</span> <span style="color: #000000;">148</span> <span style="color: #0000ff;">of</span> oGRPS <span style="color: #0000ff;">UPDATE</span> <span style="color: #B900B9;">//COLOR CLR_BLACK, 16053492 READONLY</span><br /><br /> </div>[/code:15kt2f4o] In the above code .. tget is evaluating the bKeydown code block and traps the <enter> key .. thereby blocking the navigation to the next field .. I believe the above code was inspired my Antonio .. I mention oJump in my deleted post and noted that if was a bit clumsy and your solution seemed much more elegant .. Hope this post is relevant to your tget enhancement. Rick Lipkin
oJump y los buttons
Antonio, Pongo aca el código asi me explico mejor. aca los oJump funcionan, pero no puedo hacer click en los button. en este caso, como hago para que funcione el oJump y a parte el click del button? Gracias [code:1vnxb0ou]FUNCTION main&#40;&#41; LOCAL oDlg, ; oDatos &#58;= Array&#40; 10 &#41;, ; vDatos &#58;= Array&#40; 10 &#41;, ; oBtns &#58;= Array&#40; 2 &#41; oDlg&#58;= Dialogo&#40; oDatos, vDatos, oBtns &#41; Inicializar&#40; oDatos, vDatos, oBtns &#41; //----------&#40; Controlo los Get´s &#41;---------- oDatos&#91;1&#93;&#58;bValid&#58;= &#123; || oDatos&#91;1&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;1&#93; &#93;, &#46;T&#46; &#125; oDatos&#91;2&#93;&#58;bValid&#58;= &#123; || oDatos&#91;2&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;2&#93; &#93;, &#46;T&#46; &#125; oDatos&#91;3&#93;&#58;bValid&#58;= &#123; || oDatos&#91;3&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;3&#93; &#93;, &#46;T&#46; &#125; oDatos&#91;4&#93;&#58;bValid&#58;= &#123; || oDatos&#91;4&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;4&#93; &#93;, &#46;T&#46; &#125; oDatos&#91;5&#93;&#58;bValid&#58;= &#123; || oDatos&#91;5&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;5&#93; &#93;, &#46;T&#46; &#125; oDatos&#91;6&#93;&#58;bValid&#58;= &#123; || oDatos&#91;6&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;6&#93; &#93;, &#46;T&#46; &#125; oDatos&#91;7&#93;&#58;bValid&#58;= &#123; || oDatos&#91;7&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;7&#93; &#93;, &#46;T&#46; &#125; oDatos&#91;8&#93;&#58;bValid&#58;= &#123; || oDatos&#91;8&#93;&#58;oJump&#58;= oDatos&#91; vDatos&#91;8&#93; &#93;, &#46;T&#46; &#125; ACTIVATE DIALOG oDlg Centered RETURN &#40; NIL &#41; //------------------------------------------------------------------------------ FUNCTION Inicializar&#40; oDatos, vDatos, oBtns &#41; vDatos&#91;1&#93;&#58;= 3 vDatos&#91;2&#93;&#58;= 7 vDatos&#91;3&#93;&#58;= 8 vDatos&#91;4&#93;&#58;= 6 vDatos&#91;5&#93;&#58;= 2 vDatos&#91;6&#93;&#58;= 5 vDatos&#91;7&#93;&#58;= 3 vDatos&#91;8&#93;&#58;= 6 oDatos&#91;1&#93;&#58;refresh&#40;&#41; oDatos&#91;2&#93;&#58;refresh&#40;&#41; oDatos&#91;3&#93;&#58;refresh&#40;&#41; oDatos&#91;4&#93;&#58;refresh&#40;&#41; oDatos&#91;5&#93;&#58;refresh&#40;&#41; oDatos&#91;6&#93;&#58;refresh&#40;&#41; oDatos&#91;7&#93;&#58;refresh&#40;&#41; oDatos&#91;8&#93;&#58;refresh&#40;&#41; RETURN &#40; NIL &#41; //------------------------------------------------------------------------------ FUNCTION Dialogo&#40; oDatos, vDatos, oBtns &#41; LOCAL oDlg DEFINE DIALOG oDlg RESOURCE "DLG_PARTICULAR" //----------&#40; Get´s &#41;---------- REDEFINE GET oDatos&#91;1&#93; VAR vDatos&#91;1&#93; ID 101 OF oDlg REDEFINE GET oDatos&#91;2&#93; VAR vDatos&#91;2&#93; ID 102 OF oDlg REDEFINE GET oDatos&#91;3&#93; VAR vDatos&#91;3&#93; ID 103 OF oDlg REDEFINE GET oDatos&#91;4&#93; VAR vDatos&#91;4&#93; ID 104 OF oDlg REDEFINE GET oDatos&#91;5&#93; VAR vDatos&#91;5&#93; ID 105 OF oDlg REDEFINE GET oDatos&#91;6&#93; VAR vDatos&#91;6&#93; ID 106 OF oDlg REDEFINE GET oDatos&#91;7&#93; VAR vDatos&#91;7&#93; ID 107 OF oDlg REDEFINE GET oDatos&#91;8&#93; VAR vDatos&#91;8&#93; ID 108 OF oDlg REDEFINE Checkbox oDatos&#91;9&#93; VAR vDatos&#91;9&#93; ID 109 OF oDlg REDEFINE Checkbox oDatos&#91;10&#93; VAR vDatos&#91;10&#93; ID 110 OF oDlg //----------&#40; Botones &#41;---------- REDEFINE BUTTON oBtns&#91;1&#93; ID 301 OF oDlg REDEFINE BUTTON oBtns&#91;2&#93; ID 302 OF oDlg RETURN &#40; oDlg &#41;[/code:1vnxb0ou]
oJump y los buttons
Prueba a usar la cláusula CANCEL en los buttons
oJump y los buttons
[quote="Antonio Linares":1zt2te09]Prueba a usar la cláusula CANCEL en los buttons[/quote:1zt2te09] Al hacer esto, luego ya deja de funcionar el jump... aclaro con el mouse, con el teclado funciona.
oJump y los buttons
¿Ya probaste a poner un mensaje en el action del botón?. Pregunto por que no veo que tenga un action entonces.... simplemente no hace nada. REDEFINE BUTTON oBtns[1] ID 301 OF oDlg ; ACTION Hola() static function Hola() ?"Si aparece este mensaje. Si funciona" return nil
oLbx:bKeyDown:= {|nK| if( nK==VK_RETURN oDlg:End() ) }
Amigos: No me funciona en los Browses esta funcion que si me funcionada antes. Alguna sugerencia? Saludos y gracias Ruben Fernandez FWH 2.7, Harbour
oLbx:bKeyDown:= {|nK| if( nK==VK_RETURN oDlg:End() ) }
Ruben, Este ejemplo funciona con el build 2.7 de marzo: [code:3uhpses0] #include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg, oBrw DEFINE DIALOG oDlg @ 1, 1 LISTBOX oBrw FIELDS SIZE 100, 30 oBrw&#58;bKeyDown&#58;= &#123;|nK| if&#40; nK==VK_RETURN, &#40; MsgInfo&#40;&#41;, oDlg&#58;End&#40;&#41; &#41;, &#41; &#125; @ 3, 1 BUTTON "&Close"; ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg; CENTER RETURN NIL [/code:3uhpses0]
oLbx:bKeyDown:= {|nK| if( nK==VK_RETURN oDlg:End() ) }
Gracias Maestro: Aparentemente tenía declarado nk:=LastKey() y esto era lo que me complicaba. Gracias y saludos. Ruben Fernandez.
oLbx:cSeek fwh1903
Antonio, estou tendo problema com cseek em xbrowse faço o filtro e fecho a tela do xbrowse, quando chamo a tela do xbrowse novamente continua com o filtro com fwh1801 trabalha normal
oLbx:cSeek fwh1903
SELECT( DBCADCLIEN ) GO TOP DBPESQ := ALIAS() Haga el filtro... Faça o filtro... ... CLOSE( DBPESQ ) // CLOSE FILTER - FECHE FILTRO DA XBROWSE() USE CADCLIEN INDEX CADCLIEN ALIAS CADCLIEN NEW SHARED SET ORDER TO 01 GO TOP ... Abs.
oLbx:cSeek fwh1903
kapiaba o problema ta na pesquisa do xbrowsw cSeek peguei o xbrowse da versao anterior fwh1801 e tb não funcionou oLbx:lIncrFilter := .t. @ 8, 340 SAY oLbx:oSeek PROMPT oLbx:cSeek ..... .... .. eu fecho a tela do xbrowse e a tabela também, quando chamo a tela do xbrowse novamente continua com o ultimo filtro que fiz no @ 8, 340 SAY oLbx:oSeek PROMPT oLbx:cSeek .
oLbx:cSeek fwh1903
Eu faço com múltipla escolah e funciona bem com FWH1701, veja: [img:ebm3lbhw]https&#58;//i&#46;imgur&#46;com/RLr2Y5j&#46;png[/img:ebm3lbhw] Vou postar o fonte para você. Abs
oLbx:cSeek fwh1903
[code=fw:odrdtqzo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// BUSCA DO CLIENTE</span><br /><span style="color: #00C800;">FUNCTION</span> BUSCA_NOME_CLIENTE<span style="color: #000000;">&#40;</span> aGet, DeOndeVem <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oLbx, oSaida, oBrush, oFont, oFnt, oOk, oSay<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lConfirma := .F., nRecno, nKey := VK_RETURN, cAlias, IDCOR<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> CNOMECLIEN, &nbsp;cEnderPropo, cBairrPropo, cCepdaPropo, bGet := ARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cCidadPropo, cUFdaPropo, ccEmailCli, ccContatoCli, ccFuncaoClie<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> ccFonesClien, oDlgInd, TRAB, cIndice, nColuna := <span style="color: #000000;">1</span>, cnContrato, aGrad<br /><br />&nbsp; &nbsp;TRAB := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ESCOLHA O ÖNDICE DA PESQUISA DO CLIENTE"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// GRADIENTE NO DIALOGO</span><br />&nbsp; &nbsp;aGrad := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.30</span>, CLR_CYAN, CLR_HCYAN <span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.70</span>, CLR_HCYAN, CLR_CYAN <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</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;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgInd <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DLG_INDICE_PESQUISA"</span> GRADIENT aGrad<br /><br />&nbsp; &nbsp;oDlgInd:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">For</span> IDCor = <span style="color: #000000;">401</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">401</span> <span style="color: #B900B9;">// Os ID's dos TEXTOS na DIALOG.</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> <span style="color: #0000ff;">ID</span> IDCor <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE <span style="color: #0000ff;">OF</span> oDlgInd &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">FONT</span> oFnt TRANSPARENT<br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span> IDCor<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> GROUP oGroup <span style="color: #0000ff;">ID</span> <span style="color: #000000;">501</span> <span style="color: #0000ff;">OF</span> oDlgInd <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE <span style="color: #0000ff;">FONT</span> oFnt TRANSPARENT<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">RADIO</span> oRadMenu <span style="color: #0000ff;">VAR</span> nOpcBuscaClie <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">202</span>, <span style="color: #000000;">203</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">205</span>, &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">206</span> <span style="color: #0000ff;">OF</span> oDlgInd <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> TRAB <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@ !"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">50</span> <span style="color: #0000ff;">OF</span> oDlgInd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span> COLORS CLR_HBLUE, CLR_WHITE <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> BUTTONBMP oOk <span style="color: #0000ff;">ID</span> <span style="color: #000000;">301</span> <span style="color: #0000ff;">OF</span> oDlgInd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> lConfirma := .T., oDlgInd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oOk:<span style="color: #000000;">cToolTip</span> := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Escolha um Cliente"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> BUTTONBMP oSaida <span style="color: #0000ff;">ID</span> <span style="color: #000000;">302</span> <span style="color: #0000ff;">OF</span> oDlgInd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> lConfirma := .F., oDlgInd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL<br /><br />&nbsp; &nbsp;oSaida:<span style="color: #000000;">cToolTip</span> := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Saida - Exit - Cancelar"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oOk &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> oFont<br />&nbsp; &nbsp;SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oSaida &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TO</span> oFont<br />&nbsp; &nbsp;SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oDlgInd &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgInd <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oFnt:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont:<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: #00C800;">Do</span> <span style="color: #00C800;">Case</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nKey == VK_ESCAPE .OR. GetKeyState<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span> .OR. .NOT. lConfirma<br /><br />&nbsp; &nbsp; &nbsp; nOpcBuscaClie := <span style="color: #000000;">6</span><br /><br />&nbsp; &nbsp; &nbsp; XFOCUS<span style="color: #000000;">&#40;</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">EndCase</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">SELECT</span><span style="color: #000000;">&#40;</span> DBCADCLIEN <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// EM ORGIND.PRG</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nOpcBuscaClie == <span style="color: #000000;">6</span> <span style="color: #B900B9;">//-> Por Endereco</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> END_FAT TAG <span style="color: #000000;">12</span> <span style="color: #0000ff;">TO</span> CLIETEMP <span style="color: #00C800;">FOR</span> <span style="color: #000000;">&#40;</span> .NOT. EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> MEMORY <span style="color: #B900B9;">// TEMPORARY</span><br /><br />&nbsp; &nbsp; &nbsp; MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PESQUISA PELO ENDERECO DO CLIENTE..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"AGUARDE UM MOMENTO POR FAVOR... &nbsp; &nbsp; "</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cIndice := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Endere‡o"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nColuna := <span style="color: #000000;">3</span><br /><br />&nbsp; &nbsp;ELSEIF nOpcBuscaClie == <span style="color: #000000;">5</span> <span style="color: #B900B9;">//-> Por CPF</span><br /><br />&nbsp; &nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">09</span><br /><br />&nbsp; &nbsp; &nbsp; MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PESQUISA PELO C.P.F. DO CLIENTE..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"AGUARDE UM MOMENTO POR FAVOR... &nbsp; "</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cIndice := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Cpf"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nColuna := <span style="color: #000000;">5</span><br /><br />&nbsp; &nbsp;ELSEIF nOpcBuscaClie == <span style="color: #000000;">4</span> <span style="color: #B900B9;">//-> Por CGC/CNPJ</span><br /><br />&nbsp; &nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">08</span><br /><br />&nbsp; &nbsp; &nbsp; MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PESQUISA PELO C.N.P.J. DO CLIENTE..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"AGUARDE UM MOMENTO POR FAVOR... &nbsp; &nbsp; "</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cIndice := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Cnpj"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nColuna := <span style="color: #000000;">4</span><br /><br />&nbsp; &nbsp;ELSEIF nOpcBuscaClie == <span style="color: #000000;">3</span> <span style="color: #B900B9;">//-> Por fantasia</span><br /><br />&nbsp; &nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">10</span><br /><br />&nbsp; &nbsp; &nbsp; MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PESQUISA PELA FANTASIA DO CLIENTE..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"AGUARDE UM MOMENTO POR FAVOR... &nbsp; &nbsp; "</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cIndice := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Fantasia"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nColuna := <span style="color: #000000;">3</span><br /><br />&nbsp; &nbsp;ELSEIF nOpcBuscaClie == <span style="color: #000000;">2</span> <span style="color: #B900B9;">//-> Por Codigo</span><br /><br />&nbsp; &nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">01</span><br /><br />&nbsp; &nbsp; &nbsp; MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PESQUISA PELO CODIGO DO CLIENTE..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"AGUARDE UM MOMENTO POR FAVOR... &nbsp; "</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cIndice := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"C¢digo"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nColuna := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;ELSEIF nOpcBuscaClie == <span style="color: #000000;">1</span> <span style="color: #B900B9;">//-> Por Nome</span><br /><br />&nbsp; &nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">07</span><br /><br />&nbsp; &nbsp; &nbsp; MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PESQUISA PELO NOME DO CLIENTE..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"AGUARDE UM MOMENTO POR FAVOR... "</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cIndice := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Nome"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nColuna := <span style="color: #000000;">2</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;SET DESCENDING OFF<br /><br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;cAlias &nbsp; := <span style="color: #0000ff;">ALIAS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//-> Busca Incremental.</span><br /><br />&nbsp; &nbsp;DBPESQ := <span style="color: #0000ff;">ALIAS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// GRADIENTE NO DIALOGO</span><br />&nbsp; &nbsp;aGrad := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.30</span>, CLR_CYAN, CLR_HCYAN <span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.70</span>, CLR_HCYAN, CLR_CYAN <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</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 /><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;">800</span>, <span style="color: #000000;">455</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"PLENOIND: PESQUISA INCREMENTAL - Digite o Que Deseja Procurar"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; GRADIENT aGrad<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">nSeeThroClr</span> := RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">30</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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; DATASOURCE <span style="color: #ff0000;">"DBPESQ"</span> <span style="color: #0000ff;">AUTOCOLS</span> AUTOSORT CELL LINES NOBORDER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"Código:"</span>, <span style="color: #ff0000;">"Nome:"</span>, <span style="color: #ff0000;">"Endereço:"</span>, <span style="color: #ff0000;">"Fantasia:"</span>, <span style="color: #ff0000;">"Cnpj:"</span>, <span style="color: #ff0000;">"Cpf:"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; FIELDS <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CLIENCOD, <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CLIENTE, <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->END_FAT, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->FANTASIA, <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CGC, <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CPF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">l2007</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">lFlatStyle</span> &nbsp; &nbsp; &nbsp; &nbsp;:= .T. &nbsp;<span style="color: #B900B9;">// ??</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nColSel</span> := nColuna <span style="color: #B900B9;">// <n> &nbsp;// Mister Nages - Perfect. Cursor inicia na xBrowse()</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br /><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">lIncrFilter</span> := .T. <span style="color: #B900B9;">// Liga o Filtro incremental</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">lSeekWild</span> &nbsp; := .T. <span style="color: #B900B9;">// Liga a busca incremental</span><br /><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span> |nKey| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_RETURN, <span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bKeyChar</span> &nbsp; := <span style="color: #000000;">&#123;</span> |nKey| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_ESCAPE, <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">AutoFit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Auto ajuste / ajuste automatico do xBrowse()</span><br /><br />&nbsp; &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;END<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">055</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Digite o Que Deseja Procurar: "</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE TRANSPARENT<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_YELLOW <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">280</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Busca Por: "</span> + cIndice <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE TRANSPARENT<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw:<span style="color: #000000;">oSeek</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// oBrw:bLClicked &nbsp; &nbsp; := { || nRecNo := ( cAlias )->( RecNo() ), oDlg:End() }</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bLClicked</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">010</span>, <span style="color: #000000;">005</span> <span style="color: #0000ff;">BUTTON</span> oSaida <span style="color: #0000ff;">PROMPT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"&Sair"</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">OF</span> oDlg CANCEL<br /><br />&nbsp; &nbsp;oSaida:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Saida - Exit - Cancelar"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont:<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: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> nKey == VK_ESCAPE .OR. GetKeyState<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; lConfirma := .F.<br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">ENDCASE</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lConfirma &nbsp;<span style="color: #B900B9;">//-> Usuario Escolheu um Cliente</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//-> Posiciona Cursor no Registro Para Altera‡Æo</span><br />&nbsp; &nbsp; &nbsp; nRecNo &nbsp; &nbsp; := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; GoTo<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; CNOMECLIEN := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CLIENTE<br /><br />&nbsp; &nbsp; &nbsp; nClienCod &nbsp;:= <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CLIENCOD<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> CNOMECLIEN <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// folder 2</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// aGet[43] VAR ClienPropo PICTURE "@K!" ID 23 OF oFld:aDialogs[ 2 ]</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> DeOndeVem = <span style="color: #ff0000;">"FOLDER2"</span> &nbsp;<span style="color: #B900B9;">// SEGUNDA TELA DA PROPOSTA</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">43</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> CNOMECLIEN <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">43</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; cEnderPropo := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->END_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> cEnderPropo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cBairrPropo := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->BAIR_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> cBairrPropo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cCepdaPropo := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CEP_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> cCepdaPropo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cCidadPropo := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CID_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> cCidadPropo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cUFdaPropo := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->UF_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> cUFdaPropo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; ccEmailCli := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->EMAIL<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> ccEmailCli <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; ccContatoCli := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->CON_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">29</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> ccContatoCli <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">29</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; ccFuncaoClie := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->DEPTO_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> ccFuncaoClie <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; ccFonesClien := <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>->FONE_FAT<br /><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">31</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> ccFonesClien <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">31</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nOpcBuscaClie == <span style="color: #000000;">6</span> <span style="color: #B900B9;">//-> Por Endereco</span><br /><br />&nbsp; &nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">0</span> <span style="color: #B900B9;">// FECHA O INDICE TEMPORARIO</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// arquivo temporario na memoria MEMORY ou TEMPORARY</span><br />&nbsp; &nbsp; &nbsp; OrdDestroy<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CLIETEMP"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Swap it to descending - Trocar para descendente</span><br />&nbsp; &nbsp;SET DESCENDING <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;CLOSE<span style="color: #000000;">&#40;</span> DBPESQ <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// CLOSE FILTER - FECHO FILTRO DA XBROWSE()</span><br /><br />&nbsp; &nbsp;USE CADCLIEN <span style="color: #0000ff;">INDEX</span> CADCLIEN &nbsp;<span style="color: #0000ff;">ALIAS</span> CADCLIEN <span style="color: #00C800;">NEW</span> SHARED<br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">01</span><br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">SELECT</span><span style="color: #000000;">&#40;</span> DBCADPROPO <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">01</span><br /><br />&nbsp; &nbsp;XFOCUS<span style="color: #000000;">&#40;</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</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:odrdtqzo] Abs.
oLbx:cSeek fwh1903
kapiaba qual a versão do fwh vc usa? na versão 1801 que eu usava funcionava perfeitamente na versao fwh1903 é que não funciona, to achando que é por conta do SQLRDD
oLbx:cSeek fwh1903
FWH1701 com DBF/CDX.
oLbx:cSeek fwh1903
[code=fw:1ik3dqvq]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> PesqProd<span style="color: #000000;">&#40;</span> oGet1, oText1, cFam_Prod, lEsto, lEntr <span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">Local</span> oFontB, oFontH, oFont1, oLbxPePd, oDlgPePd, oCol, cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nIndice:=Prod-><span style="color: #000000;">&#40;</span>IndexOrd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />       aRes:=ScrResolution<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cSelect<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">NAME</span> oApp:<span style="color: #000000;">cFontBrow</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, oApp:<span style="color: #000000;">cFontBrowLen</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontH <span style="color: #0000ff;">NAME</span> oApp:<span style="color: #000000;">cFontBrow</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, oApp:<span style="color: #000000;">cFontBrowLen</span><span style="color: #000000;">-2</span> BOLD<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> oApp:<span style="color: #000000;">cFontGet</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, oApp:<span style="color: #000000;">cFontGetLen</span><br /><br />   dbSelectAreaSql<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Prod"</span><span style="color: #000000;">&#41;</span><br />   Prod-><span style="color: #000000;">&#40;</span>DbSetOrder<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Prod2"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   SR_SetActiveConnection <span style="color: #000000;">&#40;</span>nConn0<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">If</span> !SR_ExistTable<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"prod"</span> <span style="color: #000000;">&#41;</span><br />      SR_SetActiveConnection <span style="color: #000000;">&#40;</span>nConn1<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Endif</span><br />   cSelect := <span style="color: #ff0000;">"SELECT * FROM prod WHERE at1_prod="</span>+Sr_cDbValue<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"F"</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" and fam_prod="</span>+Sr_cDbValue<span style="color: #000000;">&#40;</span>cFam_Prod<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" order by nom_prod"</span><br />   DbUseArea<span style="color: #000000;">&#40;</span>.t., <span style="color: #ff0000;">"SQLRDD"</span>, cSelect, <span style="color: #ff0000;">"Prod"</span><span style="color: #000000;">&#41;</span><br />   dbSelectArea<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Prod"</span> <span style="color: #000000;">&#41;</span><br />   Prod-><span style="color: #000000;">&#40;</span>DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// SR_SETFILTER("at1_prod='A' and fam_prod='"+cFam_Prod+"'")</span><br /><span style="color: #B900B9;">// Prod->(DbGoTop())</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgPePd <span style="color: #0000ff;">SIZE</span> aRes<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>*<span style="color: #000000;">96</span>/<span style="color: #000000;">100</span>, aRes<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>*<span style="color: #000000;">74</span>/<span style="color: #000000;">100</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Produto"</span><br /><br />   @ <span style="color: #000000;">1.3</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">xBROWSE</span> oLbxPePd FIELDS Prod->Fam_Prod+Prod->Cod_Prod+CRLF+Prod->Bar_Prod,;<br />                                   Prod->Nom_Prod+CRLF+Prod->Fam_Prod+<span style="color: #ff0000;">"-"</span>+Fami->Nom_Fami,;<br />                                   Prod->Uni_Prod+CRLF,;<br />                                   Prod->Ref_Prod+CRLF+Prod->Mar_Prod,;<br />                                   Prod->Ncm_Prod+CRLF+Prod->Ces_Prod,;<br />                                   <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>!Prod->Dec_Prod, Tran<span style="color: #000000;">&#40;</span>Pres->Eat_Pres,<span style="color: #ff0000;">"9999999"</span><span style="color: #000000;">&#41;</span>, Tran<span style="color: #000000;">&#40;</span>Pres->Eat_Pres,<span style="color: #ff0000;">"9999999.999"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+CRLF+Tran<span style="color: #000000;">&#40;</span><span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>Empr->Prc_Empr=.t., Prod->Pfa_Prod, Prod->Pve_Prod<span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>Empr->Dec_Empr=.t.,<span style="color: #ff0000;">"@E 999,999.9999"</span>,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />                           HEADERS <span style="color: #ff0000;">"GrCód."</span>+CRLF+<span style="color: #ff0000;">"Cód.:Barra"</span>,;<br />                                   <span style="color: #ff0000;">"Descrição Produto"</span>,;<br />                                   <span style="color: #ff0000;">"MD"</span>+CRLF+<span style="color: #ff0000;">"S"</span>,;<br />                                   <span style="color: #ff0000;">"Referência"</span>+CRLF+<span style="color: #ff0000;">"Marca"</span>,;<br />                                   <span style="color: #ff0000;">"NCM"</span>+CRLF+<span style="color: #ff0000;">"CEST"</span>,;<br />                                   <span style="color: #ff0000;">"Estoque"</span>+CRLF+<span style="color: #ff0000;">"Prç."</span>+<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>Empr->Prc_Empr=.t., <span style="color: #ff0000;">"Atacado"</span>, <span style="color: #ff0000;">"Varejo"</span><span style="color: #000000;">&#41;</span>;<br />                           JUSTIFY .f., .f., .f., .f., .f., .t.;<br />                              <span style="color: #0000ff;">SIZE</span> aRes<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>*<span style="color: #000000;">48</span>/<span style="color: #000000;">100</span>, aRes<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>*<span style="color: #000000;">33</span>/<span style="color: #000000;">100</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"PROD"</span> <span style="color: #0000ff;">OF</span> oDlgPePd<br /><br />   oLbxPePd:<span style="color: #000000;">nMarqueeStyle</span>       := MARQSTYLE_HIGHLROW<br />   oLbxPePd:<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_BLACK<br />   oLbxPePd:<span style="color: #000000;">nRowDividerStyle</span>    := LINESTYLE_BLACK<br />   oLbxPePd:<span style="color: #000000;">lColDividerComplete</span> := .t.<br />   oLbxPePd:<span style="color: #000000;">lFooter</span>             := .t.<br />   oLbxPePd:<span style="color: #000000;">nFreeze</span>             := <span style="color: #000000;">0</span><br />   oLbxPePd:<span style="color: #000000;">bClrSelFocus</span>        := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_FOCO <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />   oLbxPePd:<span style="color: #000000;">nHeaderLines</span>        := <span style="color: #000000;">2</span><br />   oLbxPePd:<span style="color: #000000;">nDataLines</span>          := <span style="color: #000000;">2</span><br />   oLbxPePd:<span style="color: #000000;">bKeyDown</span>            := <span style="color: #000000;">&#123;</span>|nKey| BrwKeyPePr<span style="color: #000000;">&#40;</span>nkey, oDlgPePd, oLbxPePd, oGet1, oText1, lEsto, lEntr<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   oLbxPePd:<span style="color: #000000;">bLDblClick</span>          := <span style="color: #000000;">&#123;</span> || EditProd<span style="color: #000000;">&#40;</span> oLbxPePd, .f., .f., .t.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   oLbxPePd:<span style="color: #000000;">bClrStd</span>             := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_WHITE, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Prod-><span style="color: #000000;">&#40;</span>ORDKEYNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>%<span style="color: #000000;">2</span>==<span style="color: #000000;">0</span>, CLR_BRW1, CLR_BRW2<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />   oLbxPePd:<span style="color: #000000;">lIncrFilter</span>         := .t.<br /><br />   oCol  := oLbxPePd:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />   oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #ff0000;">'PROD1'</span><br />   ocol:<span style="color: #000000;">cToolTip</span>:=<span style="color: #ff0000;">"Clique para ordenar por código do produto"</span><br /><br />   oCol  := oLbxPePd:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />   oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #ff0000;">'PROD2'</span><br />   ocol:<span style="color: #000000;">cToolTip</span>:=<span style="color: #ff0000;">"Clique para ordenar por descrição do produto"</span><br /><br />   oCol  := oLbxPePd:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />   oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BMP_CHE1"</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BMP_CHE2"</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">bStrData</span>  := <span style="color: #000000;">&#123;</span> || Prod->Uni_Prod <span style="color: #000000;">&#125;</span><br />   oCol:<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>Prod->Ati_Prod, <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   oCol  := oLbxPePd:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span><br />   oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #ff0000;">'PROD7'</span><br />   ocol:<span style="color: #000000;">cToolTip</span>:=<span style="color: #ff0000;">"Clique para ordenar por Referencia do produto"</span><br /><br />   oLbxPePd:<span style="color: #000000;">SetRDD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oLbxPePd:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oDlgPePd:<span style="color: #000000;">oClient</span> := oLbxPePd<br /><br />   oDlgPePd:<span style="color: #000000;">lHelpIcon</span> := .f.<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgPePd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oLbxPePd:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, DlgPePdToolBar<span style="color: #000000;">&#40;</span>oDlgPePd, oLbxPePd, oGet1, oText1, cFam_Prod, lEsto, lEntr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /> Prod-><span style="color: #000000;">&#40;</span>dbCloseArea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /> oLbxPePd := <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">// SR_SetActiveConnection (nConn0)</span><br /><span style="color: #B900B9;">// If !SR_ExistTable( "prod" )</span><br /><span style="color: #B900B9;">//    SR_SetActiveConnection (nConn1)</span><br /><span style="color: #B900B9;">// Endif</span><br /><span style="color: #B900B9;">// SR_SETFILTER("sr_recno != 0")</span><br /><br /> Prod-><span style="color: #000000;">&#40;</span>DbSetOrder<span style="color: #000000;">&#40;</span>nIndice<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /> dbSelectAreaSql<span style="color: #000000;">&#40;</span>cAlias<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> DlgPePdToolBar<span style="color: #000000;">&#40;</span>oDlgPePd, oLbxPePd, oGet1, oText1, cFam_Prod, lEsto, lEntr<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oToolBarPePd, oImageListPePd, oPesqCombo, nPesqCombo:=<span style="color: #000000;">1</span>, oFontH<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontH <span style="color: #0000ff;">NAME</span> oApp:<span style="color: #000000;">cFontBrow</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, oApp:<span style="color: #000000;">cFontBrowLen</span> BOLD<br /><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oDlgPePd <span style="color: #000000;">2007</span> <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Cadastro de Produtos"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> IMAGELIST oImageListPePd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">24</span>, <span style="color: #000000;">24</span><br />   <span style="color: #0000ff;">DEFINE</span> IMGBITMAP <span style="color: #0000ff;">OF</span> oImageListPePd <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"BMP_NOVO"</span>  <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> IMGBITMAP <span style="color: #0000ff;">OF</span> oImageListPePd <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"BMP_EDIT"</span>  <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> IMGBITMAP <span style="color: #0000ff;">OF</span> oImageListPePd <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"BMP_DELE"</span>  <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> IMGBITMAP <span style="color: #0000ff;">OF</span> oImageListPePd <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"BMP_REST"</span>  <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> IMGBITMAP <span style="color: #0000ff;">OF</span> oImageListPePd <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"BMP_SAI2"</span>  <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> TOOLBAR oToolBarPePd <span style="color: #0000ff;">OF</span> oDlgPePd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">26</span>, <span style="color: #000000;">30</span> IMAGELIST oImageListPePd BALLOON <span style="color: #000000;">2007</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> TBBUTTON <span style="color: #0000ff;">OF</span> oToolBarPePd;<br />          <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>EditProd<span style="color: #000000;">&#40;</span>oLbxPePd, .t., .t., lEsto, lEntr<span style="color: #000000;">&#41;</span>, Prod-><span style="color: #000000;">&#40;</span>DbSetOrder<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Prod4"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />          TOOLTIP <span style="color: #ff0000;">"Novo  F2"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> TBBUTTON <span style="color: #0000ff;">OF</span> oToolBarPePd;<br />          <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>EditProd<span style="color: #000000;">&#40;</span>oLbxPePd, .f., .t., lEsto, lEntr<span style="color: #000000;">&#41;</span>, Prod-><span style="color: #000000;">&#40;</span>DbSetOrder<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Prod4"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />          TOOLTIP <span style="color: #ff0000;">"Editar  F3"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> TBBUTTON <span style="color: #0000ff;">OF</span> oToolBarPePd;<br />          <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>DelProd<span style="color: #000000;">&#40;</span>oLbxPepd<span style="color: #000000;">&#41;</span>, Prod-><span style="color: #000000;">&#40;</span>DbSetOrder<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Prod4"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />          TOOLTIP <span style="color: #ff0000;">"Deletar  F4"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> TBSEPARATOR <span style="color: #0000ff;">OF</span> oToolBarPePd<br /><br />   <span style="color: #0000ff;">DEFINE</span> TBBUTTON <span style="color: #0000ff;">OF</span> oToolBarPePd;<br />          <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oText1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>Empr->Bar_Empr=.f., oGet1:<span style="color: #000000;">varput</span><span style="color: #000000;">&#40;</span>Val<span style="color: #000000;">&#40;</span>Prod->Cod_Prod<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, oGet1:<span style="color: #000000;">varput</span><span style="color: #000000;">&#40;</span>Prod->Bar_Prod<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oGet1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlgPePd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />          TOOLTIP <span style="color: #ff0000;">"Selecionar  [ENTER]"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> TBSEPARATOR <span style="color: #0000ff;">OF</span> oToolBarPePd<br />   <span style="color: #0000ff;">DEFINE</span> TBBUTTON <span style="color: #0000ff;">OF</span> oToolBarPePd <span style="color: #0000ff;">ACTION</span> oDlgPePd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> TOOLTIP <span style="color: #ff0000;">"Sair"</span><br />   <span style="color: #0000ff;">DEFINE</span> TBSEPARATOR <span style="color: #0000ff;">OF</span> oToolBarPePd<br /><br />   @ <span style="color: #000000;">6</span>, <span style="color: #000000;">230</span> <span style="color: #0000ff;">COMBOBOX</span> oPesqCombo <span style="color: #0000ff;">VAR</span> nPesqCombo <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DESCRIÇÃO"</span>, <span style="color: #ff0000;">"CÓDIGO"</span>, <span style="color: #ff0000;">"REFERÊNCIA"</span>, <span style="color: #ff0000;">"MARCA"</span><span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">OF</span> oToolBarPePd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">COLOR</span> CLR_GET1,CLR_GET2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">FONT</span> oFontH <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> MudaOrdemProdPesqNoFilter<span style="color: #000000;">&#40;</span>nPesqCombo, oLbxPePd<span style="color: #000000;">&#41;</span><br />   @ <span style="color: #000000;">8</span>, <span style="color: #000000;">340</span> <span style="color: #0000ff;">SAY</span> oLbxPePd:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oLbxPePd:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oToolBarPePd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">COLOR</span> CLR_GET1, CLR_GET2 <span style="color: #0000ff;">FONT</span> oFontH <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span> BORDER<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />*-------------------------------</div>[/code:1ik3dqvq] funcionava com 1801 acredito que funcionaria com sua versão tb 1903 não funciona
oLbx:cSeek fwh1903
Intente asi: Tente assim: [code=fw:36hjn2st]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;oLbxPePd:<span style="color: #000000;">lIncrFilter</span> &nbsp; &nbsp; &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp;oLbxPePd:<span style="color: #000000;">lSeekWild</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .T. <span style="color: #B900B9;">// Liga a busca incremental</span><br />&nbsp;</div>[/code:36hjn2st] Abs.
oLbx:cSeek fwh1903
kapiaba coloquei o oLbxPePd:lSeekWild := .t., continua a mesma coisa veja: fwh1801 <!-- m --><a class="postlink" href="https://youtu.be/VZ0O2P_XXnQ">https://youtu.be/VZ0O2P_XXnQ</a><!-- m --> fwh1903 <!-- m --><a class="postlink" href="https://youtu.be/M2RH_9uuLKA">https://youtu.be/M2RH_9uuLKA</a><!-- m -->
oLbx:cSeek fwh1903
descobri uma coisa, acho bom o nageswaragunupudi ficar sabendo no windows 7 esta funcionando perfeitamente a versao fwh1903 estou usando o Windows 10 Enterprise LTSC 1809 x64_PT-br e agora?
oLbx:cSeek fwh1903
vale ressaltar que a versão 1801 funciona tanto no windows 7 como no windows 10 LTCS mencionado acima a versão 1903 funciona no windows 7 e NÂO funciona no windows 10 LTCS
oLbx:cSeek fwh1903
pessoal esquece tudo que eu disse, erro meu <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
oLbx:cSeek fwh1903
oLbxPePd:Seek("") ACTIVATE DIALOG oDlgPePd CENTERED ON INIT (oLbxPePd:Seek(""), DlgPePd2(oDlgPePd, oLbxPePd, oGet1, oText1) )
oLbx:cSeek fwh1903
Very good.
oLbx:cSeek fwh1903
[quote="Sistem":3gswilzn]pessoal esquece tudo que eu disse, erro meu <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->[/quote:3gswilzn] Glad to know. I can stop breaking my head.
oMETER EN CELDAS DE xBROWSE
Saludos, quiero contruir para respaldo de datos un xBrowse que contenga todas las tablas de una database(mysql) en una celda y que en otra celda haya un oMeter indicando el porcentaje de registros respaldo de la tabla que se este procesando y que al finalizar pase al proximo registro y asi sucesivamente hasta que respalde todas las tablas, pero no tengo ni idea de como COLOCAR UN oMETER EN UNA CELDA... Alguien ha hecho algo parecido o tienen algunas ideas de por donde empezar.? acepto sugerencias e ideas en lo que quiero hacer, de antemano creo seria una buena idea para la opcion de respaldo en conjunto con xBrowse que creo Mr. RAO, espero sus respuestas, saludos, gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
oMETER EN CELDAS DE xBROWSE
Esto graficamente es lo que me gustaria hacer o no se si ya existe en algun sample, saludos, gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [img] [url=http&#58;//subefotos&#46;com/ver/?4c08c4bda9ceb5519821e56c4f75f227o&#46;jpg:2btrrn0c][img:2btrrn0c]http&#58;//thumbs&#46;subefotos&#46;com/4c08c4bda9ceb5519821e56c4f75f227o&#46;jpg[/img:2btrrn0c][/url:2btrrn0c] [/img]
oMETER EN CELDAS DE xBROWSE
Hi Jose, Look at \fwh\samples\xbrprogb.prg .
oMETER EN CELDAS DE xBROWSE
[quote="vilian":18m7kidh]Hi Jose, Look at \fwh\samples\xbrprogb.prg .[/quote:18m7kidh] Vilian, buscando en el foro fue el primer sample que vi, pero no veo como funciona ya que parece los valores son staticos tomados de una DBF, lo que quiero es que mientras se ejecuta el BACKUP el oMeter en la celda se vaya actualizando el valor porcentual, cuando esta tabla este lista...siga al siguiente registro que seria la proxima tabla en el array del backup y obviamente seria el del xbrowse..tambien podria ser que se agregue el nombre de la tabla en el momento de entrar al backup al xbrowse y mientras se ejecuta el backup se ejecute el oMeter, casi todo lo se hacer, menos como agregar el oMeter en la celda...seguire revisando haber que logro, espero otras sugerencias o algun sample aunque sea sencillo, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
oMETER EN CELDAS DE xBROWSE
Jose Luis, en ese ejemplo [code=fw:20qxdoye]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   :<span style="color: #000000;">SetProgBar</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> || nMaxSal <span style="color: #000000;">&#125;</span>,, <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> nProgClr, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:20qxdoye] Podrías probar asi: nMaxSal sería el total de registros de esa base de datos en el proceso de backup debes actualizar el número del registro en el que te encuentras, en la celda ( de la columna donde se define el progres bar ) correspondiente a esa base de datos y realizar un refresh del browse Es una idea
oMETER EN CELDAS DE xBROWSE
[quote="cnavarro":lut7b4nc]Jose Luis, en ese ejemplo [code=fw:lut7b4nc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   :<span style="color: #000000;">SetProgBar</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> || nMaxSal <span style="color: #000000;">&#125;</span>,, <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> nProgClr, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:lut7b4nc] Podrías probar asi: nMaxSal sería el total de registros de esa base de datos en el proceso de backup debes actualizar el número del registro en el que te encuentras, en la celda ( de la columna donde se define el progres bar ) correspondiente a esa base de datos y realizar un refresh del browse Es una idea[/quote:lut7b4nc] Algo parecido es lo que pense, lo que veo es que tengo que hacer refresh por cada registro.? no se si eso traeria algun problema de consumo de memoria o lentitud en el proceso de backup, igual hay que ir intentando, crei seria mas facil colocar un oMeter y se ejecutara dentro de la celda, si lo veo muy complicado entonces creare un solo oMeter donde le actualizaria los datos en base a la cantidad de registros de cada tabla, me gusta la idea que quiero ya que es lo que veo en los administradores de descarga, con la unica diferencia es que no serian METER simultaneos si no consecutivos, cuando finalice uno, se inicia el otro hasta que llegue a la ultima tabla, alli les dejo esa idea a los GURU de xBrowse haber si alguien se anima y se crea ese sistema de respaldo, a mMr. RAO, haber su opinion que tan dificil o factible seria hacer lo que sugiero, saludos, gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
oMETER EN CELDAS DE xBROWSE
Please try this sample and adopt to your situation [code=fw:35y6y78g]<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: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont, n<br />   <span style="color: #00C800;">local</span> nProgClr := RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">161</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   XBrNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'E'</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">20</span><br />      AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"File-"</span> + StrZero<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br />   <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;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">360</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dynamic Progress Bars with XBrowse"</span> ;<br />      <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-60</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE aData COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>, <span style="color: #000000;">4</span> ;<br />      HEADERS <span style="color: #ff0000;">"FileName"</span>, <span style="color: #ff0000;">"Progress"</span>, <span style="color: #ff0000;">"Complete"</span>, <span style="color: #ff0000;">"Total"</span> ;<br />      COLSIZES <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> ;<br />      CELL LINES NOBORDER<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">lDisplayZeros</span>    := .f.<br />      :<span style="color: #000000;">lHScroll</span>         := .f.<br />      :<span style="color: #000000;">lVScroll</span>         := .f.<br />      :<span style="color: #000000;">bClrSel</span>          := :<span style="color: #000000;">bClrSelFocus</span><br />      :<span style="color: #000000;">nStretchCol</span>      := <span style="color: #000000;">2</span><br />      WITH OBJECT :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         :<span style="color: #000000;">nDataStrAlign</span>  := AL_CENTER<br />         :<span style="color: #000000;">SetProgBar</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span>,, <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> nProgClr, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />         :<span style="color: #000000;">cEditPicture</span>  := <span style="color: #ff0000;">"999.99 %"</span><br />         :<span style="color: #000000;">bClrSel</span> := :<span style="color: #000000;">bClrSelFocus</span> := oBrw:<span style="color: #000000;">bClrStd</span><br />      END<br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   @ <span style="color: #000000;">310</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Start"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> DoProcess<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">310</span>,<span style="color: #000000;">140</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cancel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Cargo</span> := .f.<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> DoProcess<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n, i, nTotal<br /><br />   oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw:<span style="color: #000000;">nLen</span><br /><br />      nTotal            := HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">2000</span> <span style="color: #000000;">&#41;</span><br />      oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>    := nTotal<br />      oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nTotal STEP <span style="color: #000000;">10</span><br />         SysWait<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0.01</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #B900B9;">// in case user disturbs the postion</span><br />         oBrw:<span style="color: #000000;">nArrayAt</span>  := n<br />         oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> := i / nTotal * <span style="color: #000000;">100</span><br />         oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> := i<br />         oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> oBrw:<span style="color: #000000;">Cargo</span> == .f.<br />            EXIT<br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">next</span><br />      <span style="color: #00C800;">if</span> oBrw:<span style="color: #000000;">Cargo</span> == .f.<br />         EXIT<br />      <span style="color: #00C800;">endif</span><br />      oBrw:<span style="color: #000000;">nArrayAt</span>  := n<br />      oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">100</span><br />      oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> := nTotal<br />      oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oBrw:<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 />&nbsp; &nbsp; oBrw:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">Cargo</span> == .f., <span style="color: #ff0000;">"CANCELLED"</span>, <span style="color: #ff0000;">"COMPLETED"</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">-20</span>, <span style="color: #000000;">-20</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"RB"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:35y6y78g]
oMETER EN CELDAS DE xBROWSE
[quote="nageswaragunupudi":39l7p2to]Please try this sample and adopt to your situation [code=fw:39l7p2to]<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: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont, n<br />   <span style="color: #00C800;">local</span> nProgClr := RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">161</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   XBrNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'E'</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">20</span><br />      AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"File-"</span> + StrZero<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br />   <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;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">360</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dynamic Progress Bars with XBrowse"</span> ;<br />      <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-60</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE aData COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>, <span style="color: #000000;">4</span> ;<br />      HEADERS <span style="color: #ff0000;">"FileName"</span>, <span style="color: #ff0000;">"Progress"</span>, <span style="color: #ff0000;">"Complete"</span>, <span style="color: #ff0000;">"Total"</span> ;<br />      COLSIZES <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> ;<br />      CELL LINES NOBORDER<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">lDisplayZeros</span>    := .f.<br />      :<span style="color: #000000;">lHScroll</span>         := .f.<br />      :<span style="color: #000000;">lVScroll</span>         := .f.<br />      :<span style="color: #000000;">bClrSel</span>          := :<span style="color: #000000;">bClrSelFocus</span><br />      :<span style="color: #000000;">nStretchCol</span>      := <span style="color: #000000;">2</span><br />      WITH OBJECT :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         :<span style="color: #000000;">nDataStrAlign</span>  := AL_CENTER<br />         :<span style="color: #000000;">SetProgBar</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span>,, <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> nProgClr, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />         :<span style="color: #000000;">cEditPicture</span>  := <span style="color: #ff0000;">"999.99 %"</span><br />         :<span style="color: #000000;">bClrSel</span> := :<span style="color: #000000;">bClrSelFocus</span> := oBrw:<span style="color: #000000;">bClrStd</span><br />      END<br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   @ <span style="color: #000000;">310</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Start"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> DoProcess<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">310</span>,<span style="color: #000000;">140</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cancel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Cargo</span> := .f.<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> DoProcess<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n, i, nTotal<br /><br />   oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw:<span style="color: #000000;">nLen</span><br /><br />      nTotal            := HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">2000</span> <span style="color: #000000;">&#41;</span><br />      oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>    := nTotal<br />      oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nTotal STEP <span style="color: #000000;">10</span><br />         SysWait<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0.01</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #B900B9;">// in case user disturbs the postion</span><br />         oBrw:<span style="color: #000000;">nArrayAt</span>  := n<br />         oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> := i / nTotal * <span style="color: #000000;">100</span><br />         oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> := i<br />         oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> oBrw:<span style="color: #000000;">Cargo</span> == .f.<br />            EXIT<br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">next</span><br />      <span style="color: #00C800;">if</span> oBrw:<span style="color: #000000;">Cargo</span> == .f.<br />         EXIT<br />      <span style="color: #00C800;">endif</span><br />      oBrw:<span style="color: #000000;">nArrayAt</span>  := n<br />      oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">100</span><br />      oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> := nTotal<br />      oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oBrw:<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 />    oBrw:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">Cargo</span> == .f., <span style="color: #ff0000;">"CANCELLED"</span>, <span style="color: #ff0000;">"COMPLETED"</span> <span style="color: #000000;">&#41;</span>, ;<br />            <span style="color: #000000;">&#123;</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">-20</span>, <span style="color: #000000;">-20</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"RB"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:39l7p2to][/quote:39l7p2to] Google Traslator: Mr Rao, Excellent work, I will start adapting it to what I need and then publish it to share with other colleagues who are interested in the subject, thank you very much... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
oMail:HTMLBody problem
Hi, I have a very strange problem with oMail:HTMLBody I allways used it without any problem. I have a customer that runs my program on a network. On 2 PC it's working fine, but on one PC the body is empty. All 3 PC's run the same EXE-file from the same SQL-database. All 3 PC's have the same outlook 365. The email-adres is filled correctly, also the subject and the attachements. Only the body is empty. The vHTMLText is also comming from the database, and is 3 times the same. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [quote:3bpfiykt]oMail:Subject = vTitel oMail:Attachments:Add( vBijlage ) oMail:HTMLBody = vHTMLText oMail:Display = .T. [/quote:3bpfiykt]
oMail:HTMLBody problem
[code=fw:2zbu45uu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> CDOSendMail<span style="color: #000000;">&#40;</span> aTabMail <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oEmailCfg, oEmailMsg<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">/* Tabmail<br />&nbsp; &nbsp;01 = MAILSERVER &nbsp;// A correct mail server address<br />&nbsp; &nbsp;02 = MAILFROM &nbsp;// A valid originator of the message<br />&nbsp; &nbsp;03 = MAILTO &nbsp;// Who it is being sent to<br />&nbsp; &nbsp;04 = SUBJECT &nbsp;// The subect<br />&nbsp; &nbsp;05 = BODY &nbsp;// The body in text format<br />&nbsp; &nbsp;06 = ATTACHMENT &nbsp;// Attachment(s)<br />&nbsp; &nbsp;07 = BCC &nbsp;// Usually NIL &nbsp;NOT USED<br />&nbsp; &nbsp;08 = LAUTHORIZATION &nbsp;// T or F logical for authentication<br />&nbsp; &nbsp;09 = USERID pour MAILSERVER &nbsp;// The mail server Username<br />&nbsp; &nbsp;10 = PW &nbsp; &nbsp; pour MAILSERVER &nbsp;// The mail server password<br />&nbsp; &nbsp;11 = Mail port &nbsp; defaut = 25 &nbsp;// The port, default is 25, set to 465 for SSL<br />&nbsp; &nbsp;12 = Mail HTML page &nbsp;// An HTML page, usually not used<br />&nbsp; &nbsp;13 = ssl authentification &nbsp;// T or F logical for SSL<br />&nbsp; &nbsp;14 = Mail sender &nbsp;// Mail sender name &nbsp;NOT USED<br />&nbsp; &nbsp;15 = Organisation sender &nbsp;// Organization sender &nbsp;NOT USED<br />&nbsp; &nbsp;16 = Host &nbsp;// Host if needed &nbsp;NOT USED<br />&nbsp; &nbsp;*/</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; oEmailCfg := CREATEOBJECT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CDO.Configuration"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; WITH OBJECT &nbsp;oEmailCfg:<span style="color: #000000;">Fields</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserver"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := &nbsp; TRIM<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//"mail.xxxxxxxx.com"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserverport"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := &nbsp;aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">// 25</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusing"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">2</span> &nbsp; <span style="color: #B900B9;">// Remote SMTP = 2, local = 1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := &nbsp;aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">08</span><span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">// .T.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpusessl"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := &nbsp;aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusername"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := TRIM<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">09</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// &nbsp;"[email protected]"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendpassword"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := TRIM<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// "xxxxxx"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">30</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp;CATCH oError<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Could not create message configuration"</span> + <span style="color: #ff0000;">";"</span> &nbsp;+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Error: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"SubC: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"OSCode: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"SubSystem: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Message: "</span> + oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> .F.<br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;oError := <span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; oEmailMsg := CREATEOBJECT <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CDO.Message"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; WITH OBJECT oEmailMsg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Configuration</span> = &nbsp;oEmailCfg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">From</span> = aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">02</span><span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">//chr(34)+" Anser K.K. "+chr(34)+ "<[email protected]>" // This will be displayed in the From (The email id does not appear)</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">To</span> = TRIM<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// "[email protected]" &nbsp; &nbsp;// <----- &nbsp; Place the TO email address</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">Subject</span> = aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">04</span><span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">// "This is a Tst message"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">MDNRequested</span> = .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">TextBody</span> = &nbsp;TRIM<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">05</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nEle := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">AddAttachment</span><span style="color: #000000;">&#40;</span> ALLTRIM<span style="color: #000000;">&#40;</span> aTabMail<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>nEle<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// := AllTrim( aAttach[ nEle ] )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; &nbsp; oEmailMsg:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;CATCH oError<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Could not send message"</span> + <span style="color: #ff0000;">";"</span> &nbsp;+ CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Error: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"SubC: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"OSCode: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"SubSystem: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Message: "</span> + oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> .F.<br />&nbsp; &nbsp; <br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />&nbsp;<br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------------------------------------------------*</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SendMail<span style="color: #000000;">&#40;</span> oDlg, cSender, cPass, cDisplay, cReply, lSave, cTo, cCC, cSubject, cMsg, lReceipt, cAttach, lMsgInfo <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------------------------------------------------*</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oEmailCfg, oEmailMsg, oError, cHtml, cLine, n<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nSuccess<br /><br />&nbsp; &nbsp;nSuccess := <span style="color: #000000;">1</span><br /><br /><span style="color: #00C800;">DEFAULT</span> lReceipt := .T. , lMsgInfo := .F. , lSave := .T. , cAttach := <span style="color: #ff0000;">''</span>, cSubject := <span style="color: #ff0000;">''</span>, cDisplay := MEMVAR->coname, cMsg := <span style="color: #ff0000;">''</span>, cCC := <span style="color: #ff0000;">''</span>, ;<br />&nbsp; &nbsp; &nbsp; cReply := cSender, cGstNo := <span style="color: #ff0000;">''</span><br /><br />&nbsp; &nbsp;cMsg := alltrim<span style="color: #000000;">&#40;</span> cMsg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cHtml := <span style="color: #ff0000;">'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'</span><br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'<HTML><HEAD>'</span><br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'<META content="text/html; charset=windows-874" http-equiv=Content-Type>'</span><br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'<META name=GENERATOR content="MSHTML 8.00.6001.18783">'</span><br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'<STYLE></STYLE>'</span><br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'</HEAD>'</span><br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'<BODY bgColor=#ffffff>'</span><br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'<DIV>'</span><br /><br /><span style="color: #B900B9;">// cHtml += '<DIV><FONT size=2 color=blue face=Arial>Hello How are you ?</FONT></DIV></BODY></HTML>'</span><br /><br />&nbsp; &nbsp;cHtml += cMsg<br />&nbsp; &nbsp;cHtml += <span style="color: #ff0000;">'</DIV></BODY></HTML>'</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; oEmailCfg := CREATEOBJECT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CDO.Configuration"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; WITH OBJECT oEmailCfg:<span style="color: #000000;">Fields</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserver"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"smtp.gmail.com"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserverport"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">465</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusing"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">2</span> &nbsp; <span style="color: #B900B9;">// Remote SMTP = 2, local = 1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpusessl"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/savesentitems"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= lSave<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusername"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := cSender &nbsp;<span style="color: #B900B9;">// &nbsp;"[email protected]"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendpassword"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := cPass <span style="color: #B900B9;">// Password</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">60</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; END WITH<br /><br />&nbsp; &nbsp;CATCH oError<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> lMsgInfo<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgAlert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Could not send message"</span> + CRLF + &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Error: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + CRLF + &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SubC: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + CRLF + &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"OSCode: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + CRLF + &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SubSystem: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + CRLF + &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Message: "</span> + oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nSuccess := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;oError := <span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; oEmailMsg := CREATEOBJECT <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CDO.Message"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; WITH OBJECT oEmailMsg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Configuration</span> &nbsp;:= oEmailCfg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">From</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">34</span> <span style="color: #000000;">&#41;</span> + cDisplay + <span style="color: #ff0000;">" "</span> + chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">34</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<"</span> + cReply + <span style="color: #ff0000;">">"</span> <span style="color: #B900B9;">// cSender &nbsp;// This will be displayed in the From (The email id does not appear)</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">To</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := cTo &nbsp; <span style="color: #B900B9;">// "[email protected]" &nbsp; &nbsp;// <----- &nbsp; Place your email address</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">Subject</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= cSubject &nbsp;<span style="color: #B900B9;">// &nbsp; "Email Test Message from GMail"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">ReplyTo</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= cReply<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">MDNRequested</span> &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> !empty<span style="color: #000000;">&#40;</span> cAttach <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">AddAttachment</span><span style="color: #000000;">&#40;</span> cAttach <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">HTMLBody</span> = cHtml<br />&nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; &nbsp; oEmailMsg:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;CATCH oError<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> lMsgInfo<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgAlert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Could not send message"</span> + <span style="color: #ff0000;">";"</span> &nbsp;+ CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Error: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SubC: "</span> &nbsp;+ TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"OSCode: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SubSystem: "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Message: "</span> + oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> nSuccess<br />&nbsp;</div>[/code:2zbu45uu]
oMail:HTMLBody problem
[code=fw:3j75j73v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Enviando email com HARBOUR 3.2 by Rubens MDV Informatica e papelaria</span><br /><span style="color: #B900B9;">// Modificado Por: Joao Santos em: 12/12/2017 - Many Thanks Rubens.</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Mail.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"error.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fileio.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xHb.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcompat.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbssl.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aArquivo &nbsp;:= <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cAssunto &nbsp;:= <span style="color: #ff0000;">"PROGRAMA DO RUBENS-> NO MEU HARBOUR FUNCIONA."</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cMensagem := <span style="color: #ff0000;">"MENSAGEM DO EMAIL DO RUBENS"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cImagem &nbsp; := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lInformaEnvio := .T.<br /><br />&nbsp; &nbsp;Envia_Email<span style="color: #000000;">&#40;</span> aArquivo, cAssunto, cMensagem, lInformaEnvio <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Envia_Email<span style="color: #000000;">&#40;</span> aArquivo, cAssunto, cMensagem, cImagem, lInformaEnvio <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lOk := .T.<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> AFILES, CSUBJECT, AQUEM, CMSG, CSERVERIP, CFROM, CUSER, CPASS, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VPORTSMTP, ACC, ABCC, LCONF, LSSL<br /><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @aArquivo, <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @cAssunto, <span style="color: #ff0000;">"XML e PDF de Nota Fiscal"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @cMensagem, <span style="color: #ff0000;">"Envio de Email"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @cImagem, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @lInformaEnvio, .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//hb_Default(@cFrom,"MDV Informatica e papelaria ")</span><br /><br /><span style="color: #B900B9;">//hb_Default(@aQuem,"Rubens - MDV Informatica - Hotmail ")</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;aFiles &nbsp; &nbsp;:= aArquivo <span style="color: #B900B9;">// pode ser uma matriz com vários endereços</span><br />&nbsp; &nbsp;cSubject := cAssunto<br />&nbsp; &nbsp;aQuem &nbsp; &nbsp; := <span style="color: #ff0000;">"[email protected]"</span> &nbsp;<span style="color: #B900B9;">// cFrom</span><br />&nbsp; &nbsp;cMsg &nbsp; &nbsp; := cMENSAGEM<br />&nbsp; &nbsp;cServerIp := <span style="color: #ff0000;">"smtp.mail.gmail.com"</span> &nbsp; <span style="color: #B900B9;">// servidor smtp</span><br />&nbsp; &nbsp;cFrom &nbsp; &nbsp; := <span style="color: #ff0000;">"[email protected]"</span><br />&nbsp; &nbsp;cUser &nbsp; &nbsp; := <span style="color: #ff0000;">"[email protected]"</span> &nbsp;<span style="color: #B900B9;">// cEMAIL</span><br />&nbsp; &nbsp;cPass &nbsp; &nbsp; := <span style="color: #ff0000;">"mypassword"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// cSENHAEMAIL</span><br />&nbsp; &nbsp;vPORTSMTP := <span style="color: #000000;">587</span><br />&nbsp; &nbsp;aCC &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;aBCC &nbsp; &nbsp; := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;lConf &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp;lSSL &nbsp; &nbsp; := .F. &nbsp;<span style="color: #B900B9;">// OR .T.</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;lOk := Config_Mail<span style="color: #000000;">&#40;</span> aFiles, ;<br />&nbsp; &nbsp; &nbsp; cSubject, ;<br />&nbsp; &nbsp; &nbsp; aQuem, ;<br />&nbsp; &nbsp; &nbsp; cMsg, ;<br />&nbsp; &nbsp; &nbsp; cServerIp, ;<br />&nbsp; &nbsp; &nbsp; cFrom, ;<br />&nbsp; &nbsp; &nbsp; cUser, ;<br />&nbsp; &nbsp; &nbsp; cPass, ;<br />&nbsp; &nbsp; &nbsp; vPORTSMTP, ;<br />&nbsp; &nbsp; &nbsp; aCC, ;<br />&nbsp; &nbsp; &nbsp; aBCC, ;<br />&nbsp; &nbsp; &nbsp; lConf, ;<br />&nbsp; &nbsp; &nbsp; lSSL, ;<br />&nbsp; &nbsp; &nbsp; cImagem, ;<br />&nbsp; &nbsp; &nbsp; lInformaEnvio <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> lOk<br /><br /><span style="color: #B900B9;">//*******************************************************************************</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Config_Mail<span style="color: #000000;">&#40;</span> aFiles, cSubject, aQuem, cMsg, cServerIp, cFrom, cUser, cPass, vPORTSMTP, aCC, aBCC, lConf, lSSL, cImagem, lInformaEnvio <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lRet<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oCfg, oErroMail<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lAut := .T.<br />&nbsp;<br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @cImagem, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @lInformaEnvio, .T. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; oCfg := win_OleCreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CDO.Configuration"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; WITH OBJECT oCfg:<span style="color: #000000;">Fields</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserver"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; := cServerIp<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserverport"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; := vPORTSMTP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusing"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := lAut<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpusessl"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; &nbsp; := lSSL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusername"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; := AllTrim<span style="color: #000000;">&#40;</span> cUser <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendpassword"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> &nbsp; &nbsp; := AllTrim<span style="color: #000000;">&#40;</span> cPass <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; &nbsp; lRet := .T.<br />&nbsp; &nbsp;CATCH oErroMail<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> lInformaEnvio<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HB_ALERT<span style="color: #000000;">&#40;</span> WIN_OEMTOANSI<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NÆo foi poss¡vel enviar o e-mail!"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + hb_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Error: "</span> &nbsp;+ Transform<span style="color: #000000;">&#40;</span> oErroMail:<span style="color: #000000;">GenCode</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + hb_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SubC: "</span> &nbsp; + Transform<span style="color: #000000;">&#40;</span> oErroMail:<span style="color: #000000;">SubCode</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + hb_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"OSCode: "</span> &nbsp;+ Transform<span style="color: #000000;">&#40;</span> oErroMail:<span style="color: #000000;">OsCode</span>, &nbsp;<span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + hb_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SubSystem: "</span> + Transform<span style="color: #000000;">&#40;</span> oErroMail:<span style="color: #000000;">SubSystem</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">";"</span> + hb_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Mensagem: "</span> + oErroMail:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"Aten‡Æo"</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">10000</span>, <span style="color: #000000;">2</span>, .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; lRet := .F.<br /><br />&nbsp; &nbsp;END<br /><br /><span style="color: #B900B9;">//--> FIM DAS CONFIGURAÇOES.</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lRet<br />&nbsp; &nbsp; &nbsp; lRet := Envia_Mail<span style="color: #000000;">&#40;</span> oCfg, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cFrom, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aQuem, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFiles, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSubject, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cMsg, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aCC, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aBCC, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lConf, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lAut, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lSSL, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cServerIp, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cImagem, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lInformaEnvio <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> lRet<br /><br /><span style="color: #B900B9;">//*******************************************************************************</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Envia_Mail<span style="color: #000000;">&#40;</span> oCfg, cFrom, cDest, aFiles, cSubject, cMsg, aCC, aBCC, vEmaiL_Conf, lAut, lSSL, cServerIp, cImagem, lInformaEnvio <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> I, OMSG, X<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aTo<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lRet<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nEle, oErroMail<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cImagem1 := <span style="color: #ff0000;">''</span><br /><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @cImagem, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_Default<span style="color: #000000;">&#40;</span> @lInformaEnvio, .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// hb_Default(@cMsgTela, 'Enviando Email !!! Aguarde ...')</span><br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !Empty<span style="color: #000000;">&#40;</span> cImagem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cImagem1 := <span style="color: #ff0000;">''</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;aTo &nbsp; := <span style="color: #000000;">&#123;</span> cDest <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">//--> PARA</span><br />&nbsp;<br />&nbsp; &nbsp;nEle := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">&#40;</span> aTo <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">TRY</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// MOSTRA_Email(cMsgTela)</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> lInformaEnvio<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Aguarde, processando o envio do email."</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oMsg := win_OleCreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CDO.Message"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oMsg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Configuration</span> := oCfg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #0000ff;">From</span> &nbsp; &nbsp; := cFrom<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #0000ff;">To</span> &nbsp; &nbsp; &nbsp;:= aTo<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Cc</span> &nbsp; &nbsp; &nbsp;:= aCC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">BCC</span> &nbsp; &nbsp; := aBCC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #0000ff;">Subject</span> &nbsp; := cSubject<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// ---------------------------------------------------------</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Aqui adiciona a imagem ao corpo da mensagem</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// ---------------------------------------------------------</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !Empty<span style="color: #000000;">&#40;</span> cImagem <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">AddRelatedBodyPart</span><span style="color: #000000;">&#40;</span> hb_DirBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"img"</span> + hb_PS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + cImagem, cImagem, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Fields</span>:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"urn:schemas:mailheader:Content-ID"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"<"</span> + cImagem + <span style="color: #ff0000;">">"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Fields</span>:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"urn:schemas:mailheader:Content-Disposition"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"inline"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">Fields</span>:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">HTMLBody</span> := cMsg <span style="color: #B900B9;">// + QuebraHTML + IF(!Empty(cImagem), cImagem1, "")</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> X := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">&#40;</span> aFiles <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">AddAttachment</span><span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> aFiles<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//DO EVENTS</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"urn:schemas:mailheader:disposition-notification-to"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := cFrom<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := lAut<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpusessl"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := lSSL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserver"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := cServerIp<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Fields</span>:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//DO EVENTS</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END WITH<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> lInformaEnvio<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// MOSTRA_Email("E-mail enviado com sucesso !!!")</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"E-mail enviado com sucesso!!! Com o Programa do Rubens!"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; millisec<span style="color: #000000;">&#40;</span> <span style="color: #000000;">500</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// HB_ALERT("E-mail enviado com sucesso", "Aten‡Æo")</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRet := .T.<br /><br />&nbsp; &nbsp; &nbsp; CATCH oErroMail<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> lInformaEnvio<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Não foi possível enviar a mensagem: "</span> + cSubject + hb_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"para o email: "</span> + aTo<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">"."</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ hb_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Erro: "</span> + oErroMail:<span style="color: #000000;">Description</span> , <span style="color: #ff0000;">"Atenção"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRet := .F.<br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp;<br />&nbsp; &nbsp;oCfg := <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp;oMsg := <span style="color: #00C800;">Nil</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> lRet<br /><br /><span style="color: #B900B9;">//*******************************************************************************</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MENSAG<span style="color: #000000;">&#40;</span> cTEXTO <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> ALERT<span style="color: #000000;">&#40;</span> cTEXTO <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//*******************************************************************************</span><br /><br /><span style="color: #00C800;">FUNCTION</span> StringToArray<span style="color: #000000;">&#40;</span> cString, cSeparator <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nPos<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aString := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;cSeparator := <span style="color: #ff0000;">";"</span><br />&nbsp; &nbsp;cString := ALLTRIM<span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span> + cSeparator<br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br />&nbsp; &nbsp; &nbsp; nPos := <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> cSeparator, cString <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> nPos = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; AADD<span style="color: #000000;">&#40;</span> aString, <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span> cString, <span style="color: #000000;">1</span>, nPos - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cString := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span> cString, nPos + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> aString <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #B900B9;">//*******************************************************************************</span><br /><br /><span style="color: #00C800;">FUNCTION</span> ArrayToString<span style="color: #000000;">&#40;</span> aArray, cSeparator <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nPos, cString<br /><br />&nbsp; &nbsp;cSeparator := <span style="color: #ff0000;">";"</span><br /><br />&nbsp; &nbsp;cString := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nPos = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cString := cString + aArray<span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span> + cSeparator<br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//*******************************************************************************</span><br /><br />&nbsp;</div>[/code:3j75j73v]
oMail:HTMLBody problem
[code=fw:16jv9aaj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Exemplo de como se usa outlook do windows.</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> _cTo &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Para</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> _cComCopia &nbsp; &nbsp;<span style="color: #B900B9;">// com copia</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> _cAttach &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Anexos</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> _cSubject &nbsp; &nbsp; <span style="color: #B900B9;">// Texto do email</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> _cBody &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Corpo do Email</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> _cHtml &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Nao sei quem e...</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> _nProvedor &nbsp; &nbsp;<span style="color: #B900B9;">// nao sei quem e</span><br /><br />&nbsp; &nbsp;_cTo &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"[email protected]"</span><br /><br />&nbsp; &nbsp;_cComCopia := <span style="color: #ff0000;">"[email protected]"</span><br /><br />&nbsp; &nbsp;_cAttach &nbsp; := <span style="color: #ff0000;">""</span> &nbsp;<span style="color: #B900B9;">// Mostre como anexar</span><br /><br />&nbsp; &nbsp;_cSubject &nbsp;:= <span style="color: #ff0000;">"Envio do Arquivo Xml da Nfe"</span><br /><br />&nbsp; &nbsp;_cBody &nbsp; &nbsp; := <span style="color: #ff0000;">"Corpo do Email usando outlook"</span><br /><br />&nbsp; &nbsp;_cHtml &nbsp; &nbsp; := <span style="color: #ff0000;">""</span> <span style="color: #B900B9;">// Nao sei quem e...</span><br /><br />&nbsp; &nbsp;_nProvedor := <span style="color: #ff0000;">""</span> <span style="color: #B900B9;">// nao sei quem e</span><br /><br />&nbsp; &nbsp;Marca_EnvioEmailOutLook<span style="color: #000000;">&#40;</span> _cTo, _cComCopia, _cAttach, _cSubject, _cBody, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cHtml, _nProvedor <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />****************************************************************************************************************************************************************<br /><span style="color: #00C800;">FUNCTION</span> Marca_EnvioEmailOutLook<span style="color: #000000;">&#40;</span> _cTo, _cComCopia, _cAttach, _cSubject, _cBody, _cHtml, _nProvedor <span style="color: #000000;">&#41;</span><br />****************************************************************************************************************************************************************<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oOutlook, oMail, oPub <span style="color: #B900B9;">//??</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nEle<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cArquivoAtach<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br /><br />&nbsp; &nbsp; &nbsp; oOutLook := GetActiveObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Outlook.Application"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;CATCH<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">TRY</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oOutLook := CREATEOBJECT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Outlook.Application"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* Ver a necessecidade desta linha abaixo<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*oNameSpace := oOutlook:<span style="color: #000000;">GetNameSpace</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"MAPI"</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; CATCH<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Não foi possivel encontrar o Microsoft Outlook Instalado, Favor revisar"</span>,<span style="color: #ff0000;">"ATENÇÃO"</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> .F.<br /><br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oMail:Display := .T. Abre a tela do Microsoft Outlook antes de enviar</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oMail:Display := .F. Pisca a tela do outlook mais nao abre e vai direto pro emsil</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Caso comente esta variavel vai direto pro outlook sem chamar tela nenhuma e envia o email</span><br /><br />&nbsp; &nbsp;oMail &nbsp; &nbsp; &nbsp; &nbsp; := oOutLook:<span style="color: #000000;">CreateItem</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oMail:<span style="color: #0000ff;">Subject</span> := Alltrim<span style="color: #000000;">&#40;</span>_cSubject<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oMail:<span style="color: #000000;">Body</span> &nbsp; &nbsp;:= AllTrim<span style="color: #000000;">&#40;</span>_cBody<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;_cTo &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= AllTrim<span style="color: #000000;">&#40;</span>StrTran<span style="color: #000000;">&#40;</span>_cTo,<span style="color: #ff0000;">","</span>,<span style="color: #ff0000;">";"</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oMail:<span style="color: #0000ff;">To</span> &nbsp; &nbsp; &nbsp;:= _cTo<br /><br />&nbsp; &nbsp;* Tambem pode ser usado assim<br />&nbsp; &nbsp;*nEle := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;*<span style="color: #00C800;">While</span> !Empty<span style="color: #000000;">&#40;</span> cTo := StrToken<span style="color: #000000;">&#40;</span> _cTo, nEle++, <span style="color: #ff0000;">";"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;* &nbsp;oMail:<span style="color: #000000;">Recipients</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> Alltrim<span style="color: #000000;">&#40;</span> cTo <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;* &nbsp;SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;*<span style="color: #00C800;">EndDo</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !Empty<span style="color: #000000;">&#40;</span> _cAttach <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// Anexos aqui</span><br /><br />&nbsp; &nbsp; &nbsp; nEle := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">While</span> !Empty<span style="color: #000000;">&#40;</span> cArquivoAtach := StrToken<span style="color: #000000;">&#40;</span> _cAttach, nEle++, <span style="color: #ff0000;">","</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oMail:<span style="color: #000000;">Attachments</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span>cArquivoAtach<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndDo</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !Empty <span style="color: #000000;">&#40;</span> _cComCopia <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oMail:<span style="color: #000000;">CC</span> := Alltrim<span style="color: #000000;">&#40;</span>_cComCopia<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// nao entendi isso, nem tenho...</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> File<span style="color: #000000;">&#40;</span>oPub:<span style="color: #000000;">wPathSys</span> + <span style="color: #ff0000;">"ACOMPANHAEMAIL.ARQ"</span><span style="color: #000000;">&#41;</span> .AND. _nProvedor = <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !Empty<span style="color: #000000;">&#40;</span>Setup->EmailUser<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Copia Oculta</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oMail:<span style="color: #000000;">BCC</span> := AllTrim<span style="color: #000000;">&#40;</span>Setup->EmailUser<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !Empty<span style="color: #000000;">&#40;</span> _cHtml <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Testar com html</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Dica <!-- m --><a class="postlink" href="http://fivewin.com.br/index.php?/topic/24468-falta-pouco-para-o-email-ficar-legal-alguem-ajuda/#comment-273115">http://fivewin.com.br/index.php?/topic/ ... ent-273115</a><!-- m --></span><br /><br />&nbsp; &nbsp; &nbsp; oMail:<span style="color: #000000;">HTMLBody</span> := MEMOREAD<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>_cHtml<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;oMail:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br />&nbsp;</div>[/code:16jv9aaj] 
oMail:HTMLBody problem
[url:9amdgdwo]http&#58;//fivewin&#46;com&#46;br/index&#46;php?/topic/24468-falta-pouco-para-o-email-ficar-legal-alguem-ajuda/#comment-273115[/url:9amdgdwo] Regards.
oMail:HTMLBody problem
The problem is solved, after updating Windows <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
oMenu acts differently in February build
Antonio, it seems the menu items move a little to the right when there is a submenu attached to it, is this intentionally? Saludos, John.
oMenu acts differently in February build
John, It is a side effect caused by a recent change. Please search for this code in classes\menu.prg and change it as shown: ( /* .f. .and. */ IsWinNT() .and. ! lRoot .and. ! ::lSysMenu ),;