topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
llamar funciones de DLL | Antonio,
la declaración de las variables he probado con LOCAL y STATIC
saludos
Marcelo |
llamar funciones de DLL | Antonio,
inicializando las variables
dwEnrollNumber := 0
Name := ''
Password := ''
Privilege := 0
Enabled := .F.
obtengo informacion, no la correcta pero obtengo algo, seguire jugando,
como puedo inicializar de otra manera para que los tipos sean compatibles
gracias por la ayuda
Saludos
Marcelo Vía |
llamar funciones de DLL | > obtengo informacion, no la correcta pero obtengo algo, seguire jugando
Que información estás obteniendo ? |
llamar funciones de DLL | Antonio,
te presento el código en C#
[code=fw:3drc41zu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">private</span> void GetAllUserInfo<span style="color: #000000;">(</span>string sIp = <span style="color: #ff0000;">"10.0.0.44"</span>, int iPort = <span style="color: #000000;">4370</span>, int iMachineNumber = <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> <span style="color: #B900B9;">//Create Standalone SDK class dynamicly.</span><br /> zkemkeeper.CZKEMClass axCZKEM1 = <span style="color: #00C800;">new</span> zkemkeeper.CZKEMClass<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /><br /> axCZKEM1.Connect_Net<span style="color: #000000;">(</span>sIp, iPort<span style="color: #000000;">)</span>;<br /> int iEnrollNumber = <span style="color: #000000;">0</span>;<br /> string sname=String.Empty ;<br /> string sPass = String.Empty;<br /> int iPrivilege = <span style="color: #000000;">0</span>;<br /> bool ienabled = <span style="color: #00C800;">false</span>;<br /><br /> axCZKEM1.EnableDevice<span style="color: #000000;">(</span>iMachineNumber, <span style="color: #00C800;">false</span><span style="color: #000000;">)</span>;<br /> axCZKEM1.ReadAllUserID<span style="color: #000000;">(</span>iMachineNumber<span style="color: #000000;">)</span>;<span style="color: #B900B9;">//read all the user information to the memory</span><br /> <span style="color: #00C800;">while</span> <span style="color: #000000;">(</span>axCZKEM1.GetAllUserInfo<span style="color: #000000;">(</span>iMachineNumber, ref iEnrollNumber, ref sname, ref sPass, ref iPrivilege,ref ienabled<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> MessageBox.Show<span style="color: #000000;">(</span><span style="color: #ff0000;">"iEnrollNumber :"</span>+iEnrollNumber.ToString<span style="color: #000000;">(</span><span style="color: #000000;">)</span>+<br /> <span style="color: #ff0000;">"sname: "</span>+ sname+<br /> <span style="color: #ff0000;">"sPass :"</span>+ sPass+<br /> <span style="color: #ff0000;">"iPrivilege :"</span>+ iPrivilege+<br /> <span style="color: #ff0000;">"ienabled :"</span>+ ienabled<br /><br /> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> axCZKEM1.EnableDevice<span style="color: #000000;">(</span>iMachineNumber, <span style="color: #00C800;">true</span><span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span></div>[/code:3drc41zu]
Este es el código en FW
[code=fw:3drc41zu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oZk, aLista := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">local</span> dwEnrollNumber , <span style="color: #0000ff;">Name</span>, Password, Privilege, Enabled <br /><br />oZk := CreateObject<span style="color: #000000;">(</span><span style="color: #ff0000;">"zkemkeeper.ZKEM"</span><span style="color: #000000;">)</span><br /><br />oZk:<span style="color: #000000;">SetCommPassword</span><span style="color: #000000;">(</span><span style="color: #000000;">12345</span><span style="color: #000000;">)</span><br />oZk:<span style="color: #000000;">Connect_Net</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"10.0.0.44"</span>, <span style="color: #000000;">4370</span> <span style="color: #000000;">)</span><br />oZk:<span style="color: #000000;">EnableDevice</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span>, .F.<span style="color: #000000;">)</span><br />oZk:<span style="color: #000000;">ReadAllUserID</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span> <br /><br />dwEnrollNumber := <span style="color: #000000;">0</span><br /><span style="color: #0000ff;">Name</span> := <span style="color: #ff0000;">''</span><br />Password := <span style="color: #ff0000;">''</span> <br />Privilege := <span style="color: #000000;">0</span><br />Enabled := .F.<br /><br /><span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> oZk:<span style="color: #000000;">GetAllUserInfo</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, @dwEnrollNumber, @<span style="color: #0000ff;">Name</span>, @Password, @Privilege, @Enabled <span style="color: #000000;">)</span> <br /> AADD<span style="color: #000000;">(</span> aLista, <span style="color: #000000;">{</span> dwEnrollNumber, <span style="color: #0000ff;">Name</span>, Password, Privilege, Enabled <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">enddo</span><br /><br />? len<span style="color: #000000;">(</span> aLista <span style="color: #000000;">)</span><br /><br />oZk:<span style="color: #000000;">EnableDevice</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span>, .T.<span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">(</span> aLista <span style="color: #000000;">)</span><br /><br />oZk:<span style="color: #000000;">disconnect</span><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 /> </div>[/code:3drc41zu]
la diferencia es que elcodigo de FW esta cn la definición de una clave de acceso oZk:SetCommPassword(12345)
Con la aplicación de C# se obtiene esta pantalla
[url:3drc41zu]https://app.box.com/s/bh7phfn1pxdfbtq46qmxro87eph2d7sj[/url:3drc41zu]
con FW
[url:3drc41zu]https://app.box.com/s/bhxrfsdy6h3ojhv80l2j8ppijl6n6vd6[/url:3drc41zu]
Un dato mas el programa de C# recupera 229 datos mientras el de FW 589
gracias por la ayuda
Saludos
Marcelo Vía |
llamar funciones de DLL | Antonio,
alguna idea sobre esto, o sugerencia de como podría atacar este tema desde otro angulo pero utilizando fivewin
saludos cordiales
Marcelo Via |
llaves RFID para autentificación usuarios | Hola,
Me gustaría saber si alguien ha desarrollado un sistema que utilice llaves RFID y que permita validar los usuarios de dichas llaves con una base de datos.
Muchas gracias. |
lmkdir lIsdir y lzcopyfile no funcionan con FWH y XHarbou | Amigos
en clipper y fwh estas funciones servian
lmkdir para crear un directorio
lIsdir para ver si existia un directorio
lzcopyfile para copiar
a 32 bits con FWH y XHB no funcionan
Hay nuevas funciones
Gracias por la Ayuda
Vladimir Zorrilla Llerena |
lmkdir lIsdir y lzcopyfile no funcionan con FWH y XHarbou | Vladimir,
Este código funciona correctamente en FWH 2.8
[code:1junf88x]
function Main()
if lMkDir( "test" )
MsgInfo( lIsDir( "test" ) )
endif
return nil[/code:1junf88x]
Usa CopyFile() en vez de LZCopyFile(). |
lo siento no quiero molestar pero a quien mas preguntarle? | recien estoy empezando a usar VERCE y tengo varias dudas
1.- siempre me sale este error
FiveWin.ch(193) Warning I0003 No markers in repeatable group ['<uAction>\'] - group will never be used.
2.- aun saliendo y otras que no sale compila ok pero el programa no se ejecuta, pero si lo compilo con el buildx si se ejecuta, que sera???, no uso nada de terceros trato de hacer las cosas 100% lo que trae original fivewin
3.- si no estoy usando harbour sino xharbour debe colocarle la ruta del xharbour donde dice directorio de harbour?
4.- el directorio de fivewin for harbour es el mismo para xharbour?
gracias y prometo no preguntar mas nada por hoy |
lo siento no quiero molestar pero a quien mas preguntarle? | Hola:
Verce distingue entre Harbour y xHarbour, cada uno de ellos tiene su propia ruta, lo mismo que las librerías de Fivewin.
Yo he probado Verce con el último FDTN y funciona sin problemas. Igual tienes una versión vieja de verce o de fwh/h.
Salu2 |
lo siento no quiero molestar pero a quien mas preguntarle? | QAZWSX2K: (Que nombre tan raro, es ruso ?)
Dame un dirección de correo y te envío un pequeño manual que me construi para compilar con VERCE.
Saludos |
lo siento no quiero molestar pero a quien mas preguntarle? | gracias armando, no es un nombre solo son las primeras 6 letras del teclado, mi email es <!-- e --><a href="mailto:alex_patino74@hotmail.com">alex_patino74@hotmail.com</a><!-- e -->, gracias nuevamente |
lo siento no quiero molestar pero a quien mas preguntarle? | en MENU OPCIONES / CONFIGURAR FLAGS
suprime /W
saludos.. |
lo siento no quiero molestar pero a quien mas preguntarle? | Alex:
Ahhhh, siempre es más gratificante referirme a tí por tu nombre.
Te he enviado el manualillo a tu correo, por favor me confirmas que lo haz recibido pues mi correo anda con problemas.
Saludos |
lo siento no quiero molestar pero a quien mas preguntarle? | solo una duda, las librerias que no se ni de que seran por ejemplo UUID la debo agregar como de tercero o el verce automaticamente la agrega, igual con un objeto que con el buildx siempre me pide que es C0W32.OBJ??? |
lo siento no quiero molestar pero a quien mas preguntarle? | a proposito para xharbour que archivos .CH generalmente se ponen en el #include?
gracias otra vez |
load *.RES into Imagelist() ? | hi,
i just get stuck to load *.RES into ImageList.
i can load Resource from File into Imagelist() and also Image when have hBitmap / hIcon
under Xbase++ i can use LoadResource() but need to assign it to Object to get hBitmap / hIcon
how under Fivewin <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
load *.RES into Imagelist() ? | Please search for *.prg containing TImageList inside the FWH samples folder. |
load *.RES into Imagelist() ? | hi Enrico,
i have to specify my Question :
how to "load" Bitmap Resource into Imagelist() <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
---
CLASS TImageList have
[code=fw:3f1lau3r]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> oIcon <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"C"</span><br /> <span style="color: #00C800;">if</span> File<span style="color: #000000;">(</span> oIcon <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIco FILENAME oIcon<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIco <span style="color: #0000ff;">RESOURCE</span> oIcon<br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> oIco = oIcon<br /> <span style="color: #00C800;">endif</span> </div>[/code:3f1lau3r]
but how when using Bitmap <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
[code=fw:3f1lau3r]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> BITMAP oBmpImage <span style="color: #0000ff;">RESOURCE</span> cString<br /><span style="color: #B900B9;">// how about oBmpMask ?</span><br />Add<span style="color: #000000;">(</span> oBmpImage, oBmpMask <span style="color: #000000;">)</span></div>[/code:3f1lau3r] |
load *.RES into Imagelist() ? | Dear Jimmy,
You have an example of use in FWH\samples\fivedit.prg
[code=fw:2yavx5al]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">oImageListL</span> = TImageList<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oImageListL</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> oBmp1 := TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"folder"</span>,, ::<span style="color: #000000;">oWnd</span> <span style="color: #000000;">)</span>,;<br /> oBmp2 := TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"fldmask"</span>,, ::<span style="color: #000000;">oWnd</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:2yavx5al] |
load *.RES into Imagelist() ? | hi Antonio,
thx for Answer.
i got it work but Result look different
ICON
[img:10s11lty]https://i.postimg.cc/gjm7MMGx/Imagelist-ICO.jpg[/img:10s11lty]
Bitmap
[img:10s11lty]https://i.postimg.cc/LsjvrzCL/Imagelist-BMP.jpg[/img:10s11lty]
[code=fw:10s11lty]<div class="fw" id="{CB}" style="font-family: monospace;">#ifdef Use_Icon<br /> iImage_0 := oGrid:<span style="color: #000000;">oImageListSmall</span>:<span style="color: #000000;">AddIcon</span><span style="color: #000000;">(</span> acIcon<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> iImage := <span style="color: #0000ff;">MAX</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, oGrid:<span style="color: #000000;">oImageListBig</span>:<span style="color: #000000;">AddIcon</span><span style="color: #000000;">(</span> acIcon<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br />#else<br /> iImage_0 := oGrid:<span style="color: #000000;">oImageListSmall</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> oBmp1 := TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> acBitmaps<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span>,, oDlg <span style="color: #000000;">)</span>,;<br /> oBmp2 := TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> acBitmaps<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span>,, oDlg <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> iImage := <span style="color: #0000ff;">MAX</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, oGrid:<span style="color: #000000;">oImageListBig</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> oBmp1 := TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> acBitmaps<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span>,, oDlg <span style="color: #000000;">)</span>,;<br /> oBmp2 := TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> acBitmaps<span style="color: #000000;">[</span> ii <span style="color: #000000;">]</span>,, oDlg <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br />#endif<br /><br /> LV_ADDITEMS<span style="color: #000000;">(</span> oGrid:<span style="color: #000000;">hLv</span>, aItem, iImage <span style="color: #000000;">)</span><br /><br />#ifdef Use_Icon<br /> DestroyIcon<span style="color: #000000;">(</span> iImage_0 <span style="color: #000000;">)</span><br /> DestroyIcon<span style="color: #000000;">(</span> iImage <span style="color: #000000;">)</span><br />#else<br /> DeleteObject<span style="color: #000000;">(</span> iImage_0 <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> iImage <span style="color: #000000;">)</span><br /><br /> DeleteObject<span style="color: #000000;">(</span> oBmp1 <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> oBmp2 <span style="color: #000000;">)</span><br />#endif</div>[/code:10s11lty]
what i´m doing wrong <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
load *.RES into Imagelist() ? | Dear Jimmy,
Are you properly providing it a masked bitmap for each one ? |
load *.RES into Imagelist() ? | hi Antonio,
[quote="Antonio Linares":4n55795i]Are you properly providing it a masked bitmap for each one ?[/quote:4n55795i]
i do not know what "masked bitmap" mean ...
"just" have try to use your Sample which use different Bitmap ("folder" / "fldmask")
did i "clean up" wrong as it "seems" all use 1st Bitmap <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
load *.RES into Imagelist() ? | Dear Jimmy,
Please review FWH\samples\fldmask.bmp to see what the mask bitmap must contain
Anyhow I don't know why it is repeating it... |
load *.RES into Imagelist() ? | hi,
i found Solution but not sure "why" ... hm
for my TGrid() i use 2 x ImageList() for "Small" / "Big" like Explorer
Imagelsit() for "Big" are only used in "LVS_ICON" Mode but not for "LVS_REPORT" Mode which i use here
now when NOT add Bitmap to "Big" Imagelist() only to "Small" Imagelist() it display right <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
it might be "Size" of "Big" which i have SET to 256 (normal 32) |
load *.RES into Imagelist() ? | very good!
thanks for sharing it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
load a image into xbrowse | cDirImages := "bitmaps\simboli"
WITH OBJECT oApp:oGrid
WITH OBJECT oApp():oGrid:aCols[6]
:bStrImage := { || FIELD->E1 }
:aImgRect := { nil, nil, -40, nil }
END
but FIELD->E1 is a number and I have n that folder images name as 1.png,2.png....
Hiow I can load the image ?
I made :bStrImage := { ||cDirImages+ ltrim(str(FIELD->E1))+".png" } but not work |
load a image into xbrowse | [code=fw:1l5erjig]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\XBRIMAG3.PRG</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, oBrw, oFont, oBold<br /><br /> USE WWONDERS <span style="color: #00C800;">NEW</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;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"VERDANA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-13</span> BOLD<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;">"Image and Text in same cell"</span><br /> oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE <span style="color: #ff0000;">"WWONDERS"</span> ;<br /> COLUMNS <span style="color: #ff0000;">"NAME"</span>,<span style="color: #ff0000;">"DETAILS"</span> COLSIZES <span style="color: #000000;">200</span>, <span style="color: #000000;">250</span> ;<br /> LINES NOBORDER<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">200</span><br /> WITH OBJECT :<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> :<span style="color: #000000;">bStrImage</span> := <span style="color: #000000;">{</span> || FIELD->IMAGE <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">oDataFont</span> := oBold<br /> :<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER + AL_BOTTOM<br /> :<span style="color: #000000;">nDataBmpAlign</span> := AL_CENTER<br /> :<span style="color: #000000;">aImgRect</span> := <span style="color: #000000;">{</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">-40</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /> END<br /> <span style="color: #B900B9;">//</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /> oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br /> oWnd:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">700</span><br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1l5erjig] |
load a image into xbrowse | yes of course
but I use tdata |
load a image into xbrowse | [quote:1irw0mfr][code=fw:1irw0mfr]<div class="fw" id="{CB}" style="font-family: monospace;">I made :<span style="color: #000000;">bStrImage</span> := <span style="color: #000000;">{</span> ||cDirImages+ ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>FIELD->E1<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">".png"</span> <span style="color: #000000;">}</span> but not work<br /> </div>[/code:1irw0mfr][/quote:1irw0mfr]
Please try
[code=fw:1irw0mfr]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">bStrImage</span> := <span style="color: #000000;">{</span> ||cDirImages+ <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> + ltrim(str(FIELD->E1))+"</span>.png<span style="color: #ff0000;">" }<br /></span></div>[/code:1irw0mfr]
[quote:1irw0mfr]but I use tdata[/quote:1irw0mfr]
So?
Simply substitute FIELD->E1 with oDbf:e1
[code=fw:1irw0mfr]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">bStrImage</span> := <span style="color: #000000;">{</span> ||cDirImages+ <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> + ltrim(str(oDbf:E1))+"</span>.png<span style="color: #ff0000;">" } <br /></span></div>[/code:1irw0mfr] |
load a image into xbrowse | thanks Rao
the png are smaller and go up the previous column |
load a popmenu from urlink | [code=fw:ivhrf19u]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oUrlLink<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"test"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"N/B"</span><br /><br /> oUrlLink = TUrlLink<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;">100</span>, oDlg,,, <span style="color: #ff0000;">"www.fivetechsoft.com"</span>,, CLR_GRAY, CLR_WHITE, CLR_YELLOW, .T. <span style="color: #000000;">)</span><br /> oUrlLink:<span style="color: #000000;">bAction</span> = <span style="color: #000000;">{</span> || ShowPopup<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> ShowPopMenu<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oMenu<br /><span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br /><span style="color: #0000ff;">MenuItem</span> <span style="color: #ff0000;">"one"</span><br /><span style="color: #0000ff;">MenuItem</span> <span style="color: #ff0000;">"two"</span><br /><span style="color: #0000ff;">endMenu</span><br /><span style="color: #0000ff;">endmenu</span><br /><span style="color: #00C800;">return</span> oMenu</div>[/code:ivhrf19u] |
load a popmenu from urlink | [code=fw:o8mt8qom]<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;">"URLLink.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> oDlg, oUrlLink, oFont1<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Verdana"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-18</span><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;">800</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"N/B"</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont1<br /><br /> <span style="color: #B900B9;">// oUrlLink = TUrlLink():Redefine( 100, oDlg,,, "www.fivetechsoft.com",, CLR_GRAY, CLR_WHITE, CLR_YELLOW, .T. )</span><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> URLLINK oUrlLink <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> URL <span style="color: #ff0000;">"www.fivetechsoft.com"</span> <span style="color: #0000ff;">FONT</span> oFont1;<br /> CLRINIT nRGB<span style="color: #000000;">(</span><span style="color: #000000;">100</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span> CLROVER nRGB<span style="color: #000000;">(</span><span style="color: #000000;">50</span>,<span style="color: #000000;">150</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /><br /> oUrlLink:<span style="color: #000000;">bAction</span> = <span style="color: #000000;">{</span> || ShowPopupMenu<span style="color: #000000;">(</span>oDlg, oUrlLink<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont1<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> ShowPopupMenu<span style="color: #000000;">(</span>oDlg, oUrlLink<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oMenu, nRow := oUrlLink:<span style="color: #000000;">nTop</span> + oUrlLink:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">1</span><br /><span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br /> <span style="color: #0000ff;">MenuItem</span> <span style="color: #ff0000;">"one"</span><br /> <span style="color: #0000ff;">MenuItem</span> <span style="color: #ff0000;">"two"</span><br /> <span style="color: #B900B9;">// endMenu</span><br /><span style="color: #0000ff;">endmenu</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #0000ff;">OF</span> oDlg <span style="color: #00C800;">AT</span> nRow , <span style="color: #000000;">20</span> <br /><br /><span style="color: #00C800;">return</span> oMenu</div>[/code:o8mt8qom]
Regards, |
load a service on server | I need to write a program to load as a service on a server.
What special considerations do I need to be aware of?
Thanks. |
load a service on server | Don,
<!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=1230&highlight=service">http://fivetechsoft.com/forums/viewtopi ... ht=service</a><!-- m --> |
load png from rpreview | I need to coverte this function to use on rpreview to load my png images
oBtn:hBitmap1 = FWBitmap2( "EXCEL" )
it run but the image is compress so is not compatible with png
STATIC FUNCTION FWBitmap2( cResname )
LOCAL oBitmap
DEFINE BITMAP oBitmap RESNAME cResname
IF HB_IsObject( oBitmap )
RETURN oBitmap:hBitmap
ENDIF
RETURN 0 |
load png from rpreview | [quote:1wf108rx]to use on rpreview to load my png images[/quote:1wf108rx]
Do you want to use png images on the buttonbar for rpreview? |
load png from rpreview | To use png images on any buttonbar
[code=fw:1xldrjsi]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>,<span style="color: #000000;">64</span> <span style="color: #000000;">2010</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage7.png(32x32)"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Onr"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage8.png(32x32)"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Two"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage9.png(32x32)"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Three"</span><br /> </div>[/code:1xldrjsi]
[url=https://imageshack.com/i/pnBBmxedp:1xldrjsi][img:1xldrjsi]https://imagizer.imageshack.com/v2/xq70/923/BBmxed.png[/img:1xldrjsi][/url:1xldrjsi] |
load png from rpreview | [quote="nageswaragunupudi":xmbv4y4k]To use png images on any buttonbar
[code=fw:xmbv4y4k]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>,<span style="color: #000000;">64</span> <span style="color: #000000;">2010</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage7.png(32x32)"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Onr"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage8.png(32x32)"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Two"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\p</span>ngs<span style="color: #000000;">\i</span>mage9.png(32x32)"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Three"</span><br /> </div>[/code:xmbv4y4k]
[url=https://imageshack.com/i/pnBBmxedp:xmbv4y4k][img:xmbv4y4k]https://imagizer.imageshack.com/v2/xq70/923/BBmxed.png[/img:xmbv4y4k][/url:xmbv4y4k][/quote:xmbv4y4k]
Yes of course but Then i have problems with zoom buttons because have two pngs
Hbitmap1 and hbitmap2 |
load png from rpreview | oPreview:oZoom:hBitmap1 = FWBitmap( "Zoom2" )
oPreview:oZoom:hBitmap2 = FWBitmap( "OnePage2" )
oPreview:oZoom:bBmpNo = { || If( oPreview:lZoom, 2, 1 ) }
How I can converte it ? How I can change the images with mine pngs ? |
load png from rpreview | [code=fw:1kmod95q]<div class="fw" id="{CB}" style="font-family: monospace;">oPreview:<span style="color: #000000;">oZoom</span>:<span style="color: #000000;">hBitmap1</span> = FW_ReadImage<span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"aa.png(32x32)"</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br />oPreview:<span style="color: #000000;">oZoom</span>:<span style="color: #000000;">hBitmap2</span> = FW_ReadImage<span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"bb.png(32x32)"</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br />oPreview:<span style="color: #000000;">oZoom</span>:<span style="color: #000000;">bBmpNo</span> = <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oPreview:<span style="color: #000000;">lZoom</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:1kmod95q] |
load png from rpreview | Now Run ok |
loadFromString() -> Modifications! | Linares... your method loadFromString() was a perfect solution for my problems! Exists a way to use this same method but now, to open a image different that .bmp? For example, a .jpg or .gif image?Something using a CreateMemFile() ... ?? Or some else!!Thanks! |
loadFromString() -> Modifications! | olá,vc pode usar desta forma também...[code:lyj0a771]
#include "fivewin.ch"
Function Teste()
cFileBmp = cGetFile("*.bmp")
cFileJpg = cGetFile("*.jpg")
cFileGif = cGetFile("*.gif")
cEncBmp = 'c:\temp\memo_bmp.tmp'
cEncJpg = 'c:\temp\memo_jpg.tmp'
cEncGif = 'c:\temp\memo_gif.tmp'
FMimeEnc(cFileBmp,cEncBmp)
FMimeEnc(cFileJpg,cEncJpg)
FMimeEnc(cFileGif,cEncGif)
cTmpFileBmp = 'c:\temp\bmplida.bmp'
cTmpFileJpg = 'c:\temp\jpglida.jpg'
cTmpFileGif = 'c:\temp\giflida.jpg'
FMimeDec(cEncBmp,cTmpFileBmp)
FMimeDec(cEncJpg,cTmpFileJpg)
FMimeDec(cEncGif,cTmpFileGif)
msginfo( 'OK !' )
return
[/code:lyj0a771]um abraço |
loadFromString() -> Modifications! | Yuri... valeu pela resposta... mas não compreendi muito bem oq tu quis dizer!Na verdade a situação é a seguinte: Uma imagem é gravada no banco de dados, em um campo BLOB. Com o método loadFromString() que Linares implementou, é possível carregar essa imagem diretamente do banco, sem a necessidade de criá-la em disco.Mas isso funciona para arquivos bitmap. Gostaria do mesmo para quaisquer tipos de imagem, ou, pelo menos, para bitmap, jpeg e gif. |
loadFromString() -> Modifications! | olá Julio,desculpe, eu deveria ter sido mais claro...eu gravo imagens em arquivo tipo Memo, que seriam os "equivalentes" aos BLOBs e faço desta forma, onde a imagem é criada no disco somente temporariamente, sendo deletada depois (não vi o método LoadFromString, mas tenho quase certeza que ele cria um arquivo temporário no disco para depois deletá-lo)veja este exemplo:[code:1i6046bb]
#include "fivewin.ch"
Function Teste()
local cFileDbf := 'c:\temp\Dados.DBF'
local aEstr := {{"cNome","C",30,00},;
{"cExte","C",05,00},;
{"mImag","M",10,00} }
if .not.file(cFileDbf)
DBCREATE(cFileDbf,aEstr,'DBFNTX',.T.,'temp')
else
DBUSEAREA(.T.,'DBFNTX',cFileDbf,'temp',.F.)
endif
if neterr()
? 'Erro ao abrir arquivo '+cFileDbf
return
endif
SELECT temp
while .t.
nOpc=ALERT('Selecione a opção:',{'Gravar Imagens','Ler Imagens gravadas'},'Opções:')
if nOpc<1
close all
return
endif
if nOpc=1
oTela=nil
oNome=nil
lSalva=.F.
memvar->cNome=SPACE(30)
cPath=cGetFile("*.jpg",'Selecione a imagem desejada')
if .not.file(cPath)
close all
return
endif
define dialog oTela from 01,01 to 20,60 title 'Gravando imagem em Memo'
@ 01,01 say 'Imagem:' OF oTela COLOR CLR_BLACK
@ 01,06 say cPath OF oTela COLOR CLR_HBLUE
@ 03,01 say 'Digite o nome para imagem:' of oTela COLOR CLR_BLACK
@ 4.5,01 get oNome VAR memvar->cNome of oTela
@ 05,01 button 'Gravar' of oTela size 50,12 action (lSalva:=.t.,oTela:End()) CANCEL
activate dialog oTela centered
if .not.lSalva
loop
endif
cTemp = 'c:\temp\temp001.tmp'
FMimeEnc(cPath,cTemp)
if file(cTemp)
cMemo=memoread(cTemp)
cMemo=STRTRAN(cMemo,CRLF,'')
temp->(DBAPPEND())
REPLACE temp->cNome with memvar->cNome
REPLACE temp->cExte with cFileExt(cPath)
REPLACE temp->mImag with cMemo
ferase(cTemp)
msginfo('Imagem salva com sucesso !')
else
? 'Imagem não pode ser salva !'
endif
else
oTela=nil
oNome=nil
oImage=nil
lSalva=.F.
memvar->cNome=SPACE(30)
define dialog oTela from 01,01 to 20,60 title 'Lendo imagem em Memo'
@ 01,01 say 'Digite o nome para imagem:' of oTela COLOR CLR_BLACK
@ 2.5,01 get oNome VAR memvar->cNome of oTela
@ 05,01 button 'Ler' of oTela size 50,12 action (lSalva:=.t.,oTela:End()) CANCEL
activate dialog oTela centered
if .not.lSalva
loop
endif
cMemo=''
memvar->cExte=''
temp->(dbgotop())
while .not.temp->(eof())
if ALLTRIM(UPPER(temp->cNome)) == ALLTRIM(UPPER(memvar->cNome))
cMemo=temp->mImag
memvar->cExte=ALLTRIM(temp->cExte)
endif
temp->(dbskip())
enddo
if empty(cMemo)
? 'Arquivo não contém imagem com este nome !'
loop
endif
cTemp = 'c:\temp\temp002.tmp'
MEMOWRIT(cTemp,cMemo)
if file(cTemp)
cTemp2 = 'c:\temp\temp003.'+memvar->cExte
FMimeDec(cTemp,cTemp2)
if file(cTemp2)
ferase(cTemp)
ShellExecute(GetActiveWindow(),"open",cTemp2)
msginfo('Tecle algo para ler outra imagem','OK')
ferase(cTemp2)
else
? 'Imagem não pode ser lida !'
endif
else
? 'Imagem não pode ser lida !'
endif
endif
enddo
return
[/code:1i6046bb]
desta forma a imagem (qualquer extensão) está contida no campo MEMO do arquivo, certo ? quando eu precisar utilizá-la eu a salvo em um arquivo temp e realizo os procedimentos desejados...
no exemplo, estou somente visualizando, mas se eu precisar exibi-la em uma dialog por exemplo, seria somente fazer:
[code:1i6046bb]
01,01 IMAGE oImage FILANEM cTemp2 SIZE 100,50 OF oTela , etc, etc,
[/code:1i6046bb]e depois de encerrar o dialogo deletar o arq tempespero q te ajudeum abraço |
loadFromString() method... Has been answered! | I have an image recorded on a table in MySQL database. Is there any way of
TBitmap open this file without the need to create on the hard disc?
I have using this:
[code:n62hb0xf]
cResult := Result of this query -> [ SELECT image FROM table1 ]
memoWrit( "C:\IMG001.BMP", cResult )
oImagem:loadBMP( "C:\IMG001.BMP" )
oImagem:refresh()
[/code:n62hb0xf]
Is there a way to load an image into an object of type TBitmap or any other
kind of a string directly from the database?
Something like :loadFromString () method from the Delphi? |
loadFromString() method... Has been answered! | Has been answered in [url:14qf9olt]http://fivetechsoft.com/forums/viewtopic.php?t=10158&highlight=image+string[/url:14qf9olt] |
loading order of libraries | Good morning,
I have a question about loading order of libraries.
I found this: There is two jquery libraries :
1. Core
2. UI
Thus , the order is :
Load jquery.min.js (core)
Then :
Import bootstrap.min.js (Where you have Carousel)
Then ,
jquery.ui.js (UI) (Where you have accordion)
Anyway, we recommend to wrap all your code when document is ready :
$(function(){ // All your code here })
But how is this done to wrap all code?
How abour loading order of CSS files.
Best regards,
Otto |
loading order of libraries | @Otto
The load order of CSS doesn't really matter unless you're doing stuff from Javascript that depends on the styles somehow being present.
the bootstrap JS doesn't need the styles, it's just a complement to them
I don't know about jQuery UI, but I believe it's the same
when I say load order doesn't matter I mean you won't get different results from loading them in a different order
unlike for JS
About wrapping the code:
by default JS code runs where you put the s cript tag
the HTML parser reads the HTML file,
and it it finds a <s cript> tag it'll stop the world and download it (if it has a src attribute) and then run it before moving on to the following HTML
that means that if you have a <s cript> tag in the document's <h ead>, you won't have access to anything in the <b ody>
j Query gives you an easy way to solve this by wrapping all of your code into a function, like this:
j Query(function($) {
// your code here, it can use `$` as the jquery object
});
and the code inside that function expression will be run after the page is completely loaded |
loading order of libraries | Andreu, what happens if two function in different js files have the same name.
Andreu'); DROP TABLE users; -- 17:46 Uhr
@Otto If they're loaded as scripts rather than as modules (which is the default), and they're not defined inside a block scope or a function, the one which is loaded later shadows the other
If you need a separate "context" for different JS files, try using either the jQuery wrapper
or you can use a JS pattern called an IIFE (immediately invoked function expression):
(function() {
// your code here
})();
(bearbeitet)
but note that any functions you define inside the jQuery wrapper or inside an IIFE won't be available for code outside of the wrapper
if you need them to be available outside, you can use:
window.myFunction = function(arg1, arg2) {
// your code here
}; |
loading the data info from dbf | I load in the aItems array first a line that I need for the umbrella info, then I load the services in the same array aItems
[code=fw:1neac5lq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aItems:=AddFirstRecord<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />aItems := oRigheInvoice:<span style="color: #000000;">DbfToArray</span><span style="color: #000000;">(</span> cItemFlds, <span style="color: #000000;">{</span> || FIELD->Invoice ==alltrim<span style="color: #000000;">(</span>nInvoice<span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span></div>[/code:1neac5lq]
the problem is that
aItems := oRigheInvoice:DbfToArray( cItemFlds, { || FIELD->Invoice ==alltrim(nInvoice) } )
delete everything in aItems
how should i not delete what it finds in aItems? |
loading the data info from dbf | Now I correct with
aItems:=AddFirstRecord(...)
aRighe:={}
aRighe := oRigheInvoice:DbfToArray( cItemFlds, { || FIELD->Invoice ==alltrim(nInvoice) } )
for n= 1 to len(arighe)
aadd( aItems,aRighe[n])
next
but is it correct to do it this way? |
localidades y provincias argentina? | buenas noches.
por favor alguien tiene un sql con las provincias y localidades de la argentina? he encontrado uno pero tiene datos como
INSERT INTO `localidad` VALUES ('19704', 'CA DEL DIABLO', '5539', '13');
y 'CA del diablo' no existe aqui en la provincia. y asi varios...
Gracias. |
localidades y provincias argentina? | Mira este:
[url:p1qsvdum]http://www.alejandrosoler.com.ar/descargar-tablas-codigos-provincias-localidades-argentina/[/url:p1qsvdum]
Y este?
[url:p1qsvdum]https://gist.github.com/CharlyJazz/b323b4937d0c3be6fa6142f876b742d5[/url:p1qsvdum]
Saludos |
localization | Hi all,
How to localize my app in italian ?
(days, months, ecc)
I tried hb_langselect("IT") function but it returns the following message: "invalid language selected"
do I miss something to link in ?
any idea ?
many thanks
Roberto Chiaiese |
localization | Roberto,
Please try this:
[code:330teex4]
REQUEST HB_Lang_IT
HB_LangSelect("IT")
[/code:330teex4] |
localization | Yes, it works
thank you
Roberto |
localizzazione italiana | Ciao a tutti
vorrei sapere come si fa a localizzare il programma in italiano
(giorni, mesi, ecc)
ho provato con la funzione hb_langselect("IT") ma mi restituisce l'errore "invalid language selected"
qualche suggerimento ?
grazie
Roberto Chiaiese |
localizzazione italiana | Eccoti un esempio funzionante:
[code:uac6t1ar]REQUEST HB_LANG_IT
FUNCTION MAIN()
HB_LANGSELECT( "IT" )
? CMONTH( DATE() )
INKEY( 0 )
RETURN NIL[/code:uac6t1ar]
EMG |
localizzazione italiana | e già, mi mancava questa:
[code:14mjxh4j]REQUEST HB_LANG_IT[/code:14mjxh4j]
grazie
Roberto |
localizzazione italiana | Linares mi ha detto di usare queste linee ma la seconda mi da errore
REQUEST HB_LANG_IT
REQUEST HB_CODEPAGE_IT
serve solo la prima linea |
localizzazione italiana | poi nel programma principale l'inserimento di queste :
HB_LANGSELECT( 'IT' )
HB_SETCODEPAGE( 'IT' )
e poi
per esempio
cAppName := i18n("nome applicazione")
ma se io volessi inserire nel menu principale la possibilità di cambiare lingua ( cioè tutte le parole e settare la lingua per sempio tedesco o inglese come dovrei fare )
c'è un programmino in automatico che crea una dialog di inserimento o modifica ? |
localizzazione italiana | non mi risulta che ci siano funzioni per cambiare automaticamente la lingua, in ogni caso dovrebbe essere abbastanza semplice implementare una dialog con un menu a tendina per la selezione della lingua.
Se posso però esprimere un mio parere personale, sconsiglierei una soluzione di questo tipo, dato che in questo modo si traducono soltanto i mesi, giorni, e molti (ma non tutti) messagi di errore. L'utente infatti potrebbe aspettarsi la traduzione di tutte le finestre, dialogs, messaggi, ecc. creandoti soltanto problemi se la tua applicazione non è realmente "multilanguage"
Roberto Chiaiese |
localizzazione italiana | ma guarda in effetti si puo' fare quello che dici ed io ho un esempio di applicazione che fa esattamente la traduzione di ogni cosa
tu puoi settare la lingua e salvarla in un file lng
puoi tradurre tutte le parole e salvarle ... sto osservando il sorgente per vedere cosa fa in realtà .. presto vi faccio sapere ... me lo hanno inviato ierisera e non ho avuto tempo di vederlo . |
localizzazione italiana | ok ho visto ...
hanno fatto una classe semplice : Tdict
con questa tu puoi andare a caricare il file delle lingue e modificare le frasi o le parole
poi nell'applicazione puoi usare semplicemente per esempio:
[code:2no4ngfq]
REDEFINE LISTBOX oLbx FIELDS ;
HEADERS i18n("Codice"), i18n("Descrizione") ;
ID 301 OF oDlg UPDATE ;
ON DBLCLICK ( lSave := .T., oDlg:END() )
[/code:2no4ngfq]
mi piace è un buon metodo..... |
localizzazione italiana | Ok per le singole parola,
ma come funziona per intere frasi ?
Effettua una traduzione parola per parola ?
Marco |
localizzazione italiana | probabilmente è la stessa classe che usa andy per xmate infatti io e Garombo stiamo traducendo tutto : menu,bottoni,frasi parole,messaggi d'errore insomma tutto !!
io la classe l'ho provata e funzionicchia solo che non capisco come posso fare per aggiungere altre parole tra quelle gia inserite
Posso fare la traduzione e salvarle : la classe è semplice ma putroppo non vedo il metodo add o qualcosa che gli si assomigli probabilmente questa in mio possesso è una copia errata o vecchia di quella che usa Andy .
Ti devo inviare la classe così magari trovi l'arcano...
>Effettua una traduzione parola per parola ?
non fa la traduzione ma ci sono due colonne da una parte c'è la colonna in spagnolo e dall'altra la possibile colonna da inserire in italiano poi il file si salva ma è meglio vedere la classe come funziona invece di stare qui a parlarne |
localizzazione italiana | nella classe c'è questa funzione che non ho trovato nell'help di xharbour
HB_I18nLoadTable( cFile )
in sostanza va a caricare un file .hil
questo file sembra in ascii ma non lo è
[url=http://img147.imageshack.us/my.php?image=lang5pp.jpg:232s5ups][img:232s5ups]http://img147.imageshack.us/img147/1387/lang5pp.th.jpg[/img:232s5ups][/url:232s5ups]
[/img] |
localizzazione italiana | Silvio,
[quote="Silvio":2p0vkpb2]probabilmente è la stessa classe che usa andy per xmate infatti io e Garombo stiamo traducendo tutto [/quote:2p0vkpb2]
non darmi dei meriti che non ho,
poi, io che non conosco l'inglese!!! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
mi sembra un po' troppo! |
lock params from low level | #include <hbapiitm.h>
PHB_ITEM pBlock = NULL;
...
pBlock = hb_itemParam( 1 ); // 1 for first parameter. Automatically calls hb_gcGripGet()
...
hb_evalBlock0( pBlock );
...
hb_itemRelease( pBlock ); // automatically calls hb_gcGripDrop() |
lock() en txbrowse | Por favor amigos del foro
si me pueden ayudar con algun ejemplo
para bloquear un registro usando txbrowse
Gracias por su tiempo
Saludos
Oscar |
lock() en txbrowse | Oscar,
En el ejemplo samples\TestXBrw.prg prueba lo siguiente:
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, If( RLock(), ( FieldPut( o:nCreationOrder, v ), DbUnLock() ), MsgStop( "locked record!" ) ), ) } |
lock() en txbrowse | Funciono perfecto
listo, gracias Antonio
Saludos
Oscar |
lock() en txbrowse | Existe algo parecido a prevedit en txbrowse
Saludos
Oscar |
lock() en txbrowse | Oscar,
Que es lo que necesitas hacer en ese bPrevEdit ? |
lock() en txbrowse | No permitir la edicion del campo cuando este este lleno, es un campo clave, o que me permitar editarlo cuado es un registro nuevo
Gracias
Saludos
Oscar |
lock() en txbrowse | Gracias oSkar voy a probar
Saludos
Oscar |
lock() en txbrowse | oSkar
si no es molestia me podrias ayudar con un ejemplo de como insertar un reg.
si no donde puedo conseguir ejemplos con txbrowse, si puedes enviamelos mi correo es :
<!-- e --><a href="mailto:easysoft@andinanet.net">easysoft@andinanet.net</a><!-- e -->
Saludos
Oscar |
lock() en txbrowse | Antes que nada gracias por el interes en ayudarme
estoy usando la dbf
Saludos
Oscar |
log create | how may turn on to create log file ? |
log create | Do you mean this?
logfile( "log.txt" , {cVar1 , nVar2, dVar3, customer->first, customer->last } )
LogFile( <cFileName>, <aInfo> ) --> nil
bye |
log create | create log file to find runtime error |
log create | Harbour creates it automatically, if possible |
log create | [quote="kajot":2wnxmzvw]create log file to find runtime error[/quote:2wnxmzvw]
[quote:2wnxmzvw]
Harbour creates it automatically, if possible
[/quote:2wnxmzvw]
Except if there is an error in the expression that generates the .log file |
logic value in txbrowse cell | Hi all,
I have an issue with a logic cell in my txBrowse.
Column 4 represents a field of type "L".
[code=fw:2l3o9zvp]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span><br /> :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">bLDClickData</span> := <span style="color: #000000;">{</span> || pos->okay := !pos->okay, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br />END<br /> </div>[/code:2l3o9zvp]
Now I can toggle the cell value by doubleclick.
But I can't toggle with no keypress at all.
What do I miss? |
logic value in txbrowse cell | I use this to toggle a Logic field with F2 Key
oBrw[1]:bKeyDown := {| k | IF ( K == VK_F2, if(oBrw[1]:uitass:value = .f., oBrw[1]:uitass:Varput( .t. ), oBrw[1]:uitass:Varput( .F. ) ) , NIL ) } |
logic value in txbrowse cell | Thanks, Marc.
Your idea works for me. |
logic value in txbrowse cell | [code=fw:20e7md7f]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span><br /> :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, .t. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// .t. means :nEditType := EDIT_GET</span><br /><span style="color: #B900B9;">// :bLDClickData := { || pos->okay := !pos->okay, oBrw:Refresh() } // not required</span><br />END<br /> </div>[/code:20e7md7f]
Double click on cell automatically toggles the value.
If marqueestyle <= 4, <Space> key toggles the value. |
logic value in txbrowse cell | Thanks for your suggests, Mr. Rao.
It works fine now. |
logical character Read | Hello
I want to write a small program that checks integrity of a dbf file. We have more and more customers having corrupted data in their dbf files.
I have observed the corrupted files and noticed that numeric fields are corrupted with nonsense data but always numeric nonsense, so not easy to track.
The key point is "logical fields" that should contain .t. or .f.
It seems that dbf's integrity is completely broken in these fields where i can find any nonsense chartacter.
I have tried to write a function but i get stuck on reading the logical character
The idea is , read the structure of a dbf file, if the field is loigical test the content of the field and make sure there is .t. or .f.
How can i read the content of the field ?
VALTYPE(...) will always return L for those fields
CVALTOCHAR() willreturn .F. for corrupted fields but not the content
What other function i can use ? Any clue ?
Thanks for your time,
Richard |
logical character Read | Maybe this function could help you.
Regards,
Otto
FUNCTION Translate( cDateiname)
*lMode,oMeter,oOk,oCancel,oDlg,oDbfWnd,lRun)
LOCAL aData
LOCAL bBlock
LOCAL nCounter, nRecno, nStep, nUpd, nFor
LOCAL lAlert
local lMode :=.f.
LOCAL oGaugeDlg
LOCAL oGet1
LOCAL oMeter
LOCAL nActual := 0
LOCAL nTotal := 0
LOCAL cStatusMsg := cDateiname
DbGoBottom()
nTotal := recno()
DEFINE DIALOG oGaugeDlg RESOURCE "DLG_GAUGE" TITLE (" " )
REDEFINE GET oGet1 VAR cStatusMsg ID 2051 OF oGaugeDlg
REDEFINE METER oMeter VAR nActual TOTAL nTotal ID 2052 OF oGaugeDlg
ACTIVATE DIALOG oGaugeDlg ;
CENTERED ;
NOWAIT
oGet1:Refresh()
DbGotop()
IF !lMode
bBlock := {|val,elem| Fieldput(elem,f_isOEM(@val,elem))}
ENDIF
DO WHILE !Eof()
oMeter:Set(nActual+1)
SysRefresh()
aData := Scatter()
Aeval(aData ,bBlock)
dbSkip()
ENDDO
DbUnlock()
oMeter:End()
oGaugeDlg:End()
sysrefresh()
RETURN NIL
FUNCTION scatter(nInicial,nFinal)
local fvals := {} , fnum := 1
nInicial := iif(nInicial == NIL, 1,nInicial )
nFinal := iif(nFinal == NIL, fcount(),nFinal )
Asize(fvals,nFinal-nInicial+1)
aeval(fvals, {|elem| fvals[fnum++] := fieldget(fnum+nInicial-1)})
Return(fvals)
func f_isOEM(val,elem)
local i:=0
msginfo(valtype(elem))
IF valtype(elem)="C"
msginfo(val)
ENDIF
/*
FOR I := 1 TO len(val)
IF ASC(substr(val,i,1)) > 128
VAL:=STRTRAN(VAL,chr(132),"ä")
VAL:=STRTRAN(VAL,chr(148),"ö")
VAL:=STRTRAN(VAL,chr(129),"ü")
VAL:=STRTRAN(VAL,chr(142),"Ä")
VAL:=STRTRAN(VAL,chr(154),"Ü")
VAL:=STRTRAN(VAL,chr(153),"Ö")
VAL:=STRTRAN(VAL,chr(225),"ß")
VAL:=STRTRAN(VAL,chr(179),"ü")
VAL:=STRTRAN(VAL,chr(245),"ä")
VAL:=STRTRAN(VAL,chr(175),"ß")
VAL:=STRTRAN(VAL,chr(247),"ö")
msginfo(VAL+" "+ substr(val,i,1)+" "+ str(ASC(substr(val,i,1))))
ENDIF
*/
return (val) |
logical character Read | Richard
I think it can only be done when each record from the dbf is read with freadstr
[code:2m7k9thl]
FUNC MAIN(cDbf)
LOCAL nHandle , nPos , nRecSize , nRecords
LOCAL i , el
LOCAL cRecord
LOCAL aStruct
LOCAL aPos[0] , Sum
IF pCount() == 0
cDbf := "TestDbf"
DbCreate( cDbf ,{{"String","C",10,0},{"Logical","L",1,0}})
USE (cDbf)
APPEND BLANK
TestDbf->String := "Record 1"
TestDbf->Logical := .F.
APPEND BLANK
TestDbf->String := "Record 2"
TestDbf->Logical := .T.
CLOS All
END
USE (cDbf)
nPos := Header()
nRecSize := RecSize()
nRecords := Reccount()
aStruct := DbStruct()
sum := 0
FOR EACH el IN aStruct
sum += el[3]
IF el[2] == "L"
AADD(aPos,Sum+1)
END
NEXT
CLOS ALL
nHandle := fopen("TestDbf.dbf")
fSeek(nHandle,nPos)
FOR i := 1 TO nRecords
cRecord := fReadStr(nHandle,nRecSize)
? cRecord
FOR EACH el In aPos
? cRecord[el]
NEXT
NEXT
WAIT
fclose(nHandle)
RETURN
[/code:2m7k9thl] |
logical character Read | [quote="Richard Chidiak":1jtq0nr5]We have more and more customers having corrupted data in their dbf files.[/quote:1jtq0nr5]
I would search for the real reason. Only three possible causes come up to my mind:
- you are using a bugged xHarbour version
- an hardware/software problem in the customers PC
- a bug in your code
EMG |
logical character Read | Enrico
- you are using a bugged xHarbour version
The problem is old and i think dbf integrity has always been broken in Harbour / xharbour.
- an hardware/software problem in the customers PC
It is possible but i do not think so, too many hardware problems at one time ?
- a bug in your code
I wish it was so, i could correct it. But how can i dump into dbf something like word dcouments or any other stuff i don't know about ... This is what we usually find in these corrupted files or "cabalistic unreadable characters". This is why i want an inhouse maintenance program that can remove them
Thanks for your concern, <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Richard |
logical character Read | [quote="Richard Chidiak":2bfgxgtk]The problem is old and i think dbf integrity has always been broken in Harbour / xharbour.[/quote:2bfgxgtk]
I never heard of such problems in [x]Harbour RDDs.
EMG |
logical character Read | Richard,
The corruption may be related to Windows and Novell settings. Here are some old messages about this.
James
[quote:31l1k27g]---------------------------------
From: "Peter Kohler" <peter.kohler@pixie.co.za>
Subject: Dbf / Cdx corruption
Date: Monday, November 17, 2003 4:40 AM
We have been and are still experiencing a lot of dbf / cdx database
corruption in our apps.
We know this is related to oplocks and client caching.
We now turn off oplcocks and cacheing via the registry settings below
However we are still having problems at clients that use XP workstations
XP seems to cache data and we seem to not have found the correct settings to
turn this off
Can anybody comment on any other registry settings thay they use to prevent
dbf/cdx problems?
Thanks
Peter
***************************************
WINDOWS CLIENT OPLOCK ENTRIES
+ Windows NT/2000/XP clients only
1) HKEY_LOCAL_MACHINE,
"System\CurrentControlSet\Services\LanmanWorkstation\Parameters",
"EnableOpLocks" Sets to 0 to disable oplock requesting by client
2) HKEY_LOCAL_MACHINE,
"System\CurrentControlSet\Services\LanmanWorkstation\Parameters",
"EnableOpLockForceClosed"
Set to 1 to disable oplock file open caching requesting by client
3) Windows 2000/XP clients only (newer setting for Win2K)
HKEY_LOCAL_MACHINE,
"System\CurrentControlSet\Services\MRXSmb\Parameters", "OpLocksDisabled"
Sets to 1 to turn off oplock requesting by client
+ Windows 98 clients only
4) HKEY_LOCAL_MACHINE,
"System\CurrentControlSet\Services\VxD\VREDIR", "DiscardCacheOnOpen"
Sets to 1 to turn off read caching.
Win 98 clients do not know about oplocks and do not use them.
WINDOWS SERVER OPLOCK ENTRIES
+ Win NT/2000/XP/Win2003 server
1) HKEY_LOCAL_MACHINE,
"System\CurrentControlSet\Services\LanmanServer\Parameters",
"EnableOplocks" Set to 0 to disable oplocks
2) HKEY_LOCAL_MACHINE,
"System\CurrentControlSet\Services\LanmanServer\Parameters",
EnableOplockForceClose" Set to 1 to disable oplock open/close
caching
3) HKEY_LOCAL_MACHINE,
"System\CurrentControlSet\Services\LanmanServer\Parameters",
"CachedOpenLimit" Set to 0 to disable oplock open/close caching
--
Peter Kohler
Quick Software SA
<!-- e --><a href="mailto:peter.kohler@pixie.co.za">peter.kohler@pixie.co.za</a><!-- e --> (home office)
<!-- e --><a href="mailto:peterk@quicksoftware.co.za">peterk@quicksoftware.co.za</a><!-- e --> (office)
--------------------------------------------------
From: "Rick Lipkin" <lipkinrm@yahoo.com>
Subject: Re: Dbf / Cdx corruption
Date: Monday, November 17, 2003 2:17 PM
Peter
If you are on a Novell 5x or greater server .. put this line in the
Autoexec.ncf:
SET CLIENT FILE CACHING ENABLED = OFF
This will turn off any optlock requests from the clients without having to
dig into each desktop registry.
I am not a M$ server guru .. my guess is that you will have to do thr
regedit thing if your app is on a M$ server.
Rick Lipkin[/quote:31l1k27g] |
logical character Read | James
Thanks for your concern,
I am aware about oplocks settings, and we do not have "novell" customers. Though we have a big amount of customers running our app, no Novell, just Microsoft .
I still have to find how to read a logical field... It is the solution to cure, Otto's idea is good, scan all characters to check for valid fields, but this might take quite a while, we have some big databases. I will keep searching.
thank you
Richard |
logoff FiveWin application | I want to log off when the user exits FiveWin application.
the code does not work:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=20856&p=110754&hilit=shutdown#p110754">viewtopic.php?f=3&t=20856&p=110754&hilit=shutdown#p110754</a><!-- l --> |
logoff FiveWin application | [code=fw:3qw74ypr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> ShutDown_Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> .NOT. MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"LogOff Windows?"</span>, <span style="color: #ff0000;">"ShutDown Windows"</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;">ENDIF</span><br /> <br /> WINEXEC<span style="color: #000000;">(</span> <span style="color: #ff0000;">"SHUTDOWN /L"</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: #B900B9;">// Fim</span><br /> </div>[/code:3qw74ypr]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.