topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
getcommerror como tratar el resultado? | Ok, però, se io ho questa catena (lunga 12 caratteri) con il risultato come faccio a sapere per esempio se la porta aspetta il CTS?
cComStat := "€\{ "
#define CSTF_CTSHOLD 1 // 0x01
devo fare cosi?
nAnd( cComStat, CSTF_CTSHOLD )
o con il primo carattere della catena, o quale?
Grazie. |
getcommerror como tratar el resultado? | Devi considerare ogni carattere come se fosse un byte. Quindi, dato il formato della struttura, immagino che si debbano prendere in considerazione solo i primi 5 caratteri. Il primo sarebbe status, il secondo e il terzo sarebbe cbInQue e il quarto e il quinto sarebbe cbOutQue.
Nel tuo caso lo status dovrebbe essere 128 che starebbe ad indicare che tutti i flags sono a zero (l'unico bit posto ad uno non fa parte dei bit utilizzati).
EMG |
getcommerror como tratar el resultado? | Grazie. |
getcurdir() y cgetfile() | Hola a todos,
el siguiente código:
Msgalert('Paso1: ' + getcurdir() )
cdesti := cGetFile('Archivos Excel (*.xls) | *.xls','Guardar libro',,,.t.,.t.,2,cname)
Msgalert('Paso2: ' + getcurdir() )
En el paso 1 me muestra el directorio de la aplicación, pero en el paso 2 me muestra la carpeta que haya elegido en el dialogo de seleccionar el fichero. Es decir cgetfile() cambia el valor del directorio actual. ¿ Existe manera de evitar esto ? o al menos una functión del tipo setcurdir() a la que pueda llamar inmediatamente después. Por ejemplo si tras un cgetfile() ocurre un error, el fichero .log me lo graba en la carpeta seleccionada en cGetfile() en vez de en la carpeta de la aplicación. Incluso cambia el SET DEFAULT TO, aunque esto lo puedo arreglar guardando el valor de getcurdir() en una variable al iniciar la aplicación y luego SET DEFAULT TO &variable, pero no en el caso de ficheros que quiero guardar automáticamente en la carpeta de la aplicación.
En FW16 con cgetfile32() no se cambiaba el valor del directorio actual y el mismo código devuelve en los dos pasos el mismo valor.
Saludos |
getcurdir() y cgetfile() | talbéz:
[code=fw:1a79ifnu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> cPath := CURDRIVE<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">":<span style="color: #000000;">\"</span> + GETCURDIR()<br /></span></div>[/code:1a79ifnu] |
getcurdir() y cgetfile() | Para obtener el directorio de la aplicacion deberias acerlo así:
[code=fw:30yfxvsh]<div class="fw" id="{CB}" style="font-family: monospace;">Msgalert<span style="color: #000000;">(</span><span style="color: #ff0000;">'Paso2: '</span> + cFilePath<span style="color: #000000;">(</span> GetModuleFileName<span style="color: #000000;">(</span> GetInstance<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:30yfxvsh] |
getcurdir() y cgetfile() | Bueno, gracias por contestar, pero no se si me he explicado bien.
No se trata de obtener el path de la aplicación, de lo que se trara es de que curdir() devuelva lo mismo antes y después de llamar a cgetfile(), o si no hay más remedio, alguna función para que curdir() devuelva el path de la aplicación. Muchas funciones, tanto mias como de FW/Harbour, graban ficheros provisionales o de otro tipo en la carpeta de la aplicación sin indicarle en que carpeta debe crear esos ficheros, ya que por defecto se crean en la carpeta de la aplicación, lo mismo que hace por ejemplo MemoWrit() si como primer parámetro solo se le pasa un nombre de un fichero sin ruta.
Si tras llamar a cgetfile() provocamos un error, la llamada a memowrit() que hay en errsysw.prg, no crea el fichero error.log en la carpeta de la aplicación como debería ser, se crea en la carpeta seleccionada en cgetfile() y creo que eso no debería ser así. Este comprotamiento no ocurría en Clipper/FW16, donde siempre se guarda el fichero error.log en la carpeta de la aplicación, aunque hayamos usado cgetfile(). Lo de memowrit() es solo un ejemplo, ocurre con otras muchas funciones.
Saludos |
getcurdir() y cgetfile() | Creo sea esto:
[code=fw:266fhgcd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> XBLITE<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//->MAIN()</span><br /><br /> MEMVAR cPRGPATH, cFILEPATH<br /><br /> cPRGPATH := cFILEPATH<span style="color: #000000;">(</span>GETMODULEFILENAME<span style="color: #000000;">(</span>GETINSTANCE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> XBACKUPLITE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> lCHDIR<span style="color: #000000;">(</span>cPRGPATH<span style="color: #000000;">)</span> <span style="color: #B900B9;">//-> aca vuelve al directorio inicial.</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:266fhgcd] |
getcurdir() y cgetfile() | Gracias Karinha,
La función lchdir() es la que buscaba (nunca hasta ahora había tenido necesidad de utilizarla).
Pero insisto en que cgetfile() no debería cambiar el path (también cambia el SET DEFAULT), en su lugar me he hecho una functión llamada Getfile(), para sustiruirla:
function Getfile(cFileMask, cTitle, nDefaultMask, cInitialDirectory, lSave, nFlags, cInitialFile )
local cPRGPATH := cFILEPATH(GETMODULEFILENAME(GETINSTANCE())), sal := ''
sal := cGetfile(cFileMask, cTitle, nDefaultMask, cInitialDirectory, lSave, nFlags, cInitialFile )
lCHDIR(cPRGPATH)
SET DEFAULT TO //Mis dbfs están en el mismo directorio que la aplicación
return sal
Saludos |
getftime() does not work...Heres a workaround | I contacted james Bott to check my concern that getFtime() produces the wrong time.
His was off 16hrs mine was 8 hrs. Thanks to james here is a workaround.
[code=fw:25g1sqz5]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// File time</span><br /><span style="color: #B900B9;">// Returns nil if cFile not found</span><br /><span style="color: #00C800;">function</span> ftime<span style="color: #000000;">(</span>cFile<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> aDir,cTime<br /> <span style="color: #00C800;">if</span> cFile != <span style="color: #00C800;">nil</span><br /> aDir:= directory<span style="color: #000000;">(</span>cFile<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> len<span style="color: #000000;">(</span>aDir<span style="color: #000000;">)</span> = <span style="color: #000000;">1</span><br /> cTime:= aDir<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> cTime<br /> <br /><span style="color: #B900B9;">// File date</span><br /><span style="color: #B900B9;">// Returns nil if file not found</span><br /><span style="color: #00C800;">function</span> fdate<span style="color: #000000;">(</span>cFile<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> aDir,dDate<br /> <span style="color: #00C800;">if</span> cFile != <span style="color: #00C800;">nil</span><br /> aDir:= directory<span style="color: #000000;">(</span>cFile<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> len<span style="color: #000000;">(</span>aDir<span style="color: #000000;">)</span> = <span style="color: #000000;">1</span><br /> dDate:= aDir<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> dDate</div>[/code:25g1sqz5]
Happy New Year to all. |
getip() returen 0.0.0.0 | Estimados
La funcion GetIp() return 0.0.0.0 cuando la direccion es estatica, hay alguna manera de repararlo
adjunto la funcion
[code=fw:3cu1bdb8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETIP <span style="color: #000000;">)</span> <span style="color: #B900B9;">// nSocket</span><br /><span style="color: #000000;">{</span><br /> SOCKADDR_IN sa;<br /> int iLen = sizeof<span style="color: #000000;">(</span> sa <span style="color: #000000;">)</span>;<br /> BYTE addr<span style="color: #000000;">[</span> <span style="color: #000000;">20</span> <span style="color: #000000;">]</span>;<br /> #ifdef UNICODE<br /> LPWSTR pW1, pW2;<br /> #endif <br /><br /> memset<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> &sa, <span style="color: #000000;">0</span>, sizeof<span style="color: #000000;">(</span> sa <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> getsockname<span style="color: #000000;">(</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">(</span> SOCKADDR * <span style="color: #000000;">)</span> &sa, &iLen <span style="color: #000000;">)</span>;<br /> strcpy<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> addr, <span style="color: #ff0000;">"error"</span> <span style="color: #000000;">)</span>;<br /><br /> #ifndef UNICODE<br /> wsprintf<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> addr, <span style="color: #ff0000;">"%i.%i.%i.%i"</span>,<br /> <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_net, <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_host,<br /> <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_lh, <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_impno <span style="color: #000000;">)</span>;<br /> #else<br /> pW1 = AnsiToWide<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> addr <span style="color: #000000;">)</span>; <br /> pW2 = AnsiToWide<span style="color: #000000;">(</span> <span style="color: #ff0000;">"%i.%i.%i.%i"</span> <span style="color: #000000;">)</span>;<br /> wsprintf<span style="color: #000000;">(</span> pW1, pW2,<br /> <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_net, <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_host,<br /> <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_lh, <span style="color: #000000;">(</span> BYTE <span style="color: #000000;">)</span> sa.sin_addr.s_impno <span style="color: #000000;">)</span>;<br /> hb_xfree<span style="color: #000000;">(</span> pW1 <span style="color: #000000;">)</span>;<br /> hb_xfree<span style="color: #000000;">(</span> pW2 <span style="color: #000000;">)</span>;<br /> #endif <br /><br /> hb_retc<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> addr <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /> </div>[/code:3cu1bdb8] |
getip() returen 0.0.0.0 | Estimados
lo he resuelto con la funcion
[b:1xjahryk]GetNetCardInfo()[/b:1xjahryk] |
getip() returen 0.0.0.0 | gracias por compartirlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
getip() returen 0.0.0.0 | Buen dia Patricio
Una consulta, De donde puedo bajar esa funcion GetNetCardInfo(), pues al compilar me sale error
Gracias
Lubin |
getip() returen 0.0.0.0 | [quote="lubin":3t8r2x95]Buen dia Patricio
Una consulta, De donde puedo bajar esa funcion GetNetCardInfo(), pues al compilar me sale error
Gracias
Lubin[/quote:3t8r2x95]
C:\FWH..\SAMPLES\GETMAC.PRG
salu2. |
getip() returen 0.0.0.0 | Gracias Patricio
Pero lamentablemente <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> creo que mi version no la incluye, no cuento con esa carpeta en Samples,
Alguna otra alternativa usando harbour
Lubin |
getip() returen 0.0.0.0 | <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=21651">viewtopic.php?f=3&t=21651</a><!-- l -->
Salu2 |
getkeystate(16) es para el shift cual numero es para altGr | getkeystate(16) es para el shift, cual numero es para altGr ?
Si alguien tine la respuesta Muchas Gracias y si no la tiene
tambien Gracias por participar! |
getkeystate(16) es para el shift cual numero es para altGr | ya lo encontre es el 18 <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> |
gets.. eval... lostfocus.. | Hola.
Tengo un array de oGets que necesito acumular los valores pero solo de ciertos ogets cuando pierde el foco:
[quote:1wgy6rd7]aeval(::aGets, { |o, x| iif(x in {1,4,6}, ::sumar(),)})[/quote:1wgy6rd7]
ahora no puedo usar mas el "in" en harbourd...
Alguna ayuda?
gracias. |
gets.. eval... lostfocus.. | "in" ???
Un ejemplo simples, para testes, hay?
Regards, saludos. |
gets.. eval... lostfocus.. | No recuerdo si in es aceptado en harbour,
talvez agregando la libreria xhb y hbcompat.ch |
gets.. eval... lostfocus.. | termino de intentarlo pero no da.
Karina: suponte que tenes un array con estos valores
1, 4, 6, 7
y vos queres saber si un numero "x" existe en ese array, en xharbor yo hacia esto:
[code=fw:6pw8mm4c]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> x in <span style="color: #000000;">{</span><span style="color: #000000;">1</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">7</span> <span style="color: #000000;">}</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"existe"</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /> </div>[/code:6pw8mm4c]
pero ahora veo que en harbour eso no puedo hacerlo. |
gets.. eval... lostfocus.. | Usa hb_ascan() si existe te devuelve la posicion si no 0
if hb_ascan(...) > 0
msg( "existe" ) |
getting started with linux (fwlinux) | Hello ,
I plan to start working with Linux and fw
i have no linux equipment at all at the moment. I have vista and xp pcs,
i would like your advice, a new computer dedicated to linux ? what capacity memory, hard disk ?
an external bootable hd where a linux system is installed can be another option ?
Is there a way to have dual boots on a computer
Sorry to ask all those questions but i prefer taking good advices before starting and i am sure you habe been through this before.
Thanks for your time,
Richard |
getting started with linux (fwlinux) | Richard,
There are several possibilities as you comment.
My advise is to add a new internal harddisk and use it for Linux, having dual boot. Its quite easy to do it, and then you can run Linux with its real speed (no emulators, etc.).
In my computers I use five different operating systems (in three different harddisks) so I know a little about multiple boots <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Open your computer and disconnect the Windows harddisk. Thats the safest option to proceed. Then plug the new harddisk on a different connector (i.e. if you use SATA1 for Windows, use SATA2 for Linux).
Then download Ubuntu (1 CD) and boot from it (live) and it shows an option to install it on the harddisk (its an icon in the desktop). Do it. Once Ubuntu is installed and running, (turn off the computer) go and plug again the Windows harddisk.
Now you can choose to boot from Windows and jump to Linux from Windows boot, or viceversa, boot from Linux and jump to Windows. Both options are fine. I prefer to use Linux boot as it is more friendly.
If your Windows harddisk is the one that you use for development, always do a backup first for security reasons. There will be no risks, but do it, anyhow. |
getting started with linux (fwlinux) | Hi RichardWelcome to the club!Dual booting works OK but at the price of PC hardware these days why not just use a separate PC to run linux if you are going to use it a fair bit.Are you planning to migrate existing FiveWin code to FiveLinux? There are a few differences (depending upon how you coded in FiveWin) and a few less features.For example the PIXEL clause is not supported, but its easy to add if you want to. I have added a number of additional features (with Antonio's help) that may or may not be useful to you.The more of us using FiveLinux the more time Antonio can spend on it and the more user code can be contributed.RegardsDoug(xProgrammer) |
getting started with linux (fwlinux) | Hi DougYes i intend to join the club,I will purchase a new hardware this week for this purpose. I am brand new to linux i will certainely have "beginners" questions, bare with me.I intend to port my application (if possible) to have a linux version. This is the ultimate objective.I will certainely be looking forward for your help,RegardsRichard |
getting started with linux (fwlinux) | Doug,The pixel clause is supported since long time ago <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Please review my other post related with this issue, thanks |
getting unresolved external using fwh 1109 and xhb 1109 | Below are the externals still unresolved even after linking xhb2.obj as specified in another thread.
Thanks in advance for the help.
xLINK: error: Unresolved external symbol '_OleUIPasteSpecialA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_GetFileVersionInfoSizeA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_GetFileVersionInfoA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_VerQueryValueA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: fatal error: 4 unresolved external(s). |
getting unresolved external using fwh 1109 and xhb 1109 | Dionie,
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=83275#p83275">viewtopic.php?p=83275#p83275</a><!-- l --> |
gifts animados | Hola estoy cambiando los animate del shell32 (dbcopy(),etc) ya que en windows 7 no funcionan, pero me esta costando un poco
EL prg es el siguiente
[code=fw:2s7acxrw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> WaitOn<span style="color: #000000;">(</span> cText, cCaption, bAction, cImagen <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oSay<br /><br /><br /><br /> <span style="color: #00C800;">DEFAULT</span> cText := <span style="color: #ff0000;">"Procesando datos..."</span><br /> <span style="color: #00C800;">DEFAULT</span> cCaption := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">DEFAULT</span> cImagen := <span style="color: #ff0000;">"004.gif"</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;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> - <span style="color: #000000;">10</span>, <span style="color: #000000;">14</span><br /><br /><br /> <span style="color: #00C800;">IF</span> ValType<span style="color: #000000;">(</span> oDlgwait <span style="color: #000000;">)</span> = <span style="color: #ff0000;">"O"</span><br /> oDlgwait:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>; oDlgwait := <span style="color: #00C800;">NIL</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgwait <span style="color: #0000ff;">RESNAME</span> <span style="color: #ff0000;">"DIA_MOME"</span><br /> oDlgwait:<span style="color: #000000;">cCaption</span> := cCaption<br /><br /> oAnimate = TAnimate<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">(</span> <span style="color: #000000;">160</span>, oDlgwait <span style="color: #000000;">)</span><br /> oAnimate:<span style="color: #000000;">nstyle</span> := <span style="color: #000000;">2</span><br /><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> cText <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">COLOR</span> RGB<span style="color: #000000;">(</span> <span style="color: #000000;">130</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">240</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgwait <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oAnimate:= TGif<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oDlgwait, cImagen,<span style="color: #000000;">5</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><br /> SetFocus<span style="color: #000000;">(</span> oDlgwait:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> oDlgwait <span style="color: #000000;">)</span><br /><br /> </div>[/code:2s7acxrw]
y la imagen que me muestra es
[img:2s7acxrw]http://sim1.subirimagenes.net/img/2014/06/29//mini_140629053216272654.png[/img:2s7acxrw]
Igualmente el gift en estaparte del programa no se anima debido a que el proceso es un append from
[code=fw:2s7acxrw]<div class="fw" id="{CB}" style="font-family: monospace;"> WaitOn<span style="color: #000000;">(</span><span style="color: #ff0000;">"Creando archivo..."</span><span style="color: #000000;">)</span><br /> APPEND <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">(</span> cArchivo <span style="color: #000000;">)</span> SDF<br /> WaitOff<span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:2s7acxrw]
Hay forma de que funcione el gift, hice una prueba con un consejo de Daniel García Gil que envió al foro por algo parecido pero no lo logré en mi caso
Y tambien si se puede usar el shell32 de windows.
Bueno son varias consultas en una
Gracias
Luis
Luis |
gifts animados | Luis,
Llevo un par de dias intentando revisar esto, pero no he tenido tiempo literalmente.
Lo revisamos cuanto antes, disculpa la demora <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
gifts animados | Gracias Antonio
Luis |
gifts animados | Luis,
Prueba este ejemplo (desde la carpeta FWH\samples), que te muestra como hacerlo:
[code=fw:144v4zmg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Animated GIFs support for FWH</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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Animated GIFs"</span><br /><br /> TGif<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"..<span style="color: #000000;">\g</span>ifs<span style="color: #000000;">\h</span>alo.gif"</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BuildDialog<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BuildDialog<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Non modal dialog"</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> TGif<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oDlg, <span style="color: #ff0000;">"..<span style="color: #000000;">\g</span>ifs<span style="color: #000000;">\h</span>alo.gif"</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> </div>[/code:144v4zmg]
[img:144v4zmg]https://bitbucket.org/fivetech/screenshots/downloads/gifs_on_non_modal_dialogs.jpg[/img:144v4zmg] |
gifts animados | Antonio de hecho el gif en todos los casos en que son bucles (dónde puedo hacer sysrefresh()) funciona, en el único caso en que no funciona es cuando llamo
waiton()
append from ....
waitoff()
[code=fw:217cue1p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Common.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oDlgwait, oFont, oAnimate<br /><br /><span style="color: #00C800;">FUNCTION</span> WaitOn<span style="color: #000000;">(</span> cText, cCaption, bAction, cImagen <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oSay<br /><br /><br /><br /> <span style="color: #00C800;">DEFAULT</span> cText := <span style="color: #ff0000;">"Procesando datos..."</span><br /> <span style="color: #00C800;">DEFAULT</span> cCaption := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">DEFAULT</span> cImagen := <span style="color: #ff0000;">"004.gif"</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;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> - <span style="color: #000000;">10</span>, <span style="color: #000000;">14</span><br /><br /> <br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgwait <span style="color: #0000ff;">RESNAME</span> <span style="color: #ff0000;">"DIA_MOME"</span><br /> oDlgwait:<span style="color: #000000;">cCaption</span> := cCaption<br /><br /> oAnimate = TAnimate<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">(</span> <span style="color: #000000;">160</span>, oDlgwait <span style="color: #000000;">)</span><br /> oAnimate:<span style="color: #000000;">nstyle</span> := <span style="color: #000000;">2</span><br /><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> cText <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">COLOR</span> RGB<span style="color: #000000;">(</span> <span style="color: #000000;">130</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">240</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgwait <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oAnimate:= TGif<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oDlgwait, cImagen,<span style="color: #000000;">5</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><br /> SetFocus<span style="color: #000000;">(</span> oDlgwait:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> oDlgwait <span style="color: #000000;">)</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> WaitOff<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> ValType<span style="color: #000000;">(</span> oDlgwait <span style="color: #000000;">)</span> = <span style="color: #ff0000;">"O"</span><br /> oDlgwait:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>; oDlgwait := <span style="color: #00C800;">NIL</span><br /> oFont:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oAnimate:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:217cue1p]
El otro problema es que aleatoriamente respeta el fondo transparente y en otros el fondo aparece en negro, o como mostré la imagen anterior .
Puedo cambiar los fondos por otro color pero perdería la magia de estar mostrandose dobre el color del diálogo
Muchas gracias por tu atención
Luis |
gifts animados | Luis,
Puedes enviarme el GIF que quieres usar ? gracias
En relación al APPEND FROM ... veamos si permite alguna cláusula en la que se pueda proporcionar un codeblock que llame a SysRefresh() |
gifts animados | Gracias Antonio te en envío el enlace de dos de la imágenes
<!-- m --><a class="postlink" href="https://drive.google.com/file/d/0B8UT409V4x1mMHdoVXItN2NDV0k/edit?usp=sharing">https://drive.google.com/file/d/0B8UT40 ... sp=sharing</a><!-- m -->
<!-- m --><a class="postlink" href="https://drive.google.com/file/d/0B8UT409V4x1mS2dBSEFxcm5IWTg/edit?usp=sharing">https://drive.google.com/file/d/0B8UT40 ... sp=sharing</a><!-- m -->
Ayer lo instale en una máquina Windows server 2008 y funcionó perfecto
En otra con windows xp aparecía el fondo negro en ambos casos
Y en una con windows 7 funcionó bien , pero en la que hago las pruebas , también con Windoes 7 a veces aparece el fondo negro y otras no.
Muchas gracias por tu generosa atención
Luis |
give pointer in dll | how may I give pointer as parameter to function in DLLp1,p2 - pintererr:=_OWersja(p1,p2)......???declare DLL_TYPE_BYTE _OWersja(DLL_TYPE_LPCSTR CFILE1, DLL_TYPE_LPCSTR CFILE2) in WinIP.Dll |
give pointer in dll | Kajot,strings are automatically managed as pointers (their addresses is supplied, not their content).For numbers you have to supply them by reference using @If the function is not working as expected, its a good idea to access it using C code instead of using DLL FUNCTION, just to locate where the problem may come from. Just implement a C wrapper using pragma BEGINDUMP ... ENDDUMP. There are many examples in these forums |
give pointer in dll | any samples |
give pointer in dll | Here you have a working example that shows how strings are managed as pointers:[code:tz3vwre9]
#include "FiveWin.ch"
function Main()
local cIn := "Hello world!"
local cOut := Space( Len( cIn ) )
Test( cIn, cOut )
MsgInfo( cOut )
return nil
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( TEST )
{
strcpy( hb_parc( 2 ), hb_parc( 1 ) );
strupr( hb_parc( 2 ) );
}
#pragma ENDDUMP
[/code:tz3vwre9] |
give pointer in dll | thansI get errorMissing prototype for 'strupr' |
give pointer in dll | #include <hbapi.h> char * strupr( char * );... |
give pointer in dll | next errorunresolved external symbol '_strupr' |
give pointer in dll | What C compiler are you using ?Here it works fine using Borland C 5.5 |
give pointer in dll | I am usingvxHarbour Compiler build 1.0.0 (SimpLex)Copyright 1999-2007, <!-- m --><a class="postlink" href="http://www.xharbour.org">http://www.xharbour.org</a><!-- m --> <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --> |
give pointer in dll | Both Harbour and xHarbour generate a C output file that has to be compiled with a C compiler.Are you using Borland or Microsoft C compiler to compile the output .C ?Are you using xHarbour commercial ? |
give pointer in dll | yes, I am using commercial |
give pointer in dll | Kajot,Then add this code to the PRG:[code:30s8m00c]
#pragma BEGINDUMP
#include "string.h"
#include "ctype.h"
char * strupr( char * string )
{
char c, * p = string;
while( ( c = * p ) != '\0' )
* ( p++ ) = _toupper( c );
return string;
}
#pragma ENDDUMP
[/code:30s8m00c] |
give pointer in dll | thanksI got worningmissing prototype for '_toupper' |
give pointer in dll | Try this one:char _toupper( char );[code:2k6uqd43]
#pragma BEGINDUMP
#include "string.h"
#include "ctype.h"
char _toupper( char );
char * strupr( char * string )
{
char c, * p = string;
while( ( c = * p ) != '\0' )
* ( p++ ) = _toupper( c );
return string;
}
#pragma ENDDUMP
[/code:2k6uqd43] |
give pointer in dll | I change toupper(c)and is OKbut I got worning indeclare DLL_TYPE_BYTE _OWersja(DLL_TYPE_LPCSTR cfile1, DLL_TYPE_LPCSTR cfile2) in WinIP.Dllsyntax error: "parse error at 'CFILE1'" |
give pointer in dll | > declare DLL_TYPE_BYTE _OWersja(DLL_TYPE_LPCSTR cfile1, DLL_TYPE_LPCSTR cfile2) in WinIP.Dll This is not FiveWin syntax. What is it ? |
give pointer in dll | this isDLL32 FUNCTION _OWersja(cFile1 AS LPSTR, cFile2 AS LPSTR ) AS WORD PASCAL LIB "WinIP.Dll"if function _toupper() this the same function toupper() from ctype.h |
give pointer in dll | > if function _toupper() this the same function toupper() from ctype.hYes, probably |
give pointer in dll | if I try char _toupper( char ); I get worningunresolved external symbol '__toupper' |
give pointer in dll | Then try with toupper() without the underscore |
give the setfocus to getbar | I would like to give the getbar the focus because at the beginning the user presses the button to display the getbar and the focus is not on the get
[img:1y8w6e36]https://i.postimg.cc/KjLjZbc9/cerca.png[/img:1y8w6e36]
wich is the command ?
I allready tried with
[b:1y8w6e36] IIf(oBrowse:lGetBar, oBrowse:aCols[ 1 ]:oBarGet:setfocus(),)[/b:1y8w6e36]
not run !!!!! I don't see the cursor flashing in the get
then I not see the bitmap zoom2 on the get , why ?
:aCols[ 1 ]:cBarGetBmp := hBmp not run !!!
Any solution please ? |
give the setfocus to getbar | Now I found perhaps some solutions
:aCols[ 1 ]:lBarGetOnKey := .t. // after having setfocus the oBrowse object, the end user can insert the characters directly into the get
:aCols[ 1 ]:cBarGetBmp := hBmp // this for show the Bitmap on the get
:aCols[ 1 ]:bBarGetAction := { || ( oBrowse:cAlias )->( SetFilter( oBrowse )) } // this for show the bitmap on the get and associated a action
now it might work well but I still have a small problem
the image is not correctly displayed inside the get as you can see in the image
it is not aesthetically beautiful to look at
[img:3see4g1x]https://i.postimg.cc/vTnfS2N9/hhhhhhhhhh.png[/img:3see4g1x]
any solution please ? |
give the setfocus to getbar | found a solution !!!
I sent the modification to Nageswarao,Antonio and Cristobal
[img:644sg9zn]https://i.postimg.cc/50b6zZjK/good.jpg[/img:644sg9zn] |
give the setfocus to getbar | Thanks.
Your suggestion implemented in FWH2004. |
gmail | Hi All
Is it possible to access email and attachments in a gmail account from a fivewin/xHarbour app.
Cheers
Colin |
gmail | Colin,
I use this for an account of gmail and it works perfectly :
[code=fw:19lgvkq3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />MsgRun<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Enviando correo, espere..."</span>, oApp:<span style="color: #000000;">EmpresaName</span>, <span style="color: #000000;">{</span>|| lBorrar := Config_Mail<span style="color: #000000;">(</span> cUser, cPass, cRemt, cDest, cCC, cCCO,;<br /> cText, cSubject, aTmp, nServ, aServs <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /><br />********************************************************************************<br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> Config_Mail<span style="color: #000000;">(</span> _cUser, cPass, _cRemt, cDest, cCC, cCCO, cTxt,;<br /> cSubject, aAttach, nServ, aServs <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> lRet := .f.<br /> <span style="color: #00C800;">local</span> oCfg, oError, cUser, cRemt<br /> <span style="color: #00C800;">local</span> cServ := aServs<span style="color: #000000;">[</span>nServ<span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #B900B9;">//--> SERVIDOR SMTP - "smtp.servidor.com.br"</span><br /> <span style="color: #00C800;">local</span> nPort := aServs<span style="color: #000000;">[</span>nServ<span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">local</span> lAut := .t.<br /> <span style="color: #00C800;">local</span> lSSL := aServs<span style="color: #000000;">[</span>nServ<span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span><br /> <br /> <br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span>cPass<span style="color: #000000;">)</span> .or. Empty<span style="color: #000000;">(</span>_cRemt<span style="color: #000000;">)</span> .or.;<br /> <span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span>cDest<span style="color: #000000;">)</span> .and. Empty<span style="color: #000000;">(</span> cCC <span style="color: #000000;">)</span> .and. Empty<span style="color: #000000;">(</span>cCCO<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> Msgstop<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Error en configuracion de la cuenta."</span>, <span style="color: #ff0000;">"Atencion"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">else</span><br /> cUser := alltrim<span style="color: #000000;">(</span>_cUser<span style="color: #000000;">)</span> + aServs<span style="color: #000000;">[</span>nServ,<span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /> cRemt := alltrim<span style="color: #000000;">(</span>_cRemt<span style="color: #000000;">)</span> + aServs<span style="color: #000000;">[</span>nServ,<span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">endif</span> <br /><br /> <span style="color: #00C800;">TRY</span><br /> oCfg := CREATEOBJECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"CDO.Configuration"</span> <span style="color: #000000;">)</span><br /> WITH OBJECT oCfg:<span style="color: #000000;">Fields</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserver"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := cServ<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserverport"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := nPort<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusing"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">2</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := lAut<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpusessl"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := lSSL<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusername"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := cUser<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendpassword"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := cPass<br /> :<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END WITH<br /> lRet := .t.<br /> CATCH oError<br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"No fue posible enviar el e-Mail!"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"Error: "</span> + Transform<span style="color: #000000;">(</span>oError:<span style="color: #000000;">GenCode</span>, <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">";"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"SubC: "</span> + Transform<span style="color: #000000;">(</span>oError:<span style="color: #000000;">SubCode</span>, <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">";"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"OSCode: "</span> + Transform<span style="color: #000000;">(</span>oError:<span style="color: #000000;">OsCode</span>, <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">";"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"SubSystem: "</span> + Transform<span style="color: #000000;">(</span>oError:<span style="color: #000000;">SubSystem</span>, <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">";"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"Mensaje: "</span> + oError:<span style="color: #000000;">Description</span>, <span style="color: #ff0000;">"Atencion!"</span> <span style="color: #000000;">)</span><br /><br /> END<br /> <span style="color: #00C800;">if</span> lRet<br /> lRet := Envia_Mail<span style="color: #000000;">(</span> oCfg, cRemt, cDest, cCC, cCCO, cTxt, cSubject, aAttach <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <br /><span style="color: #00C800;">Return</span> lRet<br /> <br />********************************************************************************<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">Function</span> Envia_Mail<span style="color: #000000;">(</span> oCfg, cFrom, cTo, cCC, cBCC, cMsg, cSubject, aAttach <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> lRet := .f.<br /> <span style="color: #00C800;">local</span> x, oMsg<br /><span style="color: #B900B9;">/*<br /> cTo := Destinatarios( cTo ) //--> PARA <br /> cCC := Destinatarios( cCC ) //--> COM COPIA<br /> cBCC := Destinatarios( cBCC ) //--> COM COPIA OCULTA<br />*/</span><br /><br /> <span style="color: #00C800;">TRY</span><br /> oMsg := CREATEOBJECT <span style="color: #000000;">(</span> <span style="color: #ff0000;">"CDO.Message"</span> <span style="color: #000000;">)</span><br /> WITH OBJECT oMsg<br /> :<span style="color: #000000;">Configuration</span> = oCfg<br /> :<span style="color: #0000ff;">From</span> = cFrom <br /> :<span style="color: #0000ff;">To</span> = cTo<br /> :<span style="color: #000000;">CC</span> = cCC<br /> :<span style="color: #000000;">BCC</span> = cBCC<br /> <br /> :<span style="color: #0000ff;">Subject</span> = cSubject<br /> :<span style="color: #000000;">TextBody</span> = cMsg<br /> <span style="color: #00C800;">For</span> x:= <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">(</span> aAttach <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> aAttach<span style="color: #000000;">[</span>x<span style="color: #000000;">]</span> <> <span style="color: #00C800;">NIL</span><br /> :<span style="color: #000000;">AddAttachment</span><span style="color: #000000;">(</span>AllTrim<span style="color: #000000;">(</span>aAttach<span style="color: #000000;">[</span>x<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">Next</span><br /><br /><span style="color: #B900B9;">// ? cfrom, cto, cCC, cBCC, cSubject, cMsg</span><br /><br /> :<span style="color: #000000;">Send</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END WITH<br /> lRet := .t.<br /> CATCH<br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"No fue posible enviar el mensaje."</span>, <span style="color: #ff0000;">"Error."</span> <span style="color: #000000;">)</span><br /> lRet := .f.<br /> END<br /> <br /><span style="color: #00C800;">Return</span> lRet<br /> </div>[/code:19lgvkq3]
I wait serve you,
Regards |
gmail | Ariel,
I think Colin meant to read emails not send them.
James |
gmail | Hi Ariel and James
I do need to read and save emails/attachments but also to send emails - so thanks for the code Ariel.
Regards
Colin |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear All,
I've used Gmail account to send mail from my program for many years but Google show the message below in Gmail account setup. It means, we have to find the way to send email with Google "security standards". How do we solve this issue?
[quote:10k30zna]Less secure apps & your Google Account
To help keep your account secure, starting May 30, 2022, ??Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.
Please note this deadline does not apply to Google Workspace or Google Cloud Identity customers. The enforcement date for these customers will be announced on the Workspace blog at a later date.
For more information, please continue reading.
Special Note on Apple Device Sign-Ins. Users who have not recently signed into their Google Account using only username and password will be able to only make new sign in attempts using the Google account type starting from February 28, 2022. Existing users may continue to sign into their Google Account using their username and password until May 30, 2022.[/quote:10k30zna] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | maybe in the future, test please:
[url:2gjoi8ee]https://mail.yandex.com/[/url:2gjoi8ee]
Configuration, use the google traductor, please;
[url:2gjoi8ee]https://fiodevida.com/como-acessar-uma-conta-yandex-mail-em-programas-de-e-mail-usando-imap/[/url:2gjoi8ee]
Regards, saludos. |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear Karinha,
Thank you for an idea. I try [url:3iq3wnw3]http://www.mailjet.com[/url:3iq3wnw3]. It works fine but free with condition 200/day, 6,000/month and gmail.com will receive to Promotion mailbox.
I still love gmail, if we can still use after May 30, 2022.
[quote="karinha":3iq3wnw3]maybe in the future, test please:
[url:3iq3wnw3]https://mail.yandex.com/[/url:3iq3wnw3]
Configuration, use the google traductor, please;
[url:3iq3wnw3]https://fiodevida.com/como-acessar-uma-conta-yandex-mail-em-programas-de-e-mail-usando-imap/[/url:3iq3wnw3]
Regards, saludos.[/quote:3iq3wnw3] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Hi,
Is it possible to use the same code with Hotmail / Outloo ?
Some simple ?
Thanks |
gmail : Less Secure App will stop May 30 2022 *Fixed* | I use imap with Thunderbird to read my mails on Gmail. Some time ago I received a warning about the end of the support of "less secure" apps. I disabled the less secure apps on Gmail and changed the protocol to OAuth 2. It worked flawlessly to receive the mails. As I don't use Gmail SMTP I don't know if it works to send mails but I guess it should once your application has been authenticated. It maybe worth a try. |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear Jack,
Sorry Jack, Hotmail is the same as Google. I try mailjet.com, it works fine without changing the program but register is a bit more gmail.
[quote="Jack":2ukctb3g]Hi,
Is it possible to use the same code with Hotmail / Outloo ?
Some simple ?
Thanks[/quote:2ukctb3g] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear ADutheil,
The way out is OAuth2 for Gmail. How can I use OAuth2 protocol? Can you show me the sample please?
Thanks in advance,
[quote="ADutheil":32cxth6f]I use imap with Thunderbird to read my mails on Gmail. Some time ago I received a warning about the end of the support of "less secure" apps. I disabled the less secure apps on Gmail and changed the protocol to OAuth 2. It worked flawlessly to receive the mails. As I don't use Gmail SMTP I don't know if it works to send mails but I guess it should once your application has been authenticated. It maybe worth a try.[/quote:32cxth6f] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Sorry I can't help with that, as I said I use it with Thunderbird not Harbour. At the moment I have no spare time to dig a solution. |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear ADutheil,
No problem, Thanks for an idea.
[quote="ADutheil":3u0gphrl]Sorry I can't help with that, as I said I use it with Thunderbird not Harbour. At the moment I have no spare time to dig a solution.[/quote:3u0gphrl] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear Dutchman, you were able to develop OAuth2 for sending mails?. Thank you
Regards
Horacio |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Not yet. I gonna move to other choice (mailjet.com).
[quote="horacio":3l6yonk2]Dear Dutchman, you were able to develop OAuth2 for sending mails?. Thank you
Regards
Horacio[/quote:3l6yonk2] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear Dutch,
did you find a solution or more information about gmail smtp for less secure apps?
Regards, Detlef |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear Detlef,
I move to mailjet.com. It can send almost the same as smtp.gmail.com, the limitation is 200/day = 6,000/month. I try and work well.
[quote="Detlef":ts754oed]Dear Dutch,
did you find a solution or more information about gmail smtp for less secure apps?
Regards, Detlef[/quote:ts754oed] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Thank you, Dutch.
Unfortunately my client wants to stay at gmail.com to send invoices to her customers.
I' ll try to convince her to change to a service like mailjet.com as you did.
Have a nice weekend.
Regards,
Detlef |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear Detlef,
If the customer still need to use, I think. They just buy Google Workspace "Business Starter" 6US$/month.
[quote:y1vgmg0y]Please note this deadline does not apply to Google Workspace or Google Cloud Identity customers. The enforcement date for these customers will be announced on the Workspace blog at a later date.[/quote:y1vgmg0y]
[quote="Detlef":y1vgmg0y]Thank you, Dutch.
Unfortunately my client wants to stay at gmail.com to send invoices to her customers.
I' ll try to convince her to change to a service like mailjet.com as you did.
Have a nice weekend.
Regards,
Detlef[/quote:y1vgmg0y] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Dear Detlef,
I got the new solution for smtp.gmail.com now.
1. 2 Step Verification (2SV)
2. App Password
2.1 Generate password with
Select app: "Mail", Select device: "Windows Computer"
2.2 Get 16 digits password.
2.3 Use this password instead of gmail's password.
done.
[quote="Detlef":2mqw0p1b]Thank you, Dutch.
Unfortunately my client wants to stay at gmail.com to send invoices to her customers.
I' ll try to convince her to change to a service like mailjet.com as you did.
Have a nice weekend.
Regards,
Detlef[/quote:2mqw0p1b] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Uups! I didn't see your new post, Dutch. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
Many thanks for it.
I'll give it a try.
Regards,
Detlef |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Hi,
I try it and it works as expected.
Thanks for the feeback
Philippe |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Muchas gracias por tan buen aporte.
thank you very much for such a good contribution!! |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Hello dutch
Have you any example in harbour to implement your solution?
Thank you in advance
[quote="dutch":11vaapvt]Dear Detlef,
I got the new solution for smtp.gmail.com now.
1. 2 Step Verification (2SV)
2. App Password
2.1 Generate password with
Select app: "Mail", Select device: "Windows Computer"
2.2 Get 16 digits password.
2.3 Use this password instead of gmail's password.
done.
[/quote:11vaapvt] |
gmail : Less Secure App will stop May 30 2022 *Fixed* | Hi hidroxid,
Have you ever send email via gmail account? If so, just change password to "App Password". That's it.
[code=fw:1cbkccp9]<div class="fw" id="{CB}" style="font-family: monospace;"> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserver"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := cSmtp <span style="color: #B900B9;">// "smtp.gmail.com"</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpserverport"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := nPort <span style="color: #B900B9;">// iif(lSSL,465,25) // 465 SSL</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusing"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">2</span> <span style="color: #B900B9;">// Remote SMTP = 2, local = 1</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := iif<span style="color: #000000;">(</span>lAuthen,.T.,.F.<span style="color: #000000;">)</span> <span style="color: #B900B9;">// .T.</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpusessl"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := lSSL <span style="color: #B900B9;">// .T.</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/savesentitems"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := lSave<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendusername"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := cSender <br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/sendpassword"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := cPass <span style="color: #B900B9;">// use App Password instead of gmail password</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">30</span><br /> :<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:1cbkccp9]
[quote="hidroxid":1cbkccp9]Hello dutch
Have you any example in harbour to implement your solution?
Thank you in advance
[quote="dutch":1cbkccp9]Dear Detlef,
I got the new solution for smtp.gmail.com now.
1. 2 Step Verification (2SV)
2. App Password
2.1 Generate password with
Select app: "Mail", Select device: "Windows Computer"
2.2 Get 16 digits password.
2.3 Use this password instead of gmail's password.
done.
[/quote:1cbkccp9][/quote:1cbkccp9] |
gmapd | Hola, compilo el gmapd de los samples y cuando lo ejecuto me tira error del script, alguien sabe que puede ser?
Gracias! |
gmapd | <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=31830&start=0&hilit=google+maps">viewtopic.php?f=6&t=31830&start=0&hilit=google+maps</a><!-- l --> |
gml-viewer | Hello,
Did anyone already have created a gml-file viewer in FW?
I know there are viewers I can call from FW that create a SVG, and then show it in FW, that's how I do it now.
But maybe there is already some code that draw it direct in FW.
Thanks |
go.bat y make para VS 2013 xpress | Estimados amigos:
Intento compilar con VS 2013 express y necesito ayuda.
Necesito el Go.bat y el make para VS 2013
Harbour para VS2013
Librerias de ADS
Muchas gracias.
Intentaré hacer un template para xMate. |
go.bat y make para VS 2013 xpress | Ruben,
Lo necesitas para 32 bits, si ?
Podrias usar el que he publicado para 64 bits, pero haciéndole unos pequeños cambios.
Has revisado el que he publicado para 64 bits ? |
go.bat y make para VS 2013 xpress | Gracias Antonio, es para 32 bits, si. Pruebo el de 64.
Pense que habian librerias diferentes. Gracias.
Necesito el Harbour para MS VS 2013.
Saludos. |
go.bat y make para VS 2013 xpress | Ruben,
Estas versiones de Harbour deben funcionar correctamente con Visual Studio 2013 (cualquier versión, "Express" ó no):
[url:2g7zhivu]https://code.google.com/p/harbour-and-xharbour-builds/downloads/detail?name=harbour_msvc2012_20131007_2.zip[/url:2g7zhivu] (versión de 32 bits)
[url:2g7zhivu]https://code.google.com/p/harbour-and-xharbour-builds/downloads/detail?name=harbour64_vc64_20130710.zip[/url:2g7zhivu] (versión de 64 bits)
El fichero make que puedes usar está en la carpeta "makes" de FWH: vs2010_make.zip (para 32 bits) y los que he publicado aqui en los foros para 64 bits. Solo tendrias que modificar el número que usa Microsoft para la versión de Visual Studio, y ojo porque Microsoft usa un número menos:
Es decir, para Visual Studio 2013, la versión es 12.
Para Visual Studio 2012, la versión es 11.
y así sucesivamente
Bastante absurdo, pero asi es <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Tambien tenemos que plantearnos el proporcionar makes para 32 ó 64 bits para todas las versiones de Visual Studio (por lo menos desde 2010 en adelante), para aquellos que por la razón que sea, no pueden ó necesitan migrar a 64 bits. |
go.bat y make para VS 2013 xpress | Gracias Antonio, excelente.
Otra pregunta, como haco RddAds.lib y Ace32.lib para Ms VS 2013.?
Gracias. |
go.bat y make para VS 2013 xpress | Ruben,
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=115693#p115693">viewtopic.php?p=115693#p115693</a><!-- l -->
Ahora no estoy en la oficina, luego te ayudo con la otra libreria |
go.bat y make para VS 2013 xpress | Gracias Maestro.
Saludos. |
go64.bat to build Harbour for 64 bits | Using the new 2015, Visual Studio Community edition:
go64.bat
[code=fw:3mn18zlm]<div class="fw" id="{CB}" style="font-family: monospace;">call <span style="color: #ff0000;">"%ProgramFiles(x86)%<span style="color: #000000;">\M</span>icrosoft Visual Studio 14.0<span style="color: #000000;">\V</span>C<span style="color: #000000;">\v</span>cvarsall.bat"</span> x86_amd64<br />set HB_BUILD_MODE=c<br />win-make.exe</div>[/code:3mn18zlm] |
google Maps and tSockest (via / TCP) and java scrip | Greetings friends, well I tell you that I can use a window window to mount an activex and run with the browser from a .htm page and see in real time the global position of mobile units (buses).
Also activating the server with the tSockest (via / TCP) that works excellent.
[img:3dr0etht]http://www.busmaticcr.com/situ.png[/img:3dr0etht] |
google and insecure applications | Dear Armando,
[url:2xvoyoyf]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=41496&start=15&sid=e1553de27485ea120e3161ba9aaaa260[/url:2xvoyoyf]
[quote="Armando":2xvoyoyf]Dear Friends:
If I remember correctly, as of Jun/2022, google will not allow its use for
sending emails to insecure applications.
How we will solve this problem?, any sugestion ?
Regards[/quote:2xvoyoyf] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.