topic
stringlengths
1
63
text
stringlengths
1
577k
listbox 10X6
how i can create a listbox 6 column and only ten lines as an small timetable?
listbox 10X6
You may use a DBF with 10 records or an array with 10 items.EMG
listbox 10X6
A sample with bmp-resources [code:37xkjnbc] // as a sample &#58; // a Color-Selection-browser // The Array PRIVATE aBRCOLOR2&#91;12&#93;&#91;2&#93; aBRCOLOR2&#91;1&#93; &#58;= &#123; "1", "Black" &#125; aBRCOLOR2&#91;2&#93; &#58;= &#123; "2", "White" &#125; aBRCOLOR2&#91;3&#93; &#58;= &#123; "3", "Blue" &#125; aBRCOLOR2&#91;4&#93; &#58;= &#123; "4", "Green" &#125; aBRCOLOR2&#91;5&#93; &#58;= &#123; "5", "Red" &#125; aBRCOLOR2&#91;6&#93; &#58;= &#123; "6", "Yellow" &#125; aBRCOLOR2&#91;7&#93; &#58;= &#123; "7", "Magenta" &#125; aBRCOLOR2&#91;8&#93; &#58;= &#123; "8", "SELECT" &#125; aBRCOLOR2&#91;9&#93; &#58;= &#123; " 9", "Borland" &#125; aBRCOLOR2&#91;10&#93; &#58;= &#123; "10", "Tiled" &#125; aBRCOLOR2&#91;11&#93; &#58;= &#123; "11", "Bricks" &#125; aBRCOLOR2&#91;12&#93; &#58;= &#123; "12", "Brush" &#125; oLbx2 &#58;= TXBrowse&#40;&#41;&#58;New&#40; oFld&#58;aDialogs&#91;1&#93; &#41; oLbx2&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLROW oLbx2&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oLbx2&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oLbx2&#58;bClrSel &#58;= &#123;|| &#123;RGB&#40;173,183,4&#41;, RGB&#40;250,247,107&#41; &#125;&#125; oLbx2&#58;SetArray&#40; aBRCOLOR2 &#41; // 2 Cols // ------- oLbx2&#58;aCols&#91; 1 &#93;&#58;cHeader = Padr&#40;"No&#46;", 3&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;cHeader = Padr&#40;"End", 19&#41; oLbx2&#58;lHScroll &#58;= &#46;F&#46; oLbx2&#58;lVScroll &#58;= &#46;F&#46; oLbx2&#58;lFooter &#58;= &#46;F&#46; // What to do, when row blclicked // ------------------------------------- oLbx2&#58;bLClicked &#58;= &#123; | nRow, nCol | Bs_END &#58;= oLbx2&#58;nRowSel, ; IIF&#40; Bs_END < 9, ; &#40; Bs_COLOR2 &#58;= B_COLORE&#40;Bs_END&#41;, oB_COLOR2&#58;Refresh&#40;&#41; &#41;, NIL &#41; &#125; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Black"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"White"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Blue"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Green"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Red"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Yellow"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Magenta"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Farbwahl"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Borland"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Tiled"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Bricks"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;AddResource&#40;"Color"&#41; oLbx2&#58;aCols&#91; 2 &#93;&#58;bBmpData &#58;= &#123;|| oLbx2&#58;nArrayAt &#125; oLbx2&#58;aCols&#91; 2 &#93;&#58;bStrData &#58;= &#123;|| oLbx2&#58;aRow&#91;2&#93; &#125; oLbx2&#58;CreateFromResource&#40; 220 &#41; [/code:37xkjnbc]Best regardsUwe
listbox 10X6
Thanks Emg and ukoenig
listbox 10X6
Sorry , but I must make somethig as it [img:2lai3m94]http&#58;//img174&#46;imageshack&#46;us/img174/4197/tabletimedt6&#46;png[/img:2lai3m94]Can I create it with xharbour and fwh ?
listbox 10X6
Yes, using a browse.EMG
listbox 2nd line
Inserting the 2nd line into a listbox cause a double repaint of the line - also in FWH . How can I to avoid this behavior. Thanks in advance Otto
listbox 2nd line
Disturbing is that the listbox is opened without a scrollbar and after you insert the 2nd line the scrollbar is added. On the PPC this makes an unstable impression to the user. Best regards, Otto
listbox 2nd line
Otto, Could you please provide a small and self contained PRG to reproduce it ? thanks
listbox 2nd line
Hello Antonio, attached the source code to test. Please use the customer.dbf from the samples and delete all records. Then add 2 records with the test program . You will see that the second record forces the browser to insert the vertical scrollbar and repaints the listbox. On a slow device and if you have many controls on the screen this looks instable. I would prefer if the scrollbar would be there immediately when I start. Best regards, Otto [code=fw:1iufrmoc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// FiveWin for Pocket PC - Testing browses with incremental search</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FWCE.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oBrw, hBmp := ReadBitmap<span style="color: #000000;">&#40;</span> CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\g</span>o.bmp"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSay, cSearch := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;USE <span style="color: #000000;">&#40;</span> CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\C</span>ustomer"</span> <span style="color: #000000;">&#41;</span> VIA <span style="color: #ff0000;">"DBFCDX"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! File<span style="color: #000000;">&#40;</span> CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\L</span>AST.CDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Customer->Last <span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span> CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\L</span>AST"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp;Customer-><span style="color: #000000;">&#40;</span> OrdSetFocus<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"LAST"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Customer-><span style="color: #000000;">&#40;</span> DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"IncSearch"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">LISTBOX</span> oBrw ;<br />&nbsp; &nbsp; &nbsp; FIELDS hBmp, Customer->Last, Customer->First ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"First"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">220</span>, <span style="color: #000000;">167</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">12</span>, <span style="color: #000000;">17</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Add"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">30</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>addRec<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">gobottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CLICK</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Click!"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> addRec<br />append blank<br />Customer->Last &nbsp;:= <span style="color: #ff0000;">"test"</span><br />Customer->First := <span style="color: #ff0000;">"test"</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:1iufrmoc]
listbox 2nd line
Otto, If you want the scrollbar to be shown since the beginning maybe you could have a dummy record added, like "items" or "please select" so you never have only one record. Its a workaround for it, as a scrollbar does not allow to manage only one item. It has no sense. It is a Windows listbox control (with WS_VSCROLL style) limitation.
listbox 2nd line
Hello Antonio, Thank you for your answer. But this workaround does not work well. If I add only one record the flickering is there with the first I insert with the program. If I start with 2 dummies on a pocket PC the screen is half full only with the dummies or does the new handy you are working on has such a big screen? <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Best regards, Otto
listbox 2nd line
Otto, Don't use WS_VSCROLL in the listbox. Paint the up and down as bitmaps, beside the listbox, and use them to oListBox:Select() the previous or next item (oListBox:GetSel()) <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
listbox con Select
Buenos dias con todos : Una consulta, tengo un Listbox de una base de datos ordenados por ejemplo asi : INDEX : GRUPO + NOMBRE y este por ejemplo lo activo con el SELECT GRUPO FOR "OFICINA" Esto me permite listar solo el GRUPO de "OFICINA" y ordenado por NOMBRE: Bueno la pregunta...: yo ya tengo un posible nombre a ubicar entonces antes de activar el dialogo realizo lo siguiente : XNOMBRE := "PEREZ" *Busco Aproximadamente con el Softseek SET SOFTSEEK ON SEEK "OFICINA"+ XNOMBRE SET SOFTSEEK OFF REDEFINE LISTBOX oLBX FIELDS PERSONA->NOMBRE, PERSONA->SUELDO ; HEADER "NOBRE","SUELDO MENSUAL" ; FIELDSIZE 30 , 50 ; SELECT GRUPO FOR "OFICINA" ; ID 190 con esto, esperaba que al abrir el Browse se ubicara al menos lo mas cerca o sobre el registro donde se encuentra "PEREZ", pero no es asi, se ubica al principio de la lista del Grupo "OFICNA" Creo que estoy mal en conceptos o falta algo, pues desearia que el registro activo (azul) sea lo mas cercano a "PEREZ" por ejemplo Gracias por la ayuda anticipada lubin
listbox con Select
Lubin, > SEEK "OFICINA"+ XNOMBRE Deberías usar: SEEK XGRUPO + XNOMBRE
listbox con Select
Gracias Antonio por la respuesta, pero si la variable XGRUPO o campo indexado es de siete caracteres de igual manera funciona usandolo con XGRUPO o con "OFICINA", yo lo probe con variables y constantes y el resultado es el mismo problema. quizas falte algo mas al momento de reubicar el puntero del registro ?? [quote="Antonio Linares":2jslx7ov]Lubin, > SEEK "OFICINA"+ XNOMBRE Deberías usar: SEEK XGRUPO + XNOMBRE[/quote:2jslx7ov]
listbox con scroll
Hola gente, necesito que en el listbox cuando edito una celda haga scroll, se puede?
listbox con scroll
No entiendo. ¿Como asi? ¿Puedes explicarlo mejor o publicar un pequeño ejemplo de lo que realmente quieres hacer? Tu pregunta no tiene mucho sentido desde mi punto de vista. Gracias. Regards, saludos.
listbox con scroll
As far as I remember, you need to create a [b:1nktwf0y]text field[/b:1nktwf0y] (see examples on the Internet) and specify the scrollbar property
listbox con scroll
hi, have a look into c:\fwh64\source\classes\datarow.prg [code=fw:ohk5pd2p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDataRow<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;">500</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">TITLE</span> cTitle<br />   oPanel   := TScrollPanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">360</span>, oDlg, .t. <span style="color: #000000;">&#41;</span><br />   ...<br />   oDlg:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> || DlgResize<span style="color: #000000;">&#40;</span> oDlg, oPanel <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   oDlg:<span style="color: #000000;">bOnDisplayChange</span> := <span style="color: #000000;">&#123;</span> | o, n, w, h | AdjustToDisplay<span style="color: #000000;">&#40;</span> o,n,w,h,oPanel <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   ...<br />   oDlg:<span style="color: #000000;">bInit</span>  := <||<br />      oRec:<span style="color: #000000;">PlaceControls</span><span style="color: #000000;">&#40;</span> oPanel, ... <span style="color: #000000;">&#41;</span></div>[/code:ohk5pd2p] so "normal" is to "scroll" a Dialog, not a Control
listbox con scroll
Tengo este listbox: <!-- m --><a class="postlink" href="https://drive.google.com/file/d/1hV2oWaY9nOj2OJ_5TgRL7wnLya-MVe6t/view?usp=sharing">https://drive.google.com/file/d/1hV2oWa ... sp=sharing</a><!-- m --> en la celda que se está editando, se puede que haga scroll sin agrandar el diálogo?
listbox en ventana windows con split
Compañeros, buenas: Hasta ahora, mis tablas de clientes, artículos, proveedores, facturas emitidas.... etc... siempre las presentaba mediante un listbox en una ventana DIALOGS con unos buttons debajo y listo!! con una resolución 800x600 y esto ocupaba prácticamente toda la pantalla. Ahora me encuentro que con la evolución de la informática, las pantallas de los equipos son más grandes (incluiso panorámicas) y esto hace mis dialogs aparezca casi en miniaturas en la inmensidad de la pantalla. Probablemente tendré que adaptarlos a ventanas WINDOWS MDICHILD incluyendo algún SPLITTER y que se adapte al tamaño de cada pantalla automáticamente (que supongo que tendrá que ver con la resolución). ¿Teneis algún código fuente que me sirva de ejemplo Mil Gracias. LORENZO.
listbox en ventana windows con split
Hay varios ejemplos de SPLITTER, pero creo que el codigo de Fivedit0.prg te puede venir muy bien
listbox en ventana windows con split
Lorenzo, yo lo utilizo de la siguiente manera, si te sirve te paso un trozo del codigo para que te des cuenta, todo lo que es mostrar de la manera que decis es no utilizando recursos .rc sino a traves del @ 0,0 t con paneles en su defectos sabiendo la resolucion de la pantalla. [code=fw:w2jzw258]<div class="fw" id="{CB}" style="font-family: monospace;"><br />          <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndChild <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oWnd;<br />                 <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Libro de IVA Ventas"</span><br />                *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-<br />                <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBAR <span style="color: #0000ff;">OF</span> oWndChild <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">36</span>     <br />                       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span>   <span style="color: #0000ff;">OF</span> oBar GROUP;<br />                              <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">LEFT</span>;<br />                              <span style="color: #0000ff;">PROMPT</span>   <span style="color: #ff0000;">"Imprimir"</span>;<br />                              <span style="color: #0000ff;">ACTION</span>   RepIvaVta<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />                       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span>   <span style="color: #0000ff;">OF</span> oBar GROUP;<br />                              <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">LEFT</span>;<br />                              <span style="color: #0000ff;">PROMPT</span>   <span style="color: #ff0000;">"Cerrar"</span>;<br />                              <span style="color: #0000ff;">ACTION</span>   <span style="color: #000000;">&#40;</span> lOk:=.T., oWndChild:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />                       *----------------------------------------------------<br />                       @ <span style="color: #000000;">6</span>, <span style="color: #000000;">630</span> <span style="color: #0000ff;">SAY</span>      oSay1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Desde:"</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span>  <span style="color: #000000;">70</span>,<span style="color: #000000;">25</span><br />                       @ <span style="color: #000000;">6</span>, <span style="color: #000000;">700</span> <span style="color: #0000ff;">GET</span>      oDtp1 <span style="color: #0000ff;">VAR</span> dFecDes     <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">125</span>,<span style="color: #000000;">25</span><br /><br />                       @ <span style="color: #000000;">6</span>, <span style="color: #000000;">831</span> <span style="color: #0000ff;">SAY</span>      oSay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Hasta:"</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span>  <span style="color: #000000;">70</span>,<span style="color: #000000;">25</span><br />                       @ <span style="color: #000000;">6</span>, <span style="color: #000000;">900</span> <span style="color: #0000ff;">GET</span>      oDtp2 <span style="color: #0000ff;">VAR</span> dFecHas     <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">125</span>,<span style="color: #000000;">25</span><br />                       *----------------------------------------------------<br /><br />                *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-<br /><br />                 oBrw := TU CONFIGURACION DE BROWSE<br /><br />                 oWndChild:<span style="color: #000000;">oClient</span> := oBrw<br /><br />         <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndChild <span style="color: #0000ff;">MAXIMIZED</span><br /><br />         </div>[/code:w2jzw258] Los ABM los hago con recursos de al menos 1024x768 que es la resoluci{on mas pequeña en pc hoy en dia Espero te sirva, saludos. Marcelo
listbox header display
Antonio, Redefine listbox (browse) has a bug in displaying headers with national chars (accented characters), The bug comes from wbrowse.prg wbrwline function Actual line 2286 if nRowPos == 0 .and. IsAppThemed() DrawHeader( hWnd, hDC, nTop - 1, nLeft, nBottom, nRight, AnsiToOem( aValues[ n ] ) ) Ansitooem should be removed in order to allow correct display Richard
listbox header display
Richard, thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
listbox horizontal scrollbar
How to disable horizontal scrollbar on listbox? Thanks in advance Otto
listbox horizontal scrollbar
Otto, Have you tried with: oLbx:oHScroll:SetRange( 0, 0 )
listbox not indexed
[img:2a1im4ao]http&#58;//img2&#46;imageshack&#46;us/img2/6394/clienti&#46;png[/img:2a1im4ao] why the records are not indexed ? I made : [code=fw:2a1im4ao]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> <span style="color: #00C800;">Client</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlgClient , oTabs<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oLbx<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cVar<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aHBitMaps:=Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n<br /><br /><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aHBitMaps:= <span style="color: #000000;">&#123;</span> ReadBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"Level1.bmp"</span> <span style="color: #000000;">&#41;</span>, ; <span style="color: #B900B9;">// BitMaps de 14 x 32</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ReadBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"<span style="color: #000000;">\L</span>evel2.bmp"</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ReadBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"<span style="color: #000000;">\L</span>evel3.bmp"</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ReadBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"<span style="color: #000000;">\L</span>evel4.bmp"</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ReadBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"<span style="color: #000000;">\L</span>evel5.bmp"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; USE <span style="color: #000000;">&#40;</span> CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\C</span>lientes"</span> <span style="color: #000000;">&#41;</span> VIA <span style="color: #ff0000;">"DBFCDX"</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> RecCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; APPEND BLANK<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ! File<span style="color: #000000;">&#40;</span> CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\C</span>liName.CDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Clientes->Nombre <span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span> CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\C</span>liName"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;Clientes-><span style="color: #000000;">&#40;</span> OrdSetFocus<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000000;">\C</span>liName"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Clientes-><span style="color: #000000;">&#40;</span> DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgClient &nbsp;<span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Clienti"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> &nbsp;<span style="color: #0000ff;">LISTBOX</span> oLbx FIELDS aHBitmaps<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, Clientes->Nivel <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Clientes->Nombre,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Clientes->Telefono,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Str<span style="color: #000000;">&#40;</span> Clientes->Edad, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADERS &nbsp; &nbsp;<span style="color: #ff0000;">"L"</span>, <span style="color: #ff0000;">"Cognome e nome"</span>, <span style="color: #ff0000;">"Telefono"</span>, <span style="color: #ff0000;">"Ombrellone"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FIELDSIZES <span style="color: #000000;">16</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">80</span>, <span style="color: #000000;">8</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">119</span>, <span style="color: #000000;">140</span> <span style="color: #0000ff;">OF</span> oDlgClient<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Lets use different row colors</span><br />&nbsp;oLbx:<span style="color: #000000;">nClrText</span> &nbsp; &nbsp; &nbsp;= <span style="color: #000000;">&#123;</span> || SelColor<span style="color: #000000;">&#40;</span> Clientes->Nivel <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oLbx:<span style="color: #000000;">nClrForeFocus</span> = <span style="color: #000000;">&#123;</span> || SelColor<span style="color: #000000;">&#40;</span> Clientes->Nivel <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; * oLbx:<span style="color: #000000;">nClrPane</span> = <span style="color: #000000;">&#123;</span> | nCol | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nCol = <span style="color: #000000;">2</span>, CLR_HGREEN, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp; * &nbsp;oLbx:<span style="color: #000000;">nClrForeFocus</span>= <span style="color: #000000;">&#123;</span> || Colores<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CLIENTES"</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; * oLbx:<span style="color: #000000;">nClrText</span> &nbsp; &nbsp; &nbsp;= <span style="color: #000000;">&#123;</span> || Colores<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CLIENTES"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgClient;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> DlgFullScreen<span style="color: #000000;">&#40;</span> oDlgClient:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, oDlgClient:<span style="color: #000000;">SetMenu</span><span style="color: #000000;">&#40;</span> DialogBar<span style="color: #000000;">&#40;</span>oDlgClient,oLbx<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br />&nbsp; AEval<span style="color: #000000;">&#40;</span> aHBitmaps, <span style="color: #000000;">&#123;</span> | hBmp | DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Clientes-><span style="color: #000000;">&#40;</span>DbCloseArea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />RETU <span style="color: #00C800;">NIL</span></div>[/code:2a1im4ao] where I make error ?
listbox recno() display
Hello, I am trying to implement a recno() indicator for the listbox code below. By moving the row selection up or down it would display the related .dbf recno() in the dialog. I gather some sort of bSkip mechanism is required. I do not know the proper coding / syntax to accomplish the task. @ 1, 1 LISTBOX oLbx ; FIELDS TM->Shp_dte, TM->org, TM->DrpA, TM->DrpB ,; TM->DrpC, TM->DrpD, TM->Drvr, TM->Notes ; HEADERS "Ship Date", "Orgin", "A", "B", "C", "D", "DR","Notes" ; FIELDSIZES 60, 45, 45, 45, 45, 45 , 40, 50 ; SIZE 284, 137 OF oDlg // possible ?? // space(5)+ {|nRecs|,dbskipper()} //trans(oTmd:recno(),'99,999') +; // ' / '+trans(oTmd:lastrec(),'99,999') OF oDlg // possible //{|nRecs|,oLbx:keyno() } Any help, much appreciated. Bruce S. FW 6/12 Harbour v3.1 Rev 17222 ilink32 6.21
listbox recno() display
Try using ON CHANGE clause. EMG
listbox recno() display
Enrico, Thanks for your reply. I need a little bit more. So I try : local nRecno local bSkip use TMD alias TM //database oTm not using database statement, just the alias @ 1, 1 LISTBOX oLbx ; FIELDS TM->Shp_dte, TM->org, TM->DrpA, TM->DrpB ,; TM->DrpC, TM->DrpD, TM->Drvr, TM->Notes ; HEADERS "Ship Date", "Orgin", "A", "B", "C", "D", "DR","Notes" ; FIELDSIZES 60, 45, 45, 45, 45, 45 , 40, 50 ; ON CHANGE ( have tried all the syntax below and more ) ; SIZE 284, 137 OF oDlg //ON CHANGE oLbx:bSkip:= {|nRecno| , (dbskipper(TM->recno() ) ) } ; //ON CHANGE {|nRecno|, oLbx:recno() } ; //ON CHANGE oLbx: {|nRecno|, TM->recno() } ; frustration is just clouding it up now an actual ON CHANGE statement with proper syntax wold be greatly appreciated Thanks, Bruce
listbox recno() display
Bruce, try this [code=fw:2u47z2ch]<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: #00C800;">FUNCTION</span> MAIN<br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oLbx<br /><br /><br />use customer<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span> , <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span> , <span style="color: #000000;">300</span>  <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">LISTBOX</span> oLbx ;<br />FIELDS field->first, field->last , STR<span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span> ;<br />HEADERS <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"Recno"</span>  ;<br />FIELDSIZES <span style="color: #000000;">40</span> , <span style="color: #000000;">40</span> , <span style="color: #000000;">40</span>  <span style="color: #0000ff;">OF</span> oDlg  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span> , <span style="color: #000000;">150</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br /><span style="color: #00C800;">RETURN</span>  <span style="color: #00C800;">NIL</span><br /> </div>[/code:2u47z2ch] If You substitute STR(recno(),4) With recno() You do not see record number but empty column Do not ask me WHY! bye now marco
listbox recno() display
Bruce, if you want to show the record number in a column then follow Marco's advice. If you want to show the record number in a GET while moving the record pointer then use something like ... GET oGet Var cVar ... ON CHANGE ( cVar := LTRIM( STR( RECNO() ) ), oGet:Refresh() ) EMG
listbox recno() display
[quote="MarcoBoschi":kjar6yun]If You substitute STR(recno(),4) With recno() You do not see record number but empty column Do not ask me WHY![/quote:kjar6yun] Because TWBrowse takes data numbers as bitmaps handles. That's how it displays bitmaps inside its cells. EMG
listbox recno() display
Marco / Enrico , Thanks for your tips/advice. I got it working. One final question. Within the dialog I'm using for this listbox, I have - Search, OK, and Cancel buttons. When returning from the search function(), I have to click on the data portion of the listbox to get its "focus" back to a highlighted data record. I gather there is a FW setfocus function(), when coming out of my search function(), it would automatically return to the highlighted record. Many thanks, Bruce
listbox recno() display
As simple as oBrw:SetFocus(). <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
listbox to xbrowse
Hi, Since i convering my programs from an (older) FWH32 to FWH64, I also want to change from listbox to xbrowse. I Have a little question about changing the configuration, online. Now I was using [code=fw:39ki830i]<div class="fw" id="{CB}" style="font-family: monospace;">sGetlist<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bline</span> = &<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'{|| '</span>+show_kolom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">' &nbsp;}'</span><span style="color: #000000;">&#41;</span><br />sGetlist<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aheaders</span> = &nbsp;show_hoofd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />sGetlist<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aColsizes</span> = show_len<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />sGetlist<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aJustify</span> &nbsp;= show_jus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />sGetlist<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lmchange</span> = .t.<br />&nbsp;</div>[/code:39ki830i] for my headers, justify and Columnsize. What parameters do I haveto use for xbrowse? Thank you.
listbox to xbrowse
Hi, I change by program, and use addcol() This is working file when I do this before the browse is displayed, but when I do it while it is shown, I get this error after refreshing the browse. [code=fw:1ggnk6gi]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">c</span>:\_vmsdata\FWH64\projects\EPKSDoc\EPKSDOC.exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">64</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">7</span>,<span style="color: #000000;">988</span>,<span style="color: #000000;">869</span> bytes<br />&nbsp; &nbsp;Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1603181642<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;Version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">16.02</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">6.1</span>, Build <span style="color: #000000;">7601</span> Service Pack <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">40</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">04</span>/<span style="color: #000000;">02</span>/<span style="color: #000000;">16</span>, <span style="color: #000000;">15</span>:<span style="color: #000000;">38</span>:<span style="color: #000000;">07</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1081</span> &nbsp;Argument error: +<br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">2</span><br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">LASTDISPLAYPOS</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span></div>[/code:1ggnk6gi]
listbox to xbrowse
Maybe this sample help you <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=31625&p=184485&hilit=addcol#p184485">viewtopic.php?f=6&t=31625&p=184485&hilit=addcol#p184485</a><!-- l -->
listbox to xbrowse
Hi, the addcol() is working fine for creating by browse, but i want to add some columns while displaying the browse. Then I get this error.
listbox to xbrowse
Hi, I found the problem! I have to do a setado() again, after adding the column, and after adding that extra field in my recordset <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
listbox to xbrowse
Ok, great He would only comment that after of an insert or add column, should make a call oBrw:Refresh (.T.)
listbox y campo lógico
1) En un Listbox con varios campos quiero que se vea un campo lógico, pero sale en blanco.- ¿Hay que emplear algun comando de conversión? 2) En el caso de que quisiera sustituir el valor .t. por un bitmap y el .f. por otro, sería posible sin convertirlo en 1/2? Gracias y un saludo para todos Manuel
listbox y campo lógico
....... ....... REDEFINE LISTBOX oLbx : FIELDS If(Base->campo_log, "1","2") ; HEADERS "Estado" ; ....... ....... Salu2 Willi Quintana
listbox y campo lógico
UPS,,, aqui va con bmp`s oBmpOn := LoadBitMap(GetResources(),"Chk1") oBmpOff := LoadBitMap(GetResources(),"Chk0") ... ... REDEFINE LISTBOX oLbx; FIELDS If(Base->campo_logo, oBmpOn,oBmpOff) ; HEADRES "Estado" ; ... ... Salu2 Willi Quintana
listbox y campo lógico
Gracias Willi por tu respuesta. La primera opción funcionó, pero no la segunda con los bitmaps: local oBmpSi := LOADBitmap( GetResources(), "\fw23\bitmaps\level1.bmp" ) local oBmpNo := LoadBitmap( GetResources(), "\fw23\bitmaps\level2.bmp" ) ..... @ 1,1 LISTBOX oLbx FIELDS IF (visitas->PENDIENTE, ; oBmpSi , oBmpNo ),; ... Un saludo y gracias de nuevo Manuel
listbox y campo lógico
Amigo. Los BMP`s los debes tener en tu DLL o en tu RC, no en ficheros... local oBmpOff := LoadBitMap(GetResources(),"Chk0") local oBmpOn := LoadBitMap(GetResources(),"Chk1") Chk0 y Chk1 son BMP`s que deben estar dentro del recurso xxxx.rc o xxxx.dll segun uses.. Salu2 Willi <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
listbox y campo lógico
Para cargar BMP`s desde ficheros seria : (aunque no lo uso) local oBmpSi := LoadBmp("\fw23\bitmaps\level1.bmp" ) local oBmpNo := LoadBmp("\fw23\bitmaps\level2.bmp" ) ..... @ 1,1 LISTBOX oLbx ; FIELDS IF (visitas->PENDIENTE, oBmpSi , oBmpNo ),; ... Salu2 Willi <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
listbox y campo lógico
Willi, ahora, gracias a tí, si funciona, aunque he tenido que sustituir LoadBmp por ReadBitmap y ha quedado así: local oBmpSi := ReadBitmap( 0, "\fw23\bitmaps\level1.bmp" ) local oBmpNo := ReadBitmap(0 "\fw23\bitmaps\level2.bmp" ) ..... @ 1,1 LISTBOX oLbx ; FIELDS IF (visitas->PENDIENTE, oBmpSi , oBmpNo ),; ... Muchas gracias por tu tiempo y ayuda. Un saludo Manuel
listbox y los item que selecciono
hola. Tengo un listbox (no xbrowse) y necesito saber cuales son los item que seleccione (esta activo el multiselect) gracias.
listbox y los item que selecciono
[code=fw:e4j0gbj3]<div class="fw" id="{CB}" style="font-family: monospace;">oLbx:<span style="color: #000000;">aSelections</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:e4j0gbj3]
little blug in xBrowse method report()
Hello, In method report(), it does not show on the preview Windows the title of the report, it says Fivewin Report instead. [img:3u9bp40p]http&#58;//i43&#46;tinypic&#46;com/2nupsgk&#46;png[/img:3u9bp40p] This is a simple: [code=fw:3u9bp40p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #B900B9;">// Link with xhb.lib if compiled with Harbour</span><br /><br /><span style="color: #00C800;">function</span> TestMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oBar, oBrw<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBrowsing Empty Arrays"</span><br /><br />&nbsp; &nbsp;<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;">100</span>,<span style="color: #000000;">32</span> <span style="color: #000000;">2007</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Add"</span> &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> AddRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>, &nbsp; &nbsp;oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Insert"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> InsertRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Delete"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> DeleteRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span> &nbsp; <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> GROUP<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Report"</span> &nbsp; <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"This is the title"</span><span style="color: #000000;">&#41;</span> GROUP<br /><br /><br /><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">2007</span><br /><br />&nbsp; &nbsp;@ <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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">4</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"uno"</span>,<span style="color: #ff0000;">"dos"</span>,<span style="color: #ff0000;">"tres"</span>,<span style="color: #ff0000;">"cuatro"</span> &nbsp; ;<br />&nbsp; &nbsp; &nbsp; COLSIZES <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; ARRAY <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> LINES FASTEDIT CELL<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditTypes</span> &nbsp; := EDIT_GET<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bPastEof</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || &nbsp;AddRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bKeyDown</span> &nbsp;:= <span style="color: #000000;">&#123;</span> |nKey| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_DELETE, DeleteRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_INSERT, InsertRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> BlankRow<br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">" &nbsp; &nbsp;"</span>, <span style="color: #ff0000;">" &nbsp; &nbsp;"</span>, <span style="color: #ff0000;">" &nbsp; &nbsp;"</span>, <span style="color: #ff0000;">" &nbsp; &nbsp;"</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> AddRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, BlankRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> InsertRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;AIns<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, oBrw:<span style="color: #000000;">nArrayAt</span>, BlankRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> DeleteRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, oBrw:<span style="color: #000000;">nArrayAt</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:3u9bp40p] Thank you very much. Best regards
little blug in xBrowse method report()
Please, include the fix ein FW 13.05. Thank you very very much.
little blug in xBrowse method report()
This is the fix: [code=fw:3sig5xov]<div class="fw" id="{CB}" style="font-family: monospace;">  <br /><br /><span style="color: #00C800;">METHOD</span> Report<span style="color: #000000;">&#40;</span> cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br /><span style="color: #000000;">&#91;</span>...<span style="color: #000000;">&#93;</span><br /><br /><br />&nbsp;oPrn :=  PrintBegin<span style="color: #000000;">&#40;</span> cTitle, ;            <span style="color: #B900B9;">// document</span><br />                        .f., ;            <span style="color: #B900B9;">// luser</span><br />                        lPreview, <span style="color: #00C800;">nil</span>, ;  <span style="color: #B900B9;">// xmodel</span><br />                        lModal, ;<br />                        .f.,    ;         <span style="color: #B900B9;">// lselect</span><br />                        cPDF <span style="color: #000000;">&#41;</span>            <span style="color: #B900B9;">// PDF to Save</span><br /> </div>[/code:3sig5xov] Change nil to cTitle. Thank you.
little blug in xBrowse method report()
Included in FWH 13.05m thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
little bug in rpreview.prg
I spend some time to find out why my pdf file never should have been created even when I could see the file open by Acrobat Reader. <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> I found out that in source\classes\rpreview.prg, line 1789 [color=#FF4000:315vxvls]return ::oDevice:GenHaruPdf( cFile )[/color:315vxvls] this return value is a logical value. Whereas in line 1883 [color=#FF4000:315vxvls]if ! File( cFile ))[/color:315vxvls] cFile is supposed to be a string value. The file '.t.' will never be found <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
little bug in rpreview.prg
Sorry, but your question doesn't make sense. Are you using HARUPDF? Can you show a small practical example for testing? Lo siento, pero tu pregunta no tiene sentido. ¿Está utilizando HARUPDF? ¿Puedes mostrar un pequeño ejemplo práctico para probar? what version of Fivewin? ¿Qué versión de Fivewin? Regards, saludos.
little bug in rpreview.prg
look this, [url:1wk6yhyo]http&#58;//fivetechsupport&#46;com/forums/viewtopic&#46;php?f=6&t=20328&start=15[/url:1wk6yhyo] [url:1wk6yhyo]http&#58;//forums&#46;fivetechsoft&#46;com/viewtopic&#46;php?f=16&t=37438&p=223831&hilit=lUseI2PDF#p223831[/url:1wk6yhyo] Regards, saludos.
little bug in rpreview.prg
Sorry, Karina. Your answer doesn't make sense. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> I did not post a question. I described a logical error in the FW Modul source\classes\rpreview.prg. Look at the lines 1789 and 1883 in the prg file and you will understand that there is an error. I solved the problem for me. But may by other programmers will appear the same fault. Regards Detlef
little bug in rpreview.prg
[quote="Detlef":8wpl5lhg]Sorry, Karina. Your answer doesn't make sense. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> I did not post a question. I described a logical error in the FW Modul source\classes\rpreview.prg. Look at the lines 1789 and 1883 in the prg file and you will understand that there is an error. I solved the problem for me. But may by other programmers will appear the same fault. Regards Detlef[/quote:8wpl5lhg] So please post the solution. Así que por favor publique la solución. We collaborate with each other here. Aquí colaboramos entre nosotros. Regards, saludos.
little bug in rpreview.prg
Dear karinha. I did already explain the solution in my first post. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
little bug in rpreview.prg
[quote="Detlef":2z5e2v4e]I spend some time to find out why my pdf file never should have been created even when I could see the file open by Acrobat Reader. <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> I found out that in source\classes\rpreview.prg, line 1789 [color=#FF4000:2z5e2v4e]return ::oDevice:GenHaruPdf( cFile )[/color:2z5e2v4e] this return value is a logical value. Whereas in line 1883 [color=#FF4000:2z5e2v4e]if ! File( cFile ))[/color:2z5e2v4e] cFile is supposed to be a string value. The file '.t.' will never be found <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->[/quote:2z5e2v4e] Thanks for pointing it out.
live Installation von mod harbour auf einem neuen Server
[color=#FF0000:2pskqrpr]live Installation von mod harbour auf einem neuen Server [/color:2pskqrpr] [url:2pskqrpr]https&#58;//www&#46;youtube&#46;com/watch?v=spvv43j-Zmo&feature=youtu&#46;be[/url:2pskqrpr]
live Installation von mod harbour auf einem neuen Server
[color=#FF0000:1tjj3e8s]live Installation von mod harbour auf einem neuen Server [/color:1tjj3e8s] [url:1tjj3e8s]https&#58;//www&#46;youtube&#46;com/watch?v=spvv43j-Zmo&feature=youtu&#46;be[/url:1tjj3e8s]
live Installation von mod harbour auf einem neuen Server
Download link install program: [url:1y5ifcse]https&#58;//mybergland&#46;com/fwforum/install_xampp_and_modharbour&#46;exe[/url:1y5ifcse]
llamada al teclado virtual
amigos del foro, alguien sabe como hacer que cuando un objeto TGET obtenga el foco salte el teclado virtual del pocket automaticamente? existe alguna funcion? las otras aplicaciones del pocket lo hacen..
llamada al teclado virtual
Luis, Las funciones son ShowKeyboard() y HideKeyboard(). Busca en estos foros por esos nombres y verás todo lo que se ha comentado al respecto.
llamada de programa externo se minimiza
Buenos dias.. algo casi simple.. como el TDOSprn No tiene un Preview simple... que me muestre mi reporte en matricial... me dije.. "CREARE un archivo texto de la impresion... y luego llamo a un progrma ejemplo .. ENOTAS miArchivo.txt y me lo abre en solo modalidad lectura... " Todo funciona bien perooo.... en la llamada se abre en una ventana de ese programa .."atras del mi programa WinFW..." y para activarlo tengo que hacerle click a la barra de tareas... o con ALT+TAB para salta a esa ventana esto se puede evitar ??? o quizas simulando un ALT+TAB ?? como se hace?? Gracias.. Lubin
llamada de programa externo se minimiza
Lubin, Localiza el handle de esa nueva ventana con FindWindow() y llama a SetForeGroundWindow( hWnd )
llamada de programa externo se minimiza
Gracias Antonio le dare una revisada.. [quote="Antonio Linares":r5z68wpg]Lubin, Localiza el handle de esa nueva ventana con FindWindow() y llama a SetForeGroundWindow( hWnd )[/quote:r5z68wpg]
llamar a una función de Harbour desde C
Hola, Me gustaría desde un código C llamar a una función mía de Harbour y pasarle una cadena de texto. Es decir, lo contrario a esto: [code=fw:3fcbpb00]<div class="fw" id="{CB}" style="font-family: monospace;"><br />procedure main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; msgalert<span style="color: #000000;">&#40;</span>pasa1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp;<br /><span style="color: #00C800;">return</span><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PASA1 <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp;<br /><br />&nbsp; hb_retc<span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"cadena desde el codigo c!!"</span> <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:3fcbpb00] Muchísimas gracias. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
llamar a una función de Harbour desde C
Hola pienso que esta seria la forma mas rapida... cambia tu funcion de C en harbour a otra funcion y luego llamas a esta otra con tu funcion de Harbour ( como una especie de wrapper ) ejemplo [code=fw:3rqhng8n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br />procedure main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; msgalert<span style="color: #000000;">&#40;</span>pasa1<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp; msgalert<span style="color: #000000;">&#40;</span>pasa1<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp;<br /><span style="color: #00C800;">return</span><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br /><br />char * pasa1<span style="color: #000000;">&#40;</span> char * c <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> c;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PASA1 <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; char * c ;<br />&nbsp; int i = hb_parni<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; <br />&nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> i == <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;c = pasa1<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"cadena desde el codigo c!!"</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp;c = pasa1<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"otra cadena"</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; hb_retc<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:3rqhng8n]
llamar a una función de Harbour desde C
Hola Daniel, Creo que me expliqué mal. To tengo una función en Harbour, por ejemplo: [code=fw:2acu08m2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> lucas<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"lucas"</span><span style="color: #000000;">&#41;</span><br />append blank<br />replace field->name with <span style="color: #ff0000;">"lucas"</span><br /><br />bla bla bla<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2acu08m2] Yo lo que quiero es llamar a esa función de Harbour lucas() desde un código en C y no se cómo. Muchas gracias nuevamente, Salu2
llamar a una función de Harbour desde C
Lucas el api de harbour nos permite hacer lo que quieres de una forma muy simple [code=fw:2r7el8e4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br />procedure main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;pasa1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span><br /><br /><br /><span style="color: #00C800;">function</span> pasa2<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapiitm.h"</span><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PASA1 <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;PHB_ITEM pArg = hb_itemNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hb_itemPutC<span style="color: #000000;">&#40;</span> pArg, <span style="color: #ff0000;">"LLamada desde C"</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hb_itemDoC<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"pasa2"</span>, <span style="color: #000000;">1</span>, pArg <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// nombre de la funcion en PRG, </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// total de parametros a pasar, </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// lista de items</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hb_itemRelease<span style="color: #000000;">&#40;</span> pArg <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;<br />&nbsp;</div>[/code:2r7el8e4]
llamar a una función de Harbour desde C
Muchas gracias Daniel.
llamar a una función de Harbour desde C
Hola de nuevo Daniel, ¿Y desde una función pura de C?. Por ejemplo: [code=fw:1t56vzjy]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <Windows.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>x,y,z<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>x<span style="color: #000000;">&#41;</span>?<span style="color: #000000;">&#40;</span>y<span style="color: #000000;">&#41;</span>:<span style="color: #000000;"><span style="color: #000000;">&#40;</span>z</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />LPSTR StrToken<span style="color: #000000;">&#40;</span> LPSTR szText, WORD wOcurrence, BYTE bSeparator, LPWORD pwLen <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;WORD wStart, wEnd = <span style="color: #000000;">0</span>, wCounter = <span style="color: #000000;">0</span>;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ! bSeparator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;bSeparator = <span style="color: #ff0000;">' '</span>;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; wStart = wEnd;<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> bSeparator != <span style="color: #ff0000;">' '</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> szText<span style="color: #000000;">&#91;</span> wStart <span style="color: #000000;">&#93;</span> == bSeparator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wStart++;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">while</span><span style="color: #000000;">&#40;</span> szText<span style="color: #000000;">&#91;</span> wStart <span style="color: #000000;">&#93;</span> && szText<span style="color: #000000;">&#91;</span> wStart <span style="color: #000000;">&#93;</span> == bSeparator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wStart++;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> szText<span style="color: #000000;">&#91;</span> wStart <span style="color: #000000;">&#93;</span> && szText<span style="color: #000000;">&#91;</span> wStart <span style="color: #000000;">&#93;</span> != bSeparator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wEnd = wStart + <span style="color: #000000;">1</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">while</span><span style="color: #000000;">&#40;</span> szText<span style="color: #000000;">&#91;</span> wEnd <span style="color: #000000;">&#93;</span> && szText<span style="color: #000000;">&#91;</span> wEnd <span style="color: #000000;">&#93;</span> != bSeparator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wEnd++;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wEnd = wStart;<br /><br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #00C800;">while</span><span style="color: #000000;">&#40;</span> wCounter++ < wOcurrence - <span style="color: #000000;">1</span> && szText<span style="color: #000000;">&#91;</span> wEnd <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;* pwLen = wEnd - wStart;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> wCounter < wOcurrence <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; * pwLen = <span style="color: #000000;">0</span>;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> szText + wStart;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:1t56vzjy] Probé con hb_itemDoC( "pasa2", 1, "la cadena" ); pero no funciona. Además, salta error de function with no prototype. Mil gracias.
llamar a una función de Harbour desde C
Tienes que usar la misma secuencia que te ha indicado Daniel: [code=fw:yaxvp5vv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><br /><span style="color: #00C800;">static</span> void Pasa1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   PHB_ITEM pArg = hb_itemNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />   <br />   hb_itemPutC<span style="color: #000000;">&#40;</span> pArg, <span style="color: #ff0000;">"LLamada desde C"</span> <span style="color: #000000;">&#41;</span>;<br />   <br />   hb_itemDoC<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"pasa2"</span>, <span style="color: #000000;">1</span>, pArg <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// nombre de la funcion en PRG, </span><br />                                   <span style="color: #B900B9;">// total de parametros a pasar, </span><br />                                   <span style="color: #B900B9;">// lista de items</span><br />   <br />   hb_itemRelease<span style="color: #000000;">&#40;</span> pArg <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />Desde tu código en C llamas a :<br /><br /><span style="color: #000000;">Pasa1</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /> </div>[/code:yaxvp5vv]
llamar a una función de Harbour desde C
Antonio, Muchas gracias, pero es que desde el Código C puro tengo que enviar un texto a una función en Harbour. Si llamo desde el código C a otra función intermedia en C no me sirve, porque en el código primario en C puro y duro es donde tengo que enviar el texto.
llamar a una función de Harbour desde C
Lucas... es exactamente igual... [quote="lucasdebeltran":2vp822hb]Además, salta error de function with no prototype.[/quote:2vp822hb] te falta el archivo de cabecera [b:2vp822hb]hbapiitm.h[/b:2vp822hb] (esta en el ejemplo que te puse) como te recuerda Antonio, hay que seguir la misma secuencia... voy a ser un poco mas explicativo para usar de la funcion hb_itemDoC, el paso de parametros debe ser datos tipo PHB_ITEM y asignarles el valor deseado en el siguiente ejemplo te muestro como enviar un string y como enviar un numero, desde C "puro" a nivel PRG [code=fw:2vp822hb]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br />procedure main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;pasa1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span><br /><br /><br /><span style="color: #00C800;">function</span> pasa2<span style="color: #000000;">&#40;</span> c, n <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Un texto"</span>, c<br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Ahora Un Numero"</span>, n<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapiitm.h"</span><br /><br /><br />void desdeCpuro<span style="color: #000000;">&#40;</span> void <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;PHB_ITEM pArg1 = hb_itemNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;PHB_ITEM pArg2 = hb_itemNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hb_itemPutC<span style="color: #000000;">&#40;</span> pArg1, <span style="color: #ff0000;">"LLamada desde C"</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_itemPutNI<span style="color: #000000;">&#40;</span> pArg2, <span style="color: #000000;">1234</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hb_itemDoC<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"pasa2"</span>, <span style="color: #000000;">2</span>, pArg1, pArg2 <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// nombre de la funcion en PRG, </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// total de parametros a pasar, </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// lista de items</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hb_itemRelease<span style="color: #000000;">&#40;</span> pArg1 <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_itemRelease<span style="color: #000000;">&#40;</span> pArg2 <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PASA1 <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;desdeCpuro<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:2vp822hb]
llamar a una función de Harbour desde C
Gracias a ambos, va perfecto. Una cosa, ¿tenéis pensado hacer seminarios de FWH como hacía el pájaro de René Flores?. Un saludo
llamar a una función de Harbour desde C
Estamos abiertos a cualquier propuesta que sea interesante. No hay problema en hacer seminarios si se reunen un cierto numero de usuarios de FWH interesados
llamar aun codeblock en PRG desde codigo C ?
Alguien tendra un ejemplo de como llamar aun codeblock en PRG desde codigo C .. Creo que alguna vez Antonio puso un ejemplo pero no lo encuentro.. Desde ya muchas Gracias.
llamar aun codeblock en PRG desde codigo C ?
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=96883#p96883">viewtopic.php?p=96883#p96883</a><!-- l -->
llamar funciones de DLL
Buenas Tardes, necesito acceder a una DLL, pero no funcionan las llamadas a las funciones ni la importacion del la LIB con implib.exe de Borland, con un inspector de DLL, las funciones se muestran con esta estructura: Function Name Address Relative Address Ordinal Filename Full Path Type IZKEM::CardNumber 83 (0x53) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Property IZKEM::ClearAdministrators 3 (0x3) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearData 135 (0x87) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearDataEx 252 (0xfc) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearGLog 36 (0x24) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearKeeperData 30 (0x1e) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearLCD 96 (0x60) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearPhotoByTime 250 (0xfa) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearSLog 109 (0x6d) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearSMS 115 (0x73) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method IZKEM::ClearUserSMS 122 (0x7a) zkemkeeper.dll D:\b\biometricos\zkemkeeper.dll COM Method Parece que lo que tiene son objetos y no funciones, saben como puedo acceder a estas funciones , metodos desde FW + xHb Saludos Marcelo Vía
llamar funciones de DLL
Marcelo, Tienes que usar OLE: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=226365#p226365">viewtopic.php?p=226365#p226365</a><!-- l -->
llamar funciones de DLL
Antonio, gracias por responder, eso significa que de alguna manera debo registrar la DLL para que la utilice con OLE ?? gracias por la ayuda saludos cordiales Marcelo Vía P.D. Antonio, recuerdo que tu hiciste algun inspector de objetos COM, creo que te permitia visualizar los componentes y sus propiedades, me puedes guiar de donde bajarlo gracias
llamar funciones de DLL
Holas, he logrado la comunicacion con OLE, estoy utilizando el OLE/COM Object Viewer para ver los internals del componente, pero no logro identificar los objetos intermedios para acceder a las funcionalidades del componente, como puedo identificar la estructura para acceder a estas funcionalidades, tengo esta informacion, alguna ayuda? gracias [url:1oivgorm]https&#58;//app&#46;box&#46;com/s/exa6atowm30buax58x7thsk12n9vogu9[/url:1oivgorm] [url:1oivgorm]https&#58;//app&#46;box&#46;com/s/1jk162al7hmy44f4px2fp7iwt8v4zft0[/url:1oivgorm] [url:1oivgorm]https&#58;//app&#46;box&#46;com/s/zlt13v2vo240l2lefim4jrvh962smq9i[/url:1oivgorm]
llamar funciones de DLL
Marcelo, Preuba esta excelent utilidad desarrollada con FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [url:27rzwwmw]https&#58;//github&#46;com/FiveTechSoft/FWH_tools/blob/master/olebrowser&#46;zip[/url:27rzwwmw] Todo el código fuente incluido
llamar funciones de DLL
Antonio, muchas gracias, justamente eso estaba buscando muchas gracias saludos Marcelo Vía
llamar funciones de DLL
Antonio, una ultima consulta, como puedo recuperar los datos de una función como esta: VARIANT_BOOL GetAllUserInfo(LONG dwMachineNumber, LONG* dwEnrollNumber, BSTR* Name, BSTR* Password, LONG* Privilege, VARIANT_BOOL* Enabled) supongo que los parametros con "*" son por referencia, pero no logro recuperar nada, lo he implementado asi oZk:GetAllUserInfo( 1, @dwEnrollNumber, @Name, @Password, @Privilege, @Enabled ) pero no consigo ningun valor, como se debe implementar estas llamadas saludos Marcelo Vía
llamar funciones de DLL
Devuelve un valor lógico ?
llamar funciones de DLL
Antonio, este es el reporte de la herramienta en PDF [url:1iuwxgmy]https&#58;//app&#46;box&#46;com/s/q9h87m93jevxjoec83rbazia9edzq63h[/url:1iuwxgmy] muchas gracias Marcelo Vía
llamar funciones de DLL
Antonio, si el retorno esta Ok, devuelve un valor logico, pero no logro obtener los parametros por referencia, que se puede hacer, ya que todas las funciones tienen esta estructura gracias por la ayuda saludos Marcelo Vía P.D. con la herramienta que desarrollaste (muy buena por cierto) tengo estas descripciones del componente [url:2bdeakd4]https&#58;//app&#46;box&#46;com/s/ryi0rmgxch3n3qmtfqfkg835vuk997m7[/url:2bdeakd4]
llamar funciones de DLL
Marcelo, Por favor imprime toda la información que te da la herramienta y ponla aquí, gracias
llamar funciones de DLL
zkemkeeper.ZKEM.1 STDCALL dispatch FUNC void QueryInterface( [in] PTR, [out] PTR ) STDCALL dispatch FUNC unsigned long AddRef() STDCALL dispatch FUNC unsigned long Release() STDCALL dispatch FUNC void GetTypeInfoCount( [out] PTR ) STDCALL dispatch FUNC void GetTypeInfo( [in] unsigned int, [in] unsigned long, [out] PTR ) STDCALL dispatch FUNC void GetIDsOfNames( [in] PTR, [in] PTR, [in] unsigned int, [in] unsigned long, [out] PTR ) STDCALL dispatch FUNC void Invoke( [in] int, [in] PTR, [in] unsigned long, [in] unsigned short, [in] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch PROPERTYGET VARIANT_BOOL ReadMark() STDCALL dispatch PROPERTYPUT void ReadMark( [in] VARIANT_BOOL ) STDCALL dispatch PROPERTYGET int CommPort() STDCALL dispatch PROPERTYPUT void CommPort( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ClearAdministrators( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL DeleteEnrollData( [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadSuperLogData( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadAllSLogData( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadGeneralLogData( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadAllGLogData( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL EnableUser( [in] int, [in] int, [in] int, [in] int, [in] VARIANT_BOOL ) STDCALL dispatch FUNC VARIANT_BOOL EnableDevice( [in] int, [in] VARIANT_BOOL ) STDCALL dispatch FUNC VARIANT_BOOL GetDeviceStatus( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetDeviceInfo( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetDeviceInfo( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetDeviceTime( [in] int ) STDCALL dispatch FUNC void PowerOnAllDevice() STDCALL dispatch FUNC VARIANT_BOOL PowerOffDevice( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ModifyPrivilege( [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC void GetLastError( [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetEnrollData( [in] int, [in] int, [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetEnrollData( [in] int, [in] int, [in] int, [in] int, [in] int, [in] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetDeviceTime( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetGeneralLogData( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetSuperLogData( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [in] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetAllSLogData( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetAllGLogData( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC void ConvertPassword( [in] int, [out] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadAllUserID( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetAllUserID( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetSerialNumber( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ClearKeeperData( [in] int ) STDCALL dispatch FUNC int GetBackupNumber( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetProductCode( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetFirmwareVersion( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetSDKVersion( [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ClearGLog( [in] int ) STDCALL dispatch FUNC int GetFPTempLength( [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL Connect_Com( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL Connect_Net( [in] BSTR, [in] int ) STDCALL dispatch FUNC void Disconnect() STDCALL dispatch FUNC VARIANT_BOOL SetUserInfo( [in] int, [in] int, [in] BSTR, [in] BSTR, [in] int, [in] VARIANT_BOOL ) STDCALL dispatch FUNC VARIANT_BOOL GetUserInfo( [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetDeviceIP( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetDeviceIP( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserTmp( [in] int, [in] int, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserTmp( [in] int, [in] int, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetAllUserInfo( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL DelUserTmp( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL RefreshData( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL FPTempConvert( [in] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetCommPassword( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetUserGroup( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserGroup( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetTZInfo( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetTZInfo( [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUnlockGroups( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUnlockGroups( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetGroupTZs( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetGroupTZs( [in] int, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserTZs( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserTZs( [in] int, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ACUnlock( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetACFun( [out] PTR ) STDCALL dispatch PROPERTYGET int ConvertBIG5() STDCALL dispatch PROPERTYPUT void ConvertBIG5( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetGeneralLogDataStr( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserTmpStr( [in] int, [in] int, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserTmpStr( [in] int, [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetEnrollDataStr( [in] int, [in] int, [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetEnrollDataStr( [in] int, [in] int, [in] int, [in] int, [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetGroupTZStr( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetGroupTZStr( [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserTZStr( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserTZStr( [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL FPTempConvertStr( [in] BSTR, [out] PTR, [in] PTR ) STDCALL dispatch FUNC int GetFPTempLengthStr( [in] BSTR ) STDCALL dispatch PROPERTYGET int BASE64() STDCALL dispatch PROPERTYPUT void BASE64( [in] int ) STDCALL dispatch PROPERTYGET unsigned long PIN2() STDCALL dispatch PROPERTYPUT void PIN2( [in] unsigned long ) STDCALL dispatch PROPERTYGET int AccGroup() STDCALL dispatch PROPERTYPUT void AccGroup( [in] int ) STDCALL dispatch PROPERTYGET int AccTimeZones( [in] int ) STDCALL dispatch PROPERTYPUT void AccTimeZones( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetUserInfoByPIN2( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserInfoByCard( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch PROPERTYGET int CardNumber( [in] int ) STDCALL dispatch PROPERTYPUT void CardNumber( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL CaptureImage( [in] VARIANT_BOOL, [out] PTR, [out] PTR, [out] PTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL UpdateFirmware( [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL StartEnroll( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL StartVerify( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL StartIdentify() STDCALL dispatch FUNC VARIANT_BOOL CancelOperation() STDCALL dispatch FUNC VARIANT_BOOL QueryState( [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL BackupData( [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL RestoreData( [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL WriteLCD( [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ClearLCD() STDCALL dispatch FUNC VARIANT_BOOL Beep( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL PlayVoice( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL PlayVoiceByIndex( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL EnableClock( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetUserIDByPIN2( [in] int, [out] PTR ) STDCALL dispatch PROPERTYGET int PINWidth() STDCALL dispatch FUNC VARIANT_BOOL GetPIN2( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL FPTempConvertNew( [in] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL FPTempConvertNewStr( [in] BSTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadAllTemplate( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL DisableDeviceWithTimeOut( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetDeviceTime2( [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ClearSLog( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL RestartDevice( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetDeviceMAC( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetDeviceMAC( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetWiegandFmt( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetWiegandFmt( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ClearSMS( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetSMS( [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetSMS( [in] int, [in] int, [in] int, [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DeleteSMS( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetUserSMS( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL DeleteUserSMS( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetCardFun( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ClearUserSMS( [in] int ) STDCALL dispatch PROPERTYGET int MachineNumber() STDCALL dispatch PROPERTYPUT void MachineNumber( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetDeviceCommPwd( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetDoorState( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetVendor( [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetSensorSN( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadCustData( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL WriteCustData( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL BeginBatchUpdate( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL BatchUpdate( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ClearData( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetDataFile( [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL WriteCard( [in] int, [in] int, [in] int, [in] PTR, [in] int, [in] PTR, [in] int, [in] PTR, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetGeneralExtLogData( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL EmptyCard( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetDeviceStrInfo( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetSysOption( [in] int, [in] BSTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserInfoEx( [in] int, [in] int, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserInfoEx( [in] int, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL DeleteUserInfoEx( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetGeneralLogData( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetAllUserInfo( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetUserInfo( [in] int, [in] BSTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetUserTmp( [in] int, [in] BSTR, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetUserTmpStr( [in] int, [in] BSTR, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DeleteEnrollData( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetUserInfo( [in] int, [in] BSTR, [in] BSTR, [in] BSTR, [in] int, [in] VARIANT_BOOL ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetUserTmp( [in] int, [in] BSTR, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetUserTmpStr( [in] int, [in] BSTR, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DelUserTmp( [in] int, [in] BSTR, [in] int ) STDCALL dispatch PROPERTYGET BSTR STR_CardNumber( [in] int ) STDCALL dispatch PROPERTYPUT void STR_CardNumber( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SetWorkCode( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetWorkCode( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL DeleteWorkCode( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ClearWorkCode() STDCALL dispatch FUNC VARIANT_BOOL ReadAttRule( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadDPTInfo( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SaveTheDataToFile( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadTurnInfo( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_OutPutHTMLRep( [in] int, [in] BSTR, [in] BSTR, [in] BSTR, [in] BSTR, [in] BSTR, [in] BSTR, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] BSTR, [in] BSTR, [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadAOptions( [in] BSTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadRTLog( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetRTLog( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetHIDEventCardNumAsStr( [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetStrCardNumber( [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetStrCardNumber( [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL RegEvent( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL CancelBatchUpdate( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetSysOption( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL Connect_Modem( [in] int, [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL UseGroupTimeZone() STDCALL dispatch FUNC VARIANT_BOOL SetHoliday( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetHoliday( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetDaylight( [in] int, [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetDaylight( [in] int, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetUnLockGroup( [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetUnLockGroup( [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetGroupTZ( [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetGroupTZ( [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetHoliday( [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetHoliday( [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetPlatform( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetUserSMS( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DeleteUserSMS( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL IsTFTMachine( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_EnableUser( [in] int, [in] BSTR, [in] VARIANT_BOOL ) STDCALL dispatch PROPERTYGET int SSRPin() STDCALL dispatch FUNC VARIANT_BOOL SendCMDMsg( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SendFile( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SetLanguageByID( [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadFile( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SetLastCount( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetCustomizeAttState( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL DelCustomizeAttState( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL EnableCustomizeAttState( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetCustomizeVoice( [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DelCustomizeVoice( [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL EnableCustomizeVoice( [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL StartEnrollEx( [in] BSTR, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetUserTmpExt( [in] int, [in] int, [in] BSTR, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DelUserTmpExt( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DeleteEnrollDataExt( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetWorkCode( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetWorkCode( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DeleteWorkCode( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_ClearWorkCode() STDCALL dispatch FUNC VARIANT_BOOL SSR_GetSuperLogData( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetShortkey( [in] int, [in] int, [in] int, [in] BSTR, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetShortkey( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL Connect_USB( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetSuperLogData2( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserFace( [in] int, [in] BSTR, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserFace( [in] int, [in] BSTR, [in] int, [in] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL DelUserFace( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetUserFaceStr( [in] int, [in] BSTR, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserFaceStr( [in] int, [in] BSTR, [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetUserTmpEx( [in] int, [in] BSTR, [in] int, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserTmpExStr( [in] int, [in] BSTR, [in] int, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserTmpEx( [in] int, [in] BSTR, [in] int, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserTmpExStr( [in] int, [in] BSTR, [in] int, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL MergeTemplate( [out] PTR, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SplitTemplate( [in] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch PROPERTYGET int PullMode() STDCALL dispatch PROPERTYPUT void PullMode( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ReadUserAllTemplate( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL UpdateFile( [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadLastestLogData( [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetOptionCommPwd( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadSuperLogDataEx( [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetSuperLogDataEx( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetPhotoByName( [in] int, [in] BSTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetPhotoNamesByTime( [in] int, [in] int, [in] BSTR, [in] BSTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ClearPhotoByTime( [in] int, [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetPhotoCount( [in] int, [out] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL ClearDataEx( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetDataFileEx( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetDeviceData( [in] int, [in] BSTR, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetDeviceData( [in] int, [out] PTR, [in] int, [in] BSTR, [in] BSTR, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL UpdateLogo( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SetCommuTimeOut( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SendFileByType( [in] int, [in] BSTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetCommProType( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetCompatOldFirmware( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL Connect_P4P( [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SetDeviceTableData( [in] int, [in] BSTR, [in] BSTR, [in] BSTR, [out] PTR ) STDCALL dispatch FUNC void GetConnectStatus( [out] PTR ) STDCALL dispatch PROPERTYGET int MaxP4PConnect() STDCALL dispatch FUNC VARIANT_BOOL SetManufacturerData( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC int GetDeviceStatusEx( [in] int ) STDCALL dispatch FUNC void CancelByUser() STDCALL dispatch FUNC int SSR_GetDeviceDataCount( [in] BSTR, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DeleteDeviceData( [in] int, [in] BSTR, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadTimeGLogData( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DeleteAttlogBetweenTheDate( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DeleteAttlogByTime( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadNewGLogData( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL IsNewFirmwareMachine( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL UploadUserPhoto( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DownloadUserPhoto( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DeleteUserPhoto( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetAllUserPhoto( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SetBellSchDataEx( [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetBellSchDataEx( [in] int, [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetDayBellSchCount( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetMaxBellIDInBellSchData( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL ReadAllBellSchData( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetEachBellInfo( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserValidDate( [in] int, [in] BSTR, [in] int, [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserValidDate( [in] int, [in] BSTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserValidDateBatch( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserValidDateBatch( [in] int, [out] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetUserVerifyStyle( [in] int, [in] BSTR, [in] int, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserVerifyStyle( [in] int, [in] BSTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetUserVerifyStyleBatch( [in] int, [in] BSTR, [in] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetUserVerifyStyleBatch( [in] int, [out] PTR, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetDeviceFirmwareVersion( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SendFileEx( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL UploadTheme( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL UploadPicture( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DeletePicture( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DownloadPicture( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL TurnOffAlarm( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL CloseAlarm( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetWorkCodeEx( [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetWorkCodeEx( [in] int, [in] BSTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_DeleteWorkCodeEx( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetGeneralLogDataEx( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_SetWorkCodeExBatch( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetWorkCodeExBatch( [in] int, [out] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetWorkCodeExByID( [in] int, [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SSR_GetWorkCodeIDByName( [in] int, [in] BSTR, [out] PTR ) STDCALL dispatch PROPERTYGET int BatchDataMode() STDCALL dispatch PROPERTYPUT void BatchDataMode( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetEventMode( [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetAllSFIDName( [in] int, [out] PTR, [in] int, [out] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetShortkey( [in] int, [in] int, [in] BSTR, [in] BSTR, [in] int, [in] int, [in] BSTR, [in] BSTR, [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetShortkey( [in] int, [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetAllAppFun( [in] int, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetAllRole( [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetAppOfRole( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL GetFunOfRole( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SetPermOfAppFun( [in] int, [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL DeletePermOfAppFun( [in] int, [in] int, [in] BSTR, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL IsUserDefRoleEnable( [in] int, [in] int, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL SearchDevice( [in] BSTR, [in] BSTR, [out] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL SetUserIDCardInfo( [in] int, [in] BSTR, [in] PTR, [in] int ) STDCALL dispatch FUNC VARIANT_BOOL GetUserIDCardInfo( [in] int, [in] BSTR, [out] PTR, [out] PTR ) STDCALL dispatch FUNC VARIANT_BOOL DelUserIDCardInfo( [in] int, [in] BSTR ) STDCALL dispatch FUNC VARIANT_BOOL GetPhotoByNameToFile( [in] int, [in] BSTR, [in] BSTR )
llamar funciones de DLL
Marcelo, De todas esas, has conseguido que te funcione alguna ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Cuales ?
llamar funciones de DLL
Parece que nuestra utilidad no muestra la lista de eventos
llamar funciones de DLL
Antonio, he conseguido que funcionen las funcionres SetCommPassword( [in] int ) Connect_Net( [in] BSTR, [in] int ) que es el proceso de conexión Luego para conseguir la información se utiliza esta función GetAllUserInfo( [in] int, [out] PTR, [out] PTR, [out] PTR, [out] PTR, [out] PTR ) Que interesantemente cicla por toda la información, solo que no recupero nada, por que los parametros por referencia [out] no devuelven nada, los parametros [in] los que utilice funcionan correctamente Gracias por el interes y ayuda saludos Marcelo Vía
llamar funciones de DLL
Marcelo, Para hacer la llamada: oZk:GetAllUserInfo( 1, @dwEnrollNumber, @Name, @Password, @Privilege, @Enabled ) como declaras dwEnrollNumber en tu PRG ?