topic
stringlengths
1
63
text
stringlengths
1
577k
tdolphin y ssl
[code=fw:3a6an5zn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />     oMySql := TDolphinSrv<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">ssl</span><span style="color: #000000;">&#40;</span> cHost, cUser, cPassword, nPort, nFlags, cDBName, bOnError, cNameHost, bDecrypt, cSslKeyFile, cSslCertFile, cSslCaFile, cCertsPath, cSslCipher <span style="color: #000000;">&#41;</span><br />   </div>[/code:3a6an5zn]
tdolphin y xbrowse
Estimados amigos, favor me pueden ayudar. Estoy trabajando y probando la clase tdolphin y hasta el momento, voy avanzado.. pisando piedras pero ya avanzo, pero me quede pillado en lo siguiente, favor e darme una idea para saber que pasa a) si trabajo con un dialogo basado en coordenadas con xbrowse, me abre y opera bien, pero si trato de abrir ese xbrowse, formando parte de recursoo, me rechaza y me bota indicando que la ventana no existe, o que el numero de identificacion del recurso donde debe abrir el xbrowse, no existe... esto en FWH y DBF. ningun problema. Esto bien... @ 30, 10 XBROWSE oLbx FIELDS oProducto:Cod,oProducto:Detalle; HEADERS "Producto","Detalle del Producto" ; FIELDSIZES 100,400; AUTOCOLS AUTOSORT LINES OF oWChld Esto rechaza... REDEFINE XBROWSE oLbx FIELDS oProducto:cod, oProducto:detalle; HEADERS "Codigo","Detalle"; JUSTIFY .T.,.F.; FIELDSIZES 70,400; ID 1000 OF oDlg ON DBLCLICK ( msginfo("entro") ) SetDolphin( oLbx, oProducto,.f. ) oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW oLbx:nColDividerStyle := LINESTYLE_RAISED oLbx:nRowDividerStyle := LINESTYLE_RAISED oLbx:bClrSelFocus := {|| { CLR_WHITE, RGB(24, 116, 205) } } oLbx:lColDividerComplete := .t. oLbx:nHeaderLines := 1 oLbx:lRecordSelector := .t. oLbx:lAllowRowSizing := .F. oLbx:l2007 := .T. oLbx:CreateFromCode() B) con ADO, si ingresaba un valor que era de parte de la primary key, al usar una funcion find, me decia que ya estaba, como lo hago con Tdolphin Con ADO.. STATIC FUNCTION B_A(cArticulo) LOCAL nRegAct := 0 IF EMPTY(cArticulo) MsgStop("Debe registrar la clave que identifica a la unidad de medida !") RETURN(.F.) ENDIF IF oProducto:BOF .AND. oProducto:EOF RETURN(.T.) ELSE nRegAct := oProducto:BookMark oProducto:MoveFirst() oProducto:Find("cod_art = " + "'" + cArticulo + "'" ) IF ! oProducto:EOF MsgInfo("Clave de unidad de medida ya registrada !") oProducto:BookMark := nRegAct RETURN(.F.) ENDIF oProducto:BookMark := nRegAct ENDIF RETURN(.T.) c) Yo quiero trabajar con formato Xbrowse usando Mysql con Tdolphin, de la forma como con dbf, pero no veo ejemplos y no me sale al escribir, ya que por el problema del punto A), me limita.. Esto quiero pero en Mysql con Tdolphin oBrw:=TxBrowse():New(oDlg) oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW // Con cursor de todo el renglón oBrw:nColDividerStyle := LINESTYLE_RAISED oBrw:nRowDividerStyle := LINESTYLE_RAISED oBrw:bClrSelFocus := {|| { nRGB( 0, 0, 0), nRGB(128,255,128) } } // para barra de linea selecc cuando el control tiene el foco oBrw:lColDividerComplete := (.t.) // (.T.) Mantiene siempre llena la pantalla oBrw:nHeaderHeight := 35 // Altura de los encabezados oBrw:nRowHeight := 25 // Altura del renglón oBrw:nHeaderLines := 3 // Número de líneas de encabezados oBrw:nDataLines := 2 // Número de líneas de detalle oBrw:nFooterHeight := 20 // Altura del footer oBrw:nFooterLines := 2 // Número de líneas en el footer oBrw:lFooter := (.T.) // Sí queremos línea de footer oBrw:lHScroll := (.T.) // Quitamos el scroll horizontal oBrw:bClrHeader := {|| { nRGB(000,000,000), nRGB(128,255,128) } } oBrw:bClrStd := { || If( oBrw:KeyNo() % 2 == 0, { CLR_BLACK, RGB( 224, 236, 255 ) }, { CLR_BLACK, RGB( 189, 211, 253 ) } ) } oBrw:bClrFooter := {|| { nRGB(000,000,000), nRGB(150,200,200) } } oBrw:bClrSel := {|| { nRGB(000,000,000), nRGB(128,255,128) } } // para barra de linea selecc cuando el control no tiene el foco oBrw:nStretchCol := STRETCHCOL_WIDEST oBrw:oFont := oFont2 oCol := oBrw:AddCol() oCol:bStrData := { || Tab_Fam->Cod_Fam } oCol:cHeader := "Codigo" oCol:nHeadStrAlign := AL_CENTER //LEFT oCol:nDataStrAlign := AL_LEFT //LEFT oCol:nWidth := 100 ocol:cToolTip :="Haga doble Click para ordenar por código" oCol := oBrw:AddCol() oCol:bStrData := { || Tab_Fam->Nom_Fam } oCol:cHeader := "Nombre" oCol:nHeadStrAlign := AL_CENTER //LEFT oCol:nDataStrAlign := AL_LEFT //LEFT oCol:nWidth := 300 ocol:cToolTip :="Haga doble Click para ordenar por Nombre" oBrw:bLDblClick := {|| Add_Fam(.F.) } Favor si me guian, se agradece...
tdolphin y xbrowse
Paso a paso Para utilizar XBrowse con recursos no puedes utilizar CreateFromCode, has de utilizar CreateFromResource( nID )
tdolphin y xbrowse
Estimado, uno mira, pero no ve.... ok, coloque lo indicado. hay la corrección, pero el problema siguiente es que me muestra todos los campos de la tabla... y yo solo quiero que me muestre 3 o 4, como se ve asi, pero al colocarlo no me toma... oCol:= oLbx:AddCol() oCol:bStrData:= { || IF(oProducto:BOF() .AND. oProducto:EOF(),SPACE(1),ADOField(oProducto,"rut_cte")) } oCol:cHeader := 'RUT' oCol:nWidth := 100 oCol:nHeadStrAlign:= AL_CENTER oCol:= oLbx:AddCol() oCol:bStrData:= { || IF(oProducto:BOF() .AND. oProducto:EOF(),SPACE(1),ADOField(oProducto,"nom_cte")) } oCol:cHeader := 'Nombre Cliente' oCol:nWidth := 400 oCol:nHeadStrAlign:= AL_CENTER /--------------------------------------------------------------------------------------------------------------------------------------- ACA EL XBROWSE QUE FUNCIONA BIEN,,, PERO NECESITO INSERTA LO DE ARRIBA Y NO ME LO HACE.. LO DE ARRIBA ESTA EN ADO, Y ESO QUIERO HACER TDOLPHIN.... DISCULPEN LAS MAYUSCULAS PERO ES PARA DAR ENFASIS A LOS TEXTOS. oBrw:=TxBrowse():New(oDlg) oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW // Con cursor de todo el renglón oBrw:nColDividerStyle := LINESTYLE_RAISED oBrw:nRowDividerStyle := LINESTYLE_RAISED oBrw:bClrSelFocus := {|| { nRGB( 0, 0, 0), nRGB(128,255,128) } } // para barra de linea selecc cuando el control tiene el foco oBrw:lColDividerComplete := (.t.) // (.T.) Mantiene siempre llena la pantalla oBrw:nHeaderHeight := 35 // Altura de los encabezados oBrw:nRowHeight := 25 // Altura del renglón oBrw:nHeaderLines := 3 // Número de líneas de encabezados oBrw:nDataLines := 2 // Número de líneas de detalle oBrw:nFooterHeight := 20 // Altura del footer oBrw:nFooterLines := 2 // Número de líneas en el footer oBrw:lFooter := (.T.) // Sí queremos línea de footer oBrw:lHScroll := (.T.) // Quitamos el scroll horizontal oBrw:bClrHeader := {|| { nRGB(000,000,000), nRGB(128,255,128) } } oBrw:bClrStd := {|| If( oBrw:KeyNo() % 2 == 0, { CLR_BLACK, RGB( 224, 236, 255 ) }, { CLR_BLACK, RGB( 189, 211, 253 ) } ) } oBrw:bClrFooter := {|| { nRGB(000,000,000), nRGB(150,200,200) } } oBrw:bClrSel := {|| { nRGB(000,000,000), nRGB(128,255,128) } } // para barra de linea selecc cuando el control no tiene el foco oBrw:l2007:=.T. oBrw:lAutoSort:=.T. oBrw:SetDolphin(oProducto,.T.,.T.) oBrw:bLDblClick := {|| GetArticulo2( .F.,oBrw), oProducto:Refresh() } oBrw:bRClicked := { | nRow, nCol | pantalla() } oBrw:oFont := oFont2 oBrw:CreateFromResource( 1000 ) hay
tdolphin y xbrowse
Para resaltar el texto utiliza el tipo de letra negrita ( bold ) o subrayado Si te es posible, usa "Code" o "Quote" cuando escribas los posts para que sean más sencillos de leer Gracias
tdosprn a tprinter
Amigos del foro: He venido trabajando con tdosprn hasta ahora pero debido a las enormes dificultades que me he encontrado no imprime en ambiente de red, no imprime en usb, me veo en la necesidad de cambiarlo por tprinter la pregunta es: cuanto debo de ponerle a: oPrn:nVertRes() para obtener 70 filas? y a oPrn:nHorzRes() para obtener 135 cols? que eso era lo que en una hoja continua chica entraba Yo lo hago de esta forma : nFilPixel := (oPrn:nVertRes() / [color=#FF0000:1p1un753]70[/color:1p1un753]) [color=#FF0000:1p1un753]//70 filas[/color:1p1un753] nColPixel := (oPrn:nHorzRes() / [color=#FF0000:1p1un753]135[/color:1p1un753]) [color=#FF0000:1p1un753]//135 cols[/color:1p1un753] y otra preg. saben que font es el que usa la clase tdosprn para imprimir o una similar mi objetivo es tratar de no modificar mis reportes hechos con tdosprn que ya estaban cuadrados para formato continuo gracias por los consejos q puedan darme Uso : fwh june 2005, bcc5, pelles c
tdosprn a tprinter
Prueba asi imprimiendo USB cFile :="LISTADO.PRN" cPrinter := PrinterPortToName( "USB001" ) oPrin := TDosPrn():New(cFile) oPrin:StartPage() ... ... oPrin:EndPage() oPrin:End() PrintFileRaw( cPrinter, cFile, "Imprimiendo Listado" ) FERASE( cFile ) SAludos
tdosprn a tprinter
artu01, Te recomiendo que utilices la clase TImprime/TUtilprn de Rafa Carmona. Creo que se ha hecho otra similar para .pdf. Espero que te ayude
tdosprn a tprinter
Gracias a ambos por sus rptas. jbrita: yo utilizo harbour y los comandos PrinterPortToName() y PrintFileRaw() son de xhb existira algo parecido en hb? hmpaquito: Voy a empezar a usar la clase timprime que me comentas,, tendras algun ejemplo? Gracias
tdosprn a tprinter
Artu01, Si mal no recuerdo, la clase TImprime/TUtilPrn ya trae ejemplos; desgraciadamente mi codigo esta demasiado elaborado como para dejar aqui un ejemplo claro y sencillo. Tengo todas mis impresiones basadas en esa clase, ya sea listados, ya sea documentos. Saludos
tdosprn a tprinter
Ya encontre la clase con algunos ejemplos los voy a estudiar cualquier duda que temga te lo hare saber gracias paquito
tdosprn for any printer
anserkk can you upload again the class txtview.prg (modified by Ralph) I need to print for port: lpt1 / usb / remote printer using the class txtview with tdosprn Thanks
tdosprn for any printer
Sorry for the delay. [url:39iebr93]http&#58;//filesflash&#46;com/eyjomy91[/url:39iebr93] Regards [b:39iebr93]Anser[/b:39iebr93]
tdosprn for any printer
anser thank you very much for your help i'll intend to try i'' ll inform you my results Regards
tdosprn usb port
Hello Has anyone succeded using tdosprn on a usb port ? I need to send ESC commands to a pos printer on a usb port, any idea ? Thanks for the help Richard
tdosprn usb port
Richard, You may want to have a look at xHarbour's PrintFileRaw() function. Hi, Davide
tdosprn usb port
Richard, I found the note below in my archives. I don't know if it will help. If it doesn't help, perhaps you can contact Kleyber for help. Also, there is a FW function escape() for sending escape codes to the printer. James --------------------- Posted: 12/25/03 Evans, Try putting this line in your main prg before open any databases. xHd := GetPrintDefault( GetActiveWindow() ) Regards and Merry Christmas -- Kleyber Derick Batalha Ribeiro Diretor de Produtos TK Informídia Ltda email: <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Web: <!-- w --><a class="postlink" href="http://www.tkinformidia.net">www.tkinformidia.net</a><!-- w -->
tdosprn usb port
[quote="Davide":14ye6kqw]Richard, You may want to have a look at xHarbour's PrintFileRaw() function. Hi, Davide[/quote:14ye6kqw] Thank you i will have a look at this function. Though i use fw printing, i will check if both can work together (this is my problem) Richard
tdosprn usb port
[quote="James Bott":1939ca8n]Richard, I found the note below in my archives. I don't know if it will help. If it doesn't help, perhaps you can contact Kleyber for help. Also, there is a FW function escape() for sending escape codes to the printer. James --------------------- Posted: 12/25/03 Evans, Try putting this line in your main prg before open any databases. xHd := GetPrintDefault( GetActiveWindow() ) Regards and Merry Christmas -- Kleyber Derick Batalha Ribeiro Diretor de Produtos TK Informídia Ltda email: <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Web: <!-- w --><a class="postlink" href="http://www.tkinformidia.net">www.tkinformidia.net</a><!-- w -->[/quote:1939ca8n] Thank you James, I will try Escape (hopefully it is in my old fwh printdc.c), i can not use recent fwh print because of easypreview ! Hopefully we get a possibility of emailing PDf direct from fwh's preview, so I will not need easypreview anymore. Best regards Richard
tdosprn usb port
Richard, Your printdc.c surely has Escape().
tdosprn usb port
Have a look at this example, maybe can help you. <!-- w --><a class="postlink" href="http://www.solupymes.com/fwin/tdosprev.zip">www.solupymes.com/fwin/tdosprev.zip</a><!-- w --> This was published in the spanish forum at Feb/07
tdosprn usb port
[quote="Richard Chidiak":33j5210v] Though i use fw printing, i will check if both can work together (this is my problem) Richard[/quote:33j5210v] I use them both in a FWH project of mine, so, yes, they can work together (one after the other). Hi, Davide.
tdosprn y windows 7
Buen dia. En una aplicacion en red hecha con fwh2.4 usando tdosprn ('Modo texto') no imprime si la terminal usa windows 7. Tengo varias terminales conectadas a un servidor, las terminales con XP imprimen bien, pero en una terminal con windows 7 al mandar la impresion desde el programa, no se imprime nada. Ya tengo direccionado el puerto LPT con Net USe. Si en la misma terminal con windows 7 hago pruebas de impresion desde MS-DOS enviando por ejemplo dir>LPT1, se imprime correctamente. Solo al imprimir desde la aplicacion no se imprime nada. ¿A alguien le ha pasado esto?. Tal ves sea mi version de tdosprn algo antigua. ¿Alguien sabe donde puedo bajar la nueva version de tdosprn que tiene preview?. Saludos. Jose Rios
tdsn.ch for tdsn class
hi, can someone post to me the file TDSN.CH for the class tdsn? (to automatically create a dsn in ODBC) thanks in advance marzio
tdsn.ch for tdsn class
I was using a DSN entry but since I found a way to access ODBC without having a DSN entry, it has been less I have to do at each workstation. Check out this [url:3uunnojo]http&#58;//www&#46;w3schools&#46;com/ado/ado_connect&#46;asp[/url:3uunnojo] We have a new system using Progress so here is my sample Progress connect string: [code=fw:3uunnojo]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cConnectString := <span style="color: #ff0000;">"DRIVER={Progress OpenEdge 10.2A Driver};host=trg-triniumdb;uid=MyUserId; password=MyPassWord; port=12000;db=us_live;"</span><br />oRecordSet := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADODB.Recordset"</span> <span style="color: #000000;">&#41;</span><br />cSql := <span style="color: #000000;">&#91;</span><span style="color: #0000ff;">SELECT</span> * <span style="color: #0000ff;">FROM</span> MyTable<span style="color: #000000;">&#93;</span><br />? <span style="color: #ff0000;">'Connect String = '</span>+cConnectString<br />? <span style="color: #ff0000;">'Sql String = '</span>+cSql<br />oRecordSet:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> cSql, cConnectString, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span></div>[/code:3uunnojo] Here is an Access connect string [code=fw:3uunnojo]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;::<span style="color: #000000;">cDriver</span> &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Driver={Microsoft Access Driver (*.mdb)}]<br />&nbsp; &nbsp;::cHost &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := []<br />&nbsp; &nbsp;::cUserId &nbsp; &nbsp; &nbsp; &nbsp; := []<br />&nbsp; &nbsp;::cPassword &nbsp; &nbsp; &nbsp; := []<br />&nbsp; &nbsp;::cDatabase &nbsp; &nbsp; &nbsp; := [<span style="color: #000000;">\\</span>Trg210<span style="color: #000000;">\w</span>ebcenter<span style="color: #000000;">\D</span>atabase<span style="color: #000000;">\w</span>ebcenter40.mdb]<br />&nbsp; &nbsp;::cConnectString &nbsp;:= [DRIVER=]+::cDriver+[;]+ ;<br />&nbsp; &nbsp; &nbsp; [dbq=]+::cDatabase+[;]<br /> </span></div>[/code:3uunnojo]
tdsn.ch for tdsn class
thanks for yuor reply. I also use ado to connect to sql dbase, but i have an old program with odbc connection. before to convert the old program to ado instructions, i would like to make the automatic creation of the odbc dsn. ciao, marzio
tdsn.ch for tdsn class
You can use ODBC WITHOUT creating DSN entry. Here is a website that has many DSN-Less and other connection strings. They use ASP but easily converted to xHarbour. [url:1kyob11l]http&#58;//www&#46;codemaker&#46;co&#46;uk/it/tips/ado_conn&#46;htm[/url:1kyob11l] Here is another [url:1kyob11l]http&#58;//www&#46;dofactory&#46;com/Connect/Connect&#46;aspx#_self2[/url:1kyob11l] for example: to connect to SQL server [code=fw:1kyob11l]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oConn.Open <span style="color: #ff0000;">"Driver={SQL Server};"</span> & _ <br />           <span style="color: #ff0000;">"Server=MyServerName;"</span> & _<br />           <span style="color: #ff0000;">"Database=myDatabaseName;"</span> & _<br />           <span style="color: #ff0000;">"Uid=myUsername;"</span> & _<br />           <span style="color: #ff0000;">"Pwd=myPassword"</span><br />Or in xHarbour<br />   ::<span style="color: #000000;">cDriver</span>         := <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>SQL <span style="color: #00C800;">Server</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span><br />   ::<span style="color: #000000;">cServer</span>     &nbsp;   := <span style="color: #000000;">&#91;</span>MyServerName<span style="color: #000000;">&#93;</span><br />   ::<span style="color: #000000;">cUserId</span>         := <span style="color: #000000;">&#91;</span>myUsername<span style="color: #000000;">&#93;</span><br />   ::<span style="color: #000000;">cPassword</span>       := <span style="color: #000000;">&#91;</span>myPassword<span style="color: #000000;">&#93;</span><br />   ::<span style="color: #000000;">cDatabase</span>       := <span style="color: #000000;">&#91;</span>\\Trg210\webcenter\Database\webcenter40.mdb<span style="color: #000000;">&#93;</span><br />   ::<span style="color: #000000;">cConnectString</span>  := <span style="color: #000000;">&#91;</span>Driver=<span style="color: #000000;">&#93;</span>+::<span style="color: #000000;">cDriver</span>+<span style="color: #000000;">&#91;</span>;<span style="color: #000000;">&#93;</span>+ ;<br />      <span style="color: #000000;">&#91;</span><span style="color: #00C800;">Server</span>=<span style="color: #000000;">&#93;</span>+::<span style="color: #000000;">cServer</span>+<span style="color: #000000;">&#91;</span>;<span style="color: #000000;">&#93;</span>+;<br />      <span style="color: #000000;">&#91;</span>Database=<span style="color: #000000;">&#93;</span>+::<span style="color: #000000;">cDatabase</span>+<span style="color: #000000;">&#91;</span>;<span style="color: #000000;">&#93;</span>+;<br />      <span style="color: #000000;">&#91;</span>Uid=<span style="color: #000000;">&#93;</span>+::<span style="color: #000000;">cUserId</span>+<span style="color: #000000;">&#91;</span>;<span style="color: #000000;">&#93;</span>+;<br />      <span style="color: #000000;">&#91;</span>Pwd=<span style="color: #000000;">&#93;</span>+::<span style="color: #000000;">cPassword</span>+<span style="color: #000000;">&#91;</span>;<span style="color: #000000;">&#93;</span><br /> </div>[/code:1kyob11l]
tdsn.ch per classe tdsn
salve a tutti, qualcuno mi può postare il file TDSN.CH per la classe tdsn? grazie in anticipo marzio
tdsn.ch per classe tdsn
L'ho cercato per tutto il mio hard disk ma non ce l'ho. Di cosa fa parte? EMG
tdsn.ch per classe tdsn
fa parte della classe tdsn.prg per creare un dsn in odbc. evita di crearlo manualmente, passando: nomeOdbc, server, dbase, user, password... ho cercato in tutto il forum, qualcuno mette a disposizione la classe ma non il file ch. ciao, marzio
tecla INS y como modificar dbf por programa
Hola Amigos! Dos preguntas: - como puedo activar la tecla INS por defecto en un prg para que al ingresar el dato no borre el contenido existente? sin que el usuario tenga que activarla antes de ingresar. - Como modificar una DBF por programa para adicionar un campo y que funcion me permite verificar si el campo existe? de antemano muchas gracias por sus comentarios un xhabrazo <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
tecla INS y como modificar dbf por programa
un poco de ayuda donde esta ????? lo haces tu, ya que voy saliendo y no me dio tiempo finalizarlos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code:cbvss6bv] FUNCTION FieldExist&#40;cFieldName&#41; LOCAL aFields&#91;FCOUNT&#40;&#41;&#93; afields&#40;aFields&#41; FOR x&#58;=1 TO len&#40;aFields&#41; IF aFields&#91;x&#93; = cFieldName RETURN &#46;t&#46; ENDIF NEXT RETURN &#46;f&#46; [/code:cbvss6bv] [code:cbvss6bv] FUNCTION InsertField&#40;aField&#41; LOCAL aStruct&#58;=dbstruct&#40;&#41; LOCAL cAlias &#58;= alias&#40;&#41; //agrega al arreglo con la estructura el nuevo campo aadd&#40;aStruct,aField&#41; //crea una tabla temporal dbcreate&#40;"_TEMP_",aStruct&#41; //copia todos los registros de la tabla actual a la tabla nueva GO TOP COPY TO _TEMP_ //cierra tabla actual CLOSE TABLE //elimina tabla actual ?????? //renombra la tabla nueva con el nombre de la tabla anterior ????? //abre tabla nueva con el alias anterior ????? RETURN NIL [/code:cbvss6bv] [code:cbvss6bv] &#46;&#46;&#46; //verifica si existe el campo ENERO07 en la tabla TEMP IF !TEMP->&#40;FieldExist&#40;"ENERO07"&#41;&#41; //altera la tabla agregando el campo aNewField &#58;= &#123;"ENERO07","N",09,02&#125; TEMP->&#40;InsertField&#40;aField&#41;&#41; ENDIF [/code:cbvss6bv]
tecla INS y como modificar dbf por programa
gracias mil eduardo!! lo voy a probar <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
tecla alt
¿es posible saber si el usuario está presionando la tecla alt?
tecla alt
Quique,La tecla Alt en combinación con otra tecla genera el evento que llama al método SysCommand()
tecla alt
[quote="quique":3pj67qlc]¿es posible saber si el usuario está presionando la tecla alt?[/quote:3pj67qlc]Observa cuidadosamente el teclado, si ves un dedo posicionado sobre la tecla Alt, seguramente el usuario la está presionando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->Ya en serio, cuando se presiona la tecla Alt por sí misma no genera algún evento detectable (solamente resalta un item de un menú si existe alguno), como dice Antonio, el evento se genera y se puede detectar desde algún codeblock bKeyDown solamente en combinación con otra tecla usando la función GetKeyState( VK_MENU ).Para Antonio, he observado que cuando no existe algún menú activo y presionas la tecla Alt (sola), el diálogo o ventana activos simplemente pierden el foco y lo recuperan si presionas la tecla Esc o haces click en el Diálogo o Ventana activos, al parecer se trata de un bug de Fivewin.Un abrazo.Manuel MercadoManuel Mercado
teclado tactil
Hola a todos: Necesito implementar un teclado tactil. ¿Existe alguna clase o algo?. El ejemplo keysbin.prg no funciona correctamente. Mil gracias. Salu2, Pablo
teclado tactil
Pablo, El ejemplo samples\keybsim.prg funciona correctamente con esta pequeña modificación: [code:3u3fpl78] local hDLL &#58;= LoadLibrary&#40; "bwcc32&#46;dll" &#41; // NUEVO! SET RESOURCES TO "KBSIM_32&#46;DLL" BWCCRegister&#40; GetResources&#40;&#41; &#41; [/code:3u3fpl78]
teclado virtual. Virtual Keyboard
Hola a todos. Tengo una aplicacion en FWPPC con un teclado virtual hecho a la medida. Dentro de mi misma aplicacion funciona perfecto. Mi pregunta es como hacer algo similar para sustituir el teclado virtual del Sistema Operativo Windows mobile y/o Windows CE. Y luego como hacer para que esta aplicacion pueda ser llamada desde otras aplicaciones cada vez que se invoque el teclado virtual. Alguna Idea?
teclado virtual. Virtual Keyboard
Arturo, El asunto no es nada simple pues implica crear un ActiveX que proporcione el nuevo teclado: [url:14vkwzm1]http&#58;//www&#46;pocketpcfaq&#46;com/wiki/tiki-index&#46;php?mode=mobile&page=Registry%20Input[/url:14vkwzm1] [quote:14vkwzm1]Set default SIP - Soft Input Panel - Pocket PC only The default SIP (Soft Input Panel) on practically every device is the Keyboard. You may prefer entry with a different SIP. If so, you can set this to be the default SIP through: HKCU\ [ControlPanel] \SIP\DefaultIM = |SIP ClassID| The |SIP ClassID| will depend on the SIP's ClassID, which may vary per-device. You can find the correct ClassID by searching for "IsSIP [InputMethod] " in HKCR, then going to the top key and checking the name of the SIP that's in the (Default) value. Please note that this doesn't work with all SIPs. Transcriber/Calligrapher are two examples of this. You can, however, set Transcriber as the default SIP by starting Transcriber.exe on startup. (This should be moved to, or added to, non-registry Tweaks page) WARNING : Do not assume that the below ClassIDs would be -as found- on your device! Setting it to a non-existant SIP may prevent your device from booting up! WARNING : If you set an invalid value in DefaultIM (or apparently if you're running a recent AKU [http://forum.xda-developers.com/showpost.php?p=1032402&amp;postcount=800] ), then you'll probably have to hard reset your device. Note : An alternative means of changing the default SIP is by using the SIPChange utility: [http://forum.xda-developers.com/showpost.php?p=995883&amp;postcount=16] [/quote:14vkwzm1]
teclado virtual. Virtual Keyboard
Gracias Antonio, por la introduccioon y la liga. Efectivamente, se ve algo complicado, y ademas un tanto riesgozo. Si encuentro resultados te los reportare aqui en el foro. Saludos!
teclado virtual. Virtual Keyboard
Bom dia Arturo. Nos poderias postear uno piqueno exemplo de como chamar um teclado virtual por medida. Gracias. Pedro
teclado virtual. Virtual Keyboard
Peter: Lo que tengo En realidad NO es un teclado Virtual. Unicamente lo que hago es llamar desde un evento de objeto GET un Dialog con botones de teclado, y el resultado lo mando de regreso al GET. Pero esto, obviamente, no puede ser usado mas que DENTRO de mi aplicacion. Aun asi, por si a alguien le sirve el ejemplo: [code=fw:1f3hp1y5]<div class="fw" id="{CB}" style="font-family: monospace;"><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, oFont<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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;">"Llamar mi dialog de teclado"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">08</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&TestGet"</span>&nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">ACTION</span> TestGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">12</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&End"</span>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">30</span> <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><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br />*****************************************************************************<br /><br /><span style="color: #00C800;">Function</span> TestGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGet1, cName1 := space<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"TESTGET"</span> <span style="color: #B900B9;">// STYLE WS_OVERLAPPED</span><br /><br />&nbsp; &nbsp;&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">var</span> cName1 &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">26</span> <span style="color: #0000ff;">OF</span> oDLG <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGet1:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey | MyKeyPad<span style="color: #000000;">&#40;</span> nKey, @oGet1, @cName1 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br />&nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />*****************************************************************************<br /><br /><br /><br /><span style="color: #00C800;">Function</span> MyKeyPad<span style="color: #000000;">&#40;</span> nKey, oGet, cCapture <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> &nbsp;aOx:=array<span style="color: #000000;">&#40;</span><span style="color: #000000;">44</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Antes de entrar puedes evaluar el valor de nKey </span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">private</span> cResp:=<span style="color: #ff0000;">""</span>, oChk1, lPlantilla:=.t.,;<br />&nbsp; &nbsp; &nbsp; &nbsp; cPlantilla:=<span style="color: #ff0000;">"99AAAA9999"</span>, cFlag<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"KeypadC"</span> <span style="color: #B900B9;">// STYLE WS_OVERLAPPED</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// set font of oDlg to oFont</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">02</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"C"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">04</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"D"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">05</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"E"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"F"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">07</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">107</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"G"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">08</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">108</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"H"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">09</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"I"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"J"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"K"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">112</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"L"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">113</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"M"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">14</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">114</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"N"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">15</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">115</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Ñ"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">16</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">116</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">17</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">117</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"P"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">18</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">118</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Q"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">19</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">119</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"R"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"S"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">21</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">121</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"T"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">22</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">122</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"U"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">23</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">123</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"V"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">24</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">124</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"W"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">125</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"X"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">126</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Y"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">27</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">127</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Z"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">130</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">31</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">131</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"1"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">32</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">132</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"2"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">33</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">133</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"3"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">34</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">134</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"4"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">35</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">135</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"5"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">36</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">136</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"6"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">37</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">137</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"7"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">38</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">138</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"8"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">39</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">139</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">action</span> KP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">29</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">129</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">action</span> KPCtrl<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Back"</span> , @aOx, @cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">40</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">140</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">action</span> KPCtrl<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"NUM"</span> &nbsp;, @aOx, @cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">41</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">141</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">action</span> KPCtrl<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CHRS"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">42</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">142</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">action</span> KPCtrl<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Enter"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">44</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">144</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">action</span> KPCtrl<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Space"</span>, @aOx, @cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">var</span> cCapture &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">128</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">when</span> .f.<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> ochk1 <span style="color: #0000ff;">VAR</span> lPlantilla <span style="color: #0000ff;">ID</span> <span style="color: #000000;">145</span> <span style="color: #0000ff;">of</span> oDlg <br />&nbsp;<br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> KeyPadToNum<span style="color: #000000;">&#40;</span> @aOx <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; oGet:<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> .t.<br />*****************************************************************************<br /><br /><span style="color: #00C800;">function</span> KP<span style="color: #000000;">&#40;</span>cText, aOx, cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span>cCapture<span style="color: #000000;">&#41;</span><<span style="color: #000000;">40</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cCapture+=cText<br />&nbsp; &nbsp; &nbsp; &nbsp; aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lPlantilla <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ChkPlantilla<span style="color: #000000;">&#40;</span>@aOx, @cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> .t.<br />*****************************************************************************<br /><br /><span style="color: #00C800;">function</span> KPCtrl<span style="color: #000000;">&#40;</span>cText, aOx, cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cText:=upper<span style="color: #000000;">&#40;</span>cText<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> <span style="color: #ff0000;">"BACK"</span>$cText<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span>cCApture<span style="color: #000000;">&#41;</span>><span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cCapture := subs<span style="color: #000000;">&#40;</span> cCapture, <span style="color: #000000;">1</span>, len<span style="color: #000000;">&#40;</span>cCapture<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> <span style="color: #ff0000;">"SPACE"</span>$cText<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span>cCapture<span style="color: #000000;">&#41;</span><<span style="color: #000000;">40</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cCapture += <span style="color: #ff0000;">" "</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> <span style="color: #ff0000;">"NUM"</span>$cText<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeyPadToNum<span style="color: #000000;">&#40;</span>@aOx<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> <span style="color: #ff0000;">"CHRS"</span>$cText<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeyPadToChr<span style="color: #000000;">&#40;</span>@aOx<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> <span style="color: #ff0000;">"ENTER"</span>$cText<br />&nbsp; &nbsp; <span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> lPlantilla <br />&nbsp; &nbsp; &nbsp; &nbsp; ChkPlantilla<span style="color: #000000;">&#40;</span>@aOx, @cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> .t.<br />*****************************************************************************<br /><br /><span style="color: #00C800;">Function</span> KeyPadToNum<span style="color: #000000;">&#40;</span>aOx<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">for</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">27</span><br />&nbsp; &nbsp; aOx<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span><br /><span style="color: #00C800;">for</span> i:=<span style="color: #000000;">30</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">39</span><br />&nbsp; &nbsp; aOx<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span><br />aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">40</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// ESCONDE BOTON NUM</span><br />aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">41</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>&nbsp; <span style="color: #B900B9;">//SHOW BTN CHRS</span><br />cFlag:=<span style="color: #ff0000;">"9"</span><br /><span style="color: #00C800;">return</span> .t.<br />*****************************************************************************<br /><br /><span style="color: #00C800;">Function</span> KeyPadToChr<span style="color: #000000;">&#40;</span>aOx<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">for</span> i:=<span style="color: #000000;">30</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">39</span><br />&nbsp; &nbsp; aOx<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span><br /><span style="color: #00C800;">for</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">27</span><br />&nbsp; &nbsp; aOx<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span><br />aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">41</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />aOx<span style="color: #000000;">&#91;</span><span style="color: #000000;">40</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />cFlag:=<span style="color: #ff0000;">"A"</span><br /><span style="color: #00C800;">return</span> .t.<br />*****************************************************************************<br /><br /><span style="color: #00C800;">Function</span> ChkPlantilla<span style="color: #000000;">&#40;</span>aOx, cCapture<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> cFlag <> SUBS<span style="color: #000000;">&#40;</span>cPlantilla, len<span style="color: #000000;">&#40;</span>cCapture<span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> cFlag=<span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeyPadToNum<span style="color: #000000;">&#40;</span>@aOx<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeyPadToChr<span style="color: #000000;">&#40;</span>@aOx<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> .t.<br />*****************************************************************************<br /><br /><br />&nbsp;</div>[/code:1f3hp1y5] Saludos.
teclado virtual. Virtual Keyboard
Muchas Gracias por atencion. Vou testar... Saludos.
teclado virtual. Virtual Keyboard
Arturo. Poderias disponibilizar el ficheiro RC?? Muchas Gracias..
teclado virtual. Virtual Keyboard
Si, con gusto. Espero que te haya servido de algo Como se puede ver esta pantalla esta colgada al evento bKeyChar() del objeto GET. Aunque la mejor manera debiera ser colgarla al evento LButtonDown(), Habria que preguntar a Antonio porque este evento no esta disponible, En mi caso tuve que hacer una derivacion de la clase GET, para lo cual copie y modifique el programa TGet.prg para tener disponible LButtonDown(). Aqui anexo el archivo del RC para el ejemplo NOTA: para tus pruebas te recomiendo eliminar lo referente a checkbox "Codigo", esto se puso par aceptar un patron de captura, donde el programa automaticamente va cambiando de modalidad Alfabetica a Numerica. [code=fw:3nhut0r2]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifdef _CE<br />&nbsp; &nbsp;<span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\v</span>ce<span style="color: #000000;">\i</span>nclude<span style="color: #000000;">\a</span>rm<span style="color: #000000;">\w</span>indows.h"</span><br />&nbsp; &nbsp;<span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\v</span>ce<span style="color: #000000;">\i</span>nclude<span style="color: #000000;">\a</span>rm<span style="color: #000000;">\c</span>ommctrl.h"</span><br />#endif<br /><br /><br /><br />TESTGET <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">10</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">138</span>, <span style="color: #000000;">168</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|WS_SYSMENU|WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"System"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">26</span>, <span style="color: #ff0000;">"Edit"</span>, WS_BORDER|WS_TABSTOP, <span style="color: #000000;">5</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">91</span>, <span style="color: #000000;">12</span><br /><span style="color: #000000;">&#125;</span><br /><br /><br />KEYPADC <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">10</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">138</span>, <span style="color: #000000;">168</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|WS_SYSMENU|WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"System"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"A"</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">29</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"B"</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">25</span>, <span style="color: #000000;">29</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">103</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">47</span>, <span style="color: #000000;">29</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"D"</span>, <span style="color: #000000;">104</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">70</span>, <span style="color: #000000;">29</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"E"</span>, <span style="color: #000000;">105</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">92</span>, <span style="color: #000000;">29</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"F"</span>, <span style="color: #000000;">106</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">114</span>, <span style="color: #000000;">29</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"G"</span>, <span style="color: #000000;">107</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">53</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"H"</span>, <span style="color: #000000;">108</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">25</span>, <span style="color: #000000;">53</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"I"</span>, <span style="color: #000000;">109</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">47</span>, <span style="color: #000000;">53</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"J"</span>, <span style="color: #000000;">110</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">70</span>, <span style="color: #000000;">53</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"K"</span>, <span style="color: #000000;">111</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">92</span>, <span style="color: #000000;">53</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"L"</span>, <span style="color: #000000;">112</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">114</span>, <span style="color: #000000;">53</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"M"</span>, <span style="color: #000000;">113</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">77</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"N"</span>, <span style="color: #000000;">114</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">25</span>, <span style="color: #000000;">77</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"O"</span>, <span style="color: #000000;">116</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">47</span>, <span style="color: #000000;">77</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"P"</span>, <span style="color: #000000;">117</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">70</span>, <span style="color: #000000;">77</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Q"</span>, <span style="color: #000000;">118</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">92</span>, <span style="color: #000000;">77</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"R"</span>, <span style="color: #000000;">119</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">114</span>, <span style="color: #000000;">77</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"S"</span>, <span style="color: #000000;">120</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"T"</span>, <span style="color: #000000;">121</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">25</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"U"</span>, <span style="color: #000000;">122</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">47</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"V"</span>, <span style="color: #000000;">123</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">70</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"W"</span>, <span style="color: #000000;">124</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">92</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"X"</span>, <span style="color: #000000;">125</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">114</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Y"</span>, <span style="color: #000000;">126</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">70</span>, <span style="color: #000000;">125</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Z"</span>, <span style="color: #000000;">127</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">92</span>, <span style="color: #000000;">125</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Ñ"</span>, <span style="color: #000000;">115</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">114</span>, <span style="color: #000000;">125</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"NUM"</span>, <span style="color: #000000;">140</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">7</span>, <span style="color: #000000;">148</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"CHRS"</span>, <span style="color: #000000;">141</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">7</span>, <span style="color: #000000;">148</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Espacio"</span>, <span style="color: #000000;">144</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">6</span>, <span style="color: #000000;">126</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"<<ENTER>>"</span>, <span style="color: #000000;">142</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">90</span>, <span style="color: #000000;">149</span>, <span style="color: #000000;">44</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"1"</span>, <span style="color: #000000;">131</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"2"</span>, <span style="color: #000000;">132</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">48</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"3"</span>, <span style="color: #000000;">133</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">94</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"4"</span>, <span style="color: #000000;">134</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"5"</span>, <span style="color: #000000;">135</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">48</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"6"</span>, <span style="color: #000000;">136</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">94</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"7"</span>, <span style="color: #000000;">137</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">76</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"8"</span>, <span style="color: #000000;">138</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">48</span>, <span style="color: #000000;">76</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"9"</span>, <span style="color: #000000;">139</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">94</span>, <span style="color: #000000;">76</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"0"</span>, <span style="color: #000000;">130</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">48</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">41</span>, <span style="color: #000000;">16</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">128</span>, <span style="color: #ff0000;">"Edit"</span>, WS_BORDER|WS_TABSTOP, <span style="color: #000000;">5</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">91</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"<--"</span>, <span style="color: #000000;">129</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">109</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">14</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Codigo"</span>, <span style="color: #000000;">145</span>, <span style="color: #ff0000;">"Button"</span>, BS_AUTOCHECKBOX|WS_TABSTOP, <span style="color: #000000;">51</span>, <span style="color: #000000;">151</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">12</span><br /><span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp;</div>[/code:3nhut0r2] Saludos Arturo
teclado virtual. Virtual Keyboard
Arturo. Muchas Gracias por tu feed Back. Hay sido muy interesante analisar tu teclado virtual. Otro assunto que mi gostaria colocar neste forum es relacionado con el aspecto de los butones. Hay alguna forma de dar un aspecto mas moderno a los botones?? Hay alguno manifest file o algo do genero para dar uno aspecto mas profisional a los botones?? Muchas Gracias por tus respuestas... Un gran saludo... Pedro
teclado virtual. Virtual Keyboard
Como te decia al inicio, este NO ES un teclado virtual como tal, pero sigo investigando acerca de ello. Respecto al aspecto, te recomiendo busques Alphablend en este foro, y tambien sobre el trabajo de Silvio, tambien puedes abrir otro topic para conocer que es lo ultimo que otros usuarios han hecho. Saludos.
teclado virtual. Virtual Keyboard
Hola arturo estoy usando tu teclado con unas modificaciones, ya que solo necesito el teclado numerico, backspace y enter. Ahora mi problema es el siguiente necesito lanzar el teclado una vez el get tome el foco, no puedo usar :bgotfocus, porque me queda un bucle infinito, tu función lanza el teclado al darle enter. me puedes dar una mano. Gracias y saludos.
teclas de atajo dejan de funcionar
Gente si coloco esta linea en la funcion, al regresar al menu principal, las teclas de atajo del menu ya no me funcionan [code=fw:21ez252s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//Abierto desde el menu principal</span><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> BRWARTIC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ....<br />   SetKey<span style="color: #000000;">&#40;</span> VK_F10, <span style="color: #000000;">&#123;</span> || oDlgDet:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//==>si quito esta linea, las teclas de atajo del menu principal funcionan poniendo ALT +</span><br />   SetKey<span style="color: #000000;">&#40;</span> VK_F10, <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//==>he intentado con esto y tampoco funca</span><br />   ...<br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:21ez252s] [code=fw:21ez252s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//Menu principal</span><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Menu</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MSis<br /><span style="color: #00C800;">LOCAL</span> oMenu<br /><br />   <span style="color: #B900B9;">//DEFINE MENU oMenu RESOURCE ::cMenu</span><br />   <span style="color: #0000ff;">MENU</span> oMenu<br />    <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Maestros"</span><br />      <span style="color: #0000ff;">MENU</span><br />        <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Articulos"</span>+ Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"Ctrl+A"</span>;<br />          <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> IIF<span style="color: #000000;">&#40;</span>TPWDIR->ARTI1, BRWARTIC<span style="color: #000000;">&#40;</span>,,.t.<span style="color: #000000;">&#41;</span>, MsgBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span>,<span style="color: #ff0000;">"NO tiene acceso a esta opción"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />          ACCELERATOR ACC_CONTROL, <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#41;</span> ;                  <br />          <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Mantenimiento de Articulos"</span>         <br />        ....<br />    .....<br />  .....<br /> </div>[/code:21ez252s]
teclas de atajo dejan de funcionar
F10 es un acceso directo (clave) reservada del windows. Evitar el uso de la misma. Saludos.
teclas de atajo dejan de funcionar
probare Joao, gracias
telegram
envio de msg para bot telegram veja o video para entender melhor: <!-- m --><a class="postlink" href="https://www.youtube.com/watch?v=hJBYojK7DO4">https://www.youtube.com/watch?v=hJBYojK7DO4</a><!-- m --> [code=fw:3mfax4eh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> Telegram<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">Local</span> oDlg, oFont, oFont2, lEnvia:=.f., cMsg:=Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">500</span><span style="color: #000000;">&#41;</span>, cUrl, aArray, oHost, oBtn, oSay, x1<br /> <span style="color: #00C800;">Local</span> cToken := <span style="color: #ff0000;">"AQUI COLOQUE SEU TOKEN"</span>, cChat_id := <span style="color: #ff0000;">"AQUI CHAT ID"</span><br /> <span style="color: #00C800;">Local</span> xMsg := <span style="color: #ff0000;">"*AQUI SUA MSG*%0A"</span>+;<br />               <span style="color: #ff0000;">"MAIS MSG%0A"</span><br /><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont  <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Lucida Console"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Lucida Console"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><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;">4</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">8</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"msg p/bot Telegram"</span><br /><br />  @  <span style="color: #000000;">4</span>,  <span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oMsg <span style="color: #0000ff;">VAR</span> cMsg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_GET1,CLR_GET2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">290</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">FONT</span> oFont CUEBANNER <span style="color: #ff0000;">"Sua mensagem aqui"</span> <br /><br />  @ <span style="color: #000000;">4</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Enviar"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">34</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>lEnvia:=.t., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />  oDlg:<span style="color: #000000;">lHelpIcon</span> := .f.<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBtn:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">If</span> lEnvia .and. !Empty<span style="color: #000000;">&#40;</span>cMsg<span style="color: #000000;">&#41;</span><br />     cUrl := <span style="color: #ff0000;">"https://api.telegram.org/bot"</span>+cToken+<span style="color: #ff0000;">"/sendMessage?chat_id="</span>+cChat_id+<span style="color: #ff0000;">"&parse_mode=Markdown&text="</span>+xMsg+cMsg<br />     <span style="color: #00C800;">Try</span><br />         oHost := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'MSXML2.ServerXMLHTTP.6.0'</span> <span style="color: #000000;">&#41;</span><br />     Catch erro<br />         ? erro:<span style="color: #000000;">Description</span><br />         <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />     End<br /><br />     oHost:<span style="color: #000000;">open</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'GET'</span>, cUrl, .f.<span style="color: #000000;">&#41;</span><br />     oHost:<span style="color: #000000;">send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #00C800;">If</span> oHost:<span style="color: #000000;">Status</span> != <span style="color: #000000;">200</span><br />        MsgStop<span style="color: #000000;">&#40;</span>Alltrim<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>oHost:<span style="color: #000000;">Status</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" - "</span>+oHost:<span style="color: #000000;">StatusText</span> , <span style="color: #ff0000;">"Erro"</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />     <span style="color: #00C800;">Endif</span><br /><br />     <span style="color: #00C800;">While</span> oHost:<span style="color: #000000;">readyState</span> != <span style="color: #000000;">4</span><br />        oHost:<span style="color: #000000;">WaitForResponse</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1000</span><span style="color: #000000;">&#41;</span><br />     End<br /><br />     x1 := hb_jsondecode<span style="color: #000000;">&#40;</span> oHost:<span style="color: #000000;">responseText</span>, @aArray <span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #00C800;">If</span> aArray == <span style="color: #00C800;">nil</span><br />         MsgStop<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Erro ao retornar os dados. Tente novamente."</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />     <span style="color: #00C800;">Endif</span><br /><br />     <span style="color: #00C800;">If</span> aArray<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'ok'</span><span style="color: #000000;">&#93;</span> = .f.<br />       MsgStop<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Erro no envio da messagem."</span>, <span style="color: #ff0000;">"Aviso!"</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Else</span><br />       <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Sucesso no envio da messagem."</span>, <span style="color: #ff0000;">"Aviso!"</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Endif</span><br />  <span style="color: #00C800;">Endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3mfax4eh] [b:3mfax4eh] telegram canais fivewin: (fivewin brasil) => <!-- m --><a class="postlink" href="https://t.me/fivewinbr">https://t.me/fivewinbr</a><!-- m --> (fivewin internacional) => <!-- m --><a class="postlink" href="https://t.me/fivewines">https://t.me/fivewines</a><!-- m --> [/b:3mfax4eh]
telegram
[code=fw:2buo8m5t]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBtn:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// ???</span><br />&nbsp;</div>[/code:2buo8m5t]
telegram
[code=fw:2gbbt7tv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> CLR_GET1 CLR_BLACK<br /><span style="color: #00D7D7;">#Define</span> CLR_GET2 CLR_WHITE<br /><br /><span style="color: #00C800;">FUNCTION</span> Telegram<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oFont, oFont2, lEnvia := .F. , cMsg := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">500</span> <span style="color: #000000;">&#41;</span>, cUrl, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aArray, oHost, oBtn, oSay, x1<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cToken := <span style="color: #ff0000;">"AQUI COLOQUE SEU TOKEN"</span>, cChat_id := <span style="color: #ff0000;">"AQUI CHAT ID"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> xMsg := <span style="color: #ff0000;">"*AQUI SUA MSG*%0A"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"MAIS MSG%0A"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oMsg, Erro<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Lucida Console"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Lucida Console"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">10</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">8</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"msg para bot Telegram"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE TRANSPARENT<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp;Set<span style="color: #000000;">&#40;</span> _SET_INSERT, ! Set<span style="color: #000000;">&#40;</span> _SET_INSERT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">4</span>, &nbsp;<span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oMsg <span style="color: #0000ff;">VAR</span> cMsg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_GET1, CLR_GET2 ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">290</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">FONT</span> oFont CUEBANNER <span style="color: #ff0000;">"Sua mensagem aqui"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">4</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Enviar"</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">34</span>, <span style="color: #000000;">16</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lEnvia := .T. , oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oMsg:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//oBtn:SetFocus()</span><br /><br />&nbsp; &nbsp;Set<span style="color: #000000;">&#40;</span> _SET_INSERT, ! Set<span style="color: #000000;">&#40;</span> _SET_INSERT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont2:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lEnvia .AND. !Empty<span style="color: #000000;">&#40;</span> cMsg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cUrl := <span style="color: #ff0000;">"https://api.telegram.org/bot"</span> + cToken + <span style="color: #ff0000;">"/sendMessage?chat_id="</span> + cChat_id + <span style="color: #ff0000;">"&parse_mode=Markdown&text="</span> + xMsg + cMsg<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Try</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oHost := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'MSXML2.ServerXMLHTTP.6.0'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; Catch erro<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;? erro:<span style="color: #000000;">Description</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; End<br /><br />&nbsp; &nbsp; &nbsp; oHost:<span style="color: #000000;">open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'GET'</span>, cUrl, .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oHost:<span style="color: #000000;">send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> oHost:<span style="color: #000000;">Status</span> != <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgStop<span style="color: #000000;">&#40;</span> Alltrim<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span>oHost:<span style="color: #000000;">Status</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" - "</span> + oHost:<span style="color: #000000;">StatusText</span> , <span style="color: #ff0000;">"Erro"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">WHILE</span> oHost:<span style="color: #000000;">readyState</span> != <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oHost:<span style="color: #000000;">WaitForResponse</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1000</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; End<br /><br />&nbsp; &nbsp; &nbsp; x1 := hb_jsondecode<span style="color: #000000;">&#40;</span> oHost:<span style="color: #000000;">responseText</span>, @aArray <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> aArray == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Erro ao retornar os dados. Tente novamente."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> aArray<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'ok'</span><span style="color: #000000;">&#93;</span> = .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Erro no envio da messagem."</span>, <span style="color: #ff0000;">"Aviso!"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Sucesso no envio da messagem."</span>, <span style="color: #ff0000;">"Aviso!"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><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:2gbbt7tv]
telegram
[quote="karinha":151dnf3h][code=fw:151dnf3h]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBtn:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// ???</span><br /> </div>[/code:151dnf3h][/quote:151dnf3h] olá amigo karinha usei o oBtn:SetFocus() por causa do CUEBANNER "Sua mensagem aqui"
telegram
[quote="Sistem":2f7wesko][quote="karinha":2f7wesko][code=fw:2f7wesko]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBtn:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// ???</span><br /> </div>[/code:2f7wesko][/quote:2f7wesko] olá amigo karinha usei o oBtn:SetFocus() por causa do CUEBANNER "Sua mensagem aqui"[/quote:2f7wesko] My dear friend, o objeto oBtn, não existe em local algum. Saudações. Gera erro na compilação. Você pode usar o cToolTip para: "Sua mensagem aqui".
telegram
tem razao e que para simplificar apaguei o codigo errado: If oApp:lBtn2007 @ 4, 300 BTNBMP oBtn OF oDlg SIZE 34, 16 PIXEL 2007 NOBORDER PROMPT "Enviar" LEFT RESOURCE "BMP_BTOK" ACTION (lEnvia:=.t., oDlg:End()) Else @ 4, 300 BUTTON "Enviar" PIXEL OF oDlg SIZE 34, 16 ACTION (lEnvia:=.t., oDlg:End()) Endif
telegram
Please a question [code=fw:1ofi0olg]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">Local</span> cToken := <span style="color: #ff0000;">"AQUI COLOQUE SEU TOKEN"</span>, cChat_id := <span style="color: #ff0000;">"AQUI CHAT ID"</span></div>[/code:1ofi0olg] where I can found token ? then where is chat ID ?
telegram
[url:2c6yrosi]http&#58;//fivewin&#46;com&#46;br/index&#46;php?/topic/24538-telegram/#comment-273531[/url:2c6yrosi]
telegram bot
<!-- m --><a class="postlink" href="https://www.youtube.com/watch?time_continue=3&v=hJBYojK7DO4">https://www.youtube.com/watch?time_cont ... JBYojK7DO4</a><!-- m --> [code=fw:2erzb574]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> Telegram<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">Local</span> oDlg, oFont, oFont2, lEnvia:=.f., cMsg:=Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">500</span><span style="color: #000000;">&#41;</span>, cUrl, aArray, oHost, oBtn, oSay, x1<br /> <span style="color: #00C800;">Local</span> cToken := <span style="color: #ff0000;">"AQUI COLOQUE SEU TOKEN"</span>, cChat_id := <span style="color: #ff0000;">"AQUI CHAT ID"</span><br /> <span style="color: #00C800;">Local</span> xMsg := <span style="color: #ff0000;">"*AQUI SUA MSG*%0A"</span>+;<br />               <span style="color: #ff0000;">"MAIS MSG%0A"</span><br /><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont  <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Lucida Console"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Lucida Console"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><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;">4</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">8</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"msg p/bot Telegram"</span><br /><br />  @  <span style="color: #000000;">4</span>,  <span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oMsg <span style="color: #0000ff;">VAR</span> cMsg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">290</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">FONT</span> oFont CUEBANNER <span style="color: #ff0000;">"Sua mensagem aqui"</span> <br /><br />  @ <span style="color: #000000;">4</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Enviar"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">34</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>lEnvia:=.t., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />  oDlg:<span style="color: #000000;">lHelpIcon</span> := .f.<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /><br />  <span style="color: #00C800;">If</span> lEnvia .and. !Empty<span style="color: #000000;">&#40;</span>cMsg<span style="color: #000000;">&#41;</span><br />     cUrl := <span style="color: #ff0000;">"https://api.telegram.org/bot"</span>+cToken+<span style="color: #ff0000;">"/sendMessage?chat_id="</span>+cChat_id+<span style="color: #ff0000;">"&parse_mode=Markdown&text="</span>+xMsg+cMsg<br />     <span style="color: #00C800;">Try</span><br />         oHost := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'MSXML2.ServerXMLHTTP.6.0'</span> <span style="color: #000000;">&#41;</span><br />     Catch erro<br />         ? erro:<span style="color: #000000;">Description</span><br />         <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />     End<br /><br />     oHost:<span style="color: #000000;">open</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'GET'</span>, cUrl, .f.<span style="color: #000000;">&#41;</span><br />     oHost:<span style="color: #000000;">send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #00C800;">If</span> oHost:<span style="color: #000000;">Status</span> != <span style="color: #000000;">200</span><br />        MsgStop<span style="color: #000000;">&#40;</span>Alltrim<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>oHost:<span style="color: #000000;">Status</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" - "</span>+oHost:<span style="color: #000000;">StatusText</span> , <span style="color: #ff0000;">"Erro"</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />     <span style="color: #00C800;">Endif</span><br /><br />     <span style="color: #00C800;">While</span> oHost:<span style="color: #000000;">readyState</span> != <span style="color: #000000;">4</span><br />        oHost:<span style="color: #000000;">WaitForResponse</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1000</span><span style="color: #000000;">&#41;</span><br />     End<br /><br />     x1 := hb_jsondecode<span style="color: #000000;">&#40;</span> oHost:<span style="color: #000000;">responseText</span>, @aArray <span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #00C800;">If</span> aArray == <span style="color: #00C800;">nil</span><br />         MsgStop<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Erro ao retornar os dados. Tente novamente."</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />     <span style="color: #00C800;">Endif</span><br /><br />     <span style="color: #00C800;">If</span> aArray<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'ok'</span><span style="color: #000000;">&#93;</span> = .f.<br />       MsgStop<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Erro no envio da messagem."</span>, <span style="color: #ff0000;">"Aviso!"</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Else</span><br />       <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Sucesso no envio da messagem."</span>, <span style="color: #ff0000;">"Aviso!"</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">Endif</span><br />  <span style="color: #00C800;">Endif</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span></div>[/code:2erzb574] group fivewin brasil <!-- m --><a class="postlink" href="https://t.me/fivewinbr">https://t.me/fivewinbr</a><!-- m --> group fivewin espanha <!-- m --><a class="postlink" href="https://t.me/fivewines">https://t.me/fivewines</a><!-- m -->
teletypewriter
I like to create a smal teletypewriter I want to show some video or written text every time you create an event, for example: " indexing archives clienti.dbf the archive was created" I thinked to use txtfile and refresh the get memo but I not found a test to try someone have this small test or an idea ?
teléfono Fivetech
Hola, Me gustaría hablar por favor con Cristóbal o Antonio, pues llevo desde diciembre sin poder usar xBrowse y SQLRDD. Muchas gracias.
teléfono Fivetech
Moisés, +34 722461100 Por lo que he visto, te estaba ayudando Rao con SQLRDD. Que falta para que funcione bien ?
teléfono Fivetech
Antonio, Como sabes, hace varias semanas os envié un ejemplo para probarlo. Nages y Cristóbal dicen que el mismo no puede conectar al servidor MySQL. Ante ello: a) Les he preguntado si desactivando el antivirus lo logran, pero no he recibido respuesta. b) Yo he compilado el ejemplo en una máquina virtual nueva, y funciona perfectamente. Os envié también un ejecutable compilado, y tampoco me han contestado. Por favor, necesitamos que xBrowse vuelva funcionar correctamente con SQLRDD como sí que lo hacía en la versión 14.12. Muchas gracias. Un saludo
teléfono Fivetech
Moisés, Tu ejemplo funciona correctamente, entonces, cual es el problema ?
teléfono Fivetech
Antonio, ¿Has probado también a compilarlo con buildx?
teléfono Fivetech
Por supuesto
tem como fazer isto em FW?
tem como fazer isto em FW? [code=fw:2i93wcl2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> DataObject As <span style="color: #00C800;">New</span> DataObject<br />        Dim file As String = <span style="color: #ff0000;">"C:<span style="color: #000000;">\T</span>ESTE.PDF"</span><br />        DataObject.SetData<span style="color: #000000;">&#40;</span>DataFormats.FileDrop, <span style="color: #00C800;">True</span>, file<span style="color: #000000;">&#41;</span><br />        Clipboard.SetDataObject<span style="color: #000000;">&#40;</span>DataObject<span style="color: #000000;">&#41;</span><br /> </div>[/code:2i93wcl2]
templates / plantillas
A dialog created from source code: [code=fw:19d5g0h7]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span>  <br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>        <br /> <br />   <span style="color: #00C800;">local</span> oDlg        <br /> <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span>        <br /> <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>  <br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /> </div>[/code:19d5g0h7] A dialog created from resources: test.prg [code=fw:19d5g0h7]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span>   <br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>         <br /> <br />   <span style="color: #00C800;">local</span> oDlg         <br /> <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span>         <br /> <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>   <br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /> </div>[/code:19d5g0h7] and test.rc [code=text:19d5g0h7]<div class="text" id="{CB}" style="font-family: monospace;"> <br />test DIALOG 17, 36, 185, 147 <br />STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION "Test" FONT 8, "MS Sans Serif" <br />{  <br />   DEFPUSHBUTTON "OK", 1, 67, 128, 50, 14 <br />}<br /> </div>[/code:19d5g0h7]
templates / plantillas
A window: [code=fw:5vvqsnxg]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />   <span style="color: #00C800;">local</span> oWnd <br /> <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <br /> <br />   <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 /> </div>[/code:5vvqsnxg]
templates / plantillas
MDI window and a PRINT ... PREVIEW: [code=fw:szaf5cp5]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />   <span style="color: #00C800;">local</span> oWnd <br /> <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> MDI ; <br />      <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />   <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;">function</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />   <span style="color: #00C800;">local</span> oMenu <br />    <br />   <span style="color: #0000ff;">MENU</span> oMenu <br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span> <br />      <span style="color: #0000ff;">MENU</span> <br />         <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Preview"</span> <span style="color: #0000ff;">ACTION</span> Preview<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />      <span style="color: #0000ff;">ENDMENU</span>    <br />      oMenu:<span style="color: #000000;">AddMdi</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   <span style="color: #0000ff;">ENDMENU</span> <br />    <br /><span style="color: #00C800;">return</span> oMenu    <br /> <br /><span style="color: #00C800;">function</span> Preview<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />   <span style="color: #00C800;">local</span> oPrn <br />    <br />   <span style="color: #0000ff;">PRINTER</span> oPrn Preview <br />      <span style="color: #0000ff;">PAGE</span> <br />         oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"Test"</span> <span style="color: #000000;">&#41;</span> <br />      <span style="color: #0000ff;">ENDPAGE</span> <br />   <span style="color: #0000ff;">ENDPRINTER</span> <br />    <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span>          <br /> </div>[/code:szaf5cp5]
templates / plantillas
A dialog with a folder from source code: test.prg [code=fw:3qtlwh0n]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />   <span style="color: #00C800;">local</span> oDlg, oFld <br />    <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">300</span><br /> <br />   @ <span style="color: #000000;">0.5</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">FOLDER</span> oFld <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">188</span>, <span style="color: #000000;">138</span> ;<br />      <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span><br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3qtlwh0n] A dialog with a folder from resources: test.prg [code=fw:3qtlwh0n]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <br />   <span style="color: #00C800;">local</span> oDlg, oFld<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span><br /> <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld ;<br />      <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"three"</span> ;<br />      <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> ;<br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg<br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3qtlwh0n] test.rc [code=text:3qtlwh0n]<div class="text" id="{CB}" style="font-family: monospace;"> <br />#ifdef __FLAT__<br />   1 24 "WindowsXP.Manifest" <br />#endif<br /> <br />test DIALOG 17, 36, 185, 147<br />STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION "Test"<br />FONT 8, "MS Sans Serif"<br />{<br /> CONTROL "", 100, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 6, 175, 117<br /> DEFPUSHBUTTON "OK", 1, 67, 128, 50, 14<br />}<br /> <br />one DIALOG 6, 15, 175, 117<br />STYLE WS_CHILD | WS_VISIBLE<br />FONT 8, "MS Sans Serif"<br />{<br />}<br /> <br />two DIALOG 6, 15, 175, 117<br />STYLE WS_CHILD | WS_VISIBLE<br />FONT 8, "MS Sans Serif"<br />{<br />}<br /> <br />three DIALOG 6, 15, 175, 117<br />STYLE WS_CHILD | WS_VISIBLE<br />FONT 8, "MS Sans Serif"<br />{<br />}<br /> </div>[/code:3qtlwh0n]
templates / plantillas
A folder and two xbrowses: test.prg [code=fw:7njo59ts]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XBrowse.ch"</span><br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /> <br />   <span style="color: #00C800;">local</span> oDlg, oFld, oBrw1, oBrw2 <br />    <br />   USE Customer <br />    <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span> <br /> <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld ; <br />      <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span> ; <br />      <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span> ; <br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg <br />      <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />      <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:7njo59ts] Test.rc [code=text:7njo59ts]<div class="text" id="{CB}" style="font-family: monospace;"> <br />#ifdef __FLAT__ <br />   1 24 "WindowsXP.Manifest" <br />#endif <br /> <br />test DIALOG 17, 36, 185, 147 <br />STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU <br />CAPTION "Test" <br />FONT 8, "MS Sans Serif" <br />{ <br /> CONTROL "", 100, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 6, 175, 117 <br /> DEFPUSHBUTTON "OK", 1, 67, 128, 50, 14 <br />} <br /> <br />one DIALOG 6, 15, 175, 117<br />STYLE WS_CHILD | WS_VISIBLE<br />FONT 8, "MS Sans Serif"<br />{<br /> CONTROL "", 10, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL, 4, 4, 168, 110<br />}<br /> <br />two DIALOG 6, 15, 175, 117<br />STYLE WS_CHILD | WS_VISIBLE<br />FONT 8, "MS Sans Serif"<br />{<br /> CONTROL "", 10, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL, 4, 4, 168, 110<br />}<br /> </div>[/code:7njo59ts]
templates / plantillas
A XBrowse on a dialog: test.prg [code=fw:d08sa8ca]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XBrowse.ch"</span><br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <br />   <span style="color: #00C800;">local</span> oDlg, oBrw<br /> <br />   USE Customer<br /> <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span><br /> <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">AUTOCOLS</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Customer"</span><br /> <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span>   <br /> </div>[/code:d08sa8ca] Test.rc [code=text:d08sa8ca]<div class="text" id="{CB}" style="font-family: monospace;"> <br />test DIALOG 68, 43, 336, 213<br />STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION "Test"<br />FONT 8, "MS Sans Serif"<br />{<br /> CONTROL "", 10, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, 5, 6, 325, 175<br /> DEFPUSHBUTTON "OK", 1, 143, 191, 50, 14<br />}<br /> </div>[/code:d08sa8ca]
templates / plantillas
A window and a non modal dialog: [code=fw:mmz0fukj]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <br />   <span style="color: #00C800;">local</span> oWnd<br /> <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"A window"</span><br /> <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BuildNonModal<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;">function</span> BuildNonModal<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <br />   <span style="color: #00C800;">local</span> oDlg<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"A non modal dialog"</span><br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">CENTERED</span><br />   <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span>   <br /> </div>[/code:mmz0fukj]
templates / plantillas
Creating a XBrowse from source code: [code=fw:1lb481rr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XBrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oBrw, oCol<br /><br />&nbsp; &nbsp;USE Customer<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />&nbsp; &nbsp;<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 <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Customer"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oCol = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || Customer->First <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"First"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<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 />&nbsp;</div>[/code:1lb481rr]
templates / plantillas
Building a C function from a PRG: [code=fw:2tdba1t6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;MsgInfo<span style="color: #000000;">&#40;</span> Test<span style="color: #000000;">&#40;</span> <span style="color: #000000;">123</span> <span style="color: #000000;">&#41;</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: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> TEST <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> hb_parnl<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 /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:2tdba1t6]
templates / plantillas
MDI window with MDICHILD window with a buttonbar: [code=fw:16g7n6cd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /><br /><span style="color: #00C800;">static</span> oWnd<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">MDI</span> ; <br />      <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />   <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;">function</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />   <span style="color: #00C800;">local</span> oMenu <br />    <br />   <span style="color: #0000ff;">MENU</span> oMenu <br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span> <br />      <span style="color: #0000ff;">MENU</span> <br />         <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Child"</span> <span style="color: #0000ff;">ACTION</span> CreateChild<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #0000ff;">SEPARATOR</span><br />         <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Exit"</span> <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><br />      <span style="color: #0000ff;">ENDMENU</span>    <br />      oMenu:<span style="color: #000000;">AddMdi</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   <span style="color: #0000ff;">ENDMENU</span> <br />    <br /><span style="color: #00C800;">return</span> oMenu    <br /><br /><span style="color: #00C800;">function</span> CreateChild<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oWnd, oBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Child"</span> <span style="color: #0000ff;">VSCROLL</span><br />   <br />   <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;">50</span>, <span style="color: #000000;">50</span> <span style="color: #000000;">2007</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">ACTION</span> MsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />     <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">UP</span>   oWnd:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"up"</span> <span style="color: #000000;">&#41;</span> ;<br />     <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">DOWN</span> oWnd:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"down"</span> <span style="color: #000000;">&#41;</span> <br />    <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span>          <br /> </div>[/code:16g7n6cd]
templates / plantillas
A dialog with a timer: [code=fw:lm6s0fke]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />   <span style="color: #00C800;">local</span> oDlg<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BuildTimer<span style="color: #000000;">&#40;</span> oDlg <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;">function</span> BuildTimer<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oTmr<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">TIMER</span> oTmr <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">INTERVAL</span> <span style="color: #000000;">10000</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oTmr <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:lm6s0fke]
templates / plantillas
Accessing "high level" (PRG code) from "low level" (C code): [code=fw:va9thwf0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;MsgInfo<span style="color: #000000;">&#40;</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</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;">function</span> Another<span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;MsgInfo<span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"returned from high level"</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbvm.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> TEST <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// We build the virtual machine stack frame</span><br /><br />&nbsp; &nbsp;hb_vmPushSymbol<span style="color: #000000;">&#40;</span> hb_dynsymGetSymbol<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ANOTHER"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// we push the symbol of the function to call</span><br />&nbsp; &nbsp;hb_vmPushNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// we push nil for a function, a codeblock for Eval, an object for a method</span><br />&nbsp; &nbsp;hb_vmPushString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"High level access from low level"</span>, <span style="color: #0000ff;">strlen</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"High level access from low level"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_vmFunction<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// 1 --> number of supplied parameters</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #B900B9;">// the returned value can be accessed using hb_stackReturnItem() --> PHB_ITEM</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// or simply calling hb_par...( -1 );</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:va9thwf0]
templates / plantillas
Sending a message to an object from low level: [code=fw:2z1p67tv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbclass.ch"</span> <br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMyObject := TMyClass<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <br />&nbsp; &nbsp;Test<span style="color: #000000;">&#40;</span> oMyObject <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;">CLASS</span> TMyClass <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> cMsg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> MsgInfo<span style="color: #000000;">&#40;</span> cMsg <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <br /><span style="color: #00C800;">ENDCLASS</span> &nbsp; &nbsp;<br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP <br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h> <br /><span style="color: #00D7D7;">#include</span> <hbvm.h> <br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> TEST <span style="color: #000000;">&#41;</span> <br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp;<span style="color: #B900B9;">// We build the virtual machine stack frame </span><br /><br />&nbsp; &nbsp;hb_vmPushSymbol<span style="color: #000000;">&#40;</span> hb_dynsymGetSymbol<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SAY"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// we push the symbol of the method </span><br />&nbsp; &nbsp;hb_vmPush<span style="color: #000000;">&#40;</span> hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, HB_IT_OBJECT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// we push the object </span><br />&nbsp; &nbsp;hb_vmPushString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Calling a method from low level"</span>, <span style="color: #0000ff;">strlen</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Calling a method from low level"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>; <br />&nbsp; &nbsp;hb_vmFunction<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// 1 --> number of supplied parameters </span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #B900B9;">// the returned value can be accessed using hb_stackReturnItem() --> PHB_ITEM </span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// or simply calling hb_par...( -1 ); </span><br /><span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP <br />&nbsp;</div>[/code:2z1p67tv]
templates / plantillas
Browsing an array with xbrowse: [code=fw:3udizsmt]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, aValues := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"one"</span>, <span style="color: #ff0000;">"two"</span>, <span style="color: #ff0000;">"three"</span> <span style="color: #000000;">&#125;</span>, nAt := <span style="color: #000000;">3</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<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> oDlg ARRAY aValues <span style="color: #B900B9;">// AUTOSORT</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">oClient</span> = oBrw &nbsp; <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nArrayAt</span> := nAt, oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Values"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">100</span>, oDlg:<span style="color: #000000;">ReSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br />&nbsp;</div>[/code:3udizsmt]
templates / plantillas
[quote="Antonio Linares":1l37v1fe]A folder and two xbrowses: test.prg [code:1l37v1fe] #include "FiveWin&#46;ch" #include "XBrowse&#46;ch" function Main&#40;&#41; local oDlg, oFld, oBrw1, oBrw2 USE Customer DEFINE DIALOG oDlg RESOURCE "Test" REDEFINE FOLDER oFld ; PROMPTS "One", "Two" ; DIALOGS "One", "Two" ; ID 100 OF oDlg REDEFINE XBROWSE oBrw1 ID 10 OF oFld&#58;aDialogs&#91; 1 &#93; REDEFINE XBROWSE oBrw2 ID 10 OF oFld&#58;aDialogs&#91; 2 &#93; ACTIVATE DIALOG oDlg CENTERED return nil [/code:1l37v1fe] Test.rc [code:1l37v1fe] #ifdef __FLAT__ 1 24 "WindowsXP&#46;Manifest" #endif test DIALOG 17, 36, 185, 147 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Test" FONT 8, "MS Sans Serif" &#123; CONTROL "", 100, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 6, 175, 117 DEFPUSHBUTTON "OK", 1, 67, 128, 50, 14 &#125; one DIALOG 6, 15, 175, 117 STYLE WS_CHILD | WS_VISIBLE FONT 8, "MS Sans Serif" &#123; CONTROL "", 10, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL, 4, 4, 168, 110 &#125; two DIALOG 6, 15, 175, 117 STYLE WS_CHILD | WS_VISIBLE FONT 8, "MS Sans Serif" &#123; CONTROL "", 10, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL, 4, 4, 168, 110 &#125; [/code:1l37v1fe][/quote:1l37v1fe]Antonio, hace dias con un colega tratamos de hacer 2 xbrowse en un Dlg o Fld desde SOURCE, pero de verdad hicimos de todo y no pudimos, tratamos on oTop, y demas parametro, seria mucho pedir un pequeño ejemplo para futura oportunidad, el termino haciendolo con recurso, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
templates / plantillas
Jose Luis, [code=fw:i6rqvvql]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XBrowse.ch"</span> <br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw1, oCol, oBrw2 <br /><br />&nbsp; &nbsp;USE Customer<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Two xbrowses"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">410</span>, <span style="color: #000000;">200</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Customer"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;oCol = oBrw1:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || Customer->First <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"First"</span> <br />&nbsp; &nbsp; <br />&nbsp; &nbsp;oBrw1:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;USE Test <span style="color: #00C800;">NEW</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">XBROWSE</span> oBrw2 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;oCol = oBrw2:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || Test-><span style="color: #000000;">&#40;</span> FieldGet<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"First"</span> <br />&nbsp; &nbsp; <br />&nbsp; &nbsp;oBrw2:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br />&nbsp;</div>[/code:i6rqvvql] [url=http&#58;//imageshack&#46;us:i6rqvvql][img:i6rqvvql]http&#58;//img56&#46;imageshack&#46;us/img56/1666/xbrowsesym4&#46;png[/img:i6rqvvql][/url:i6rqvvql]
templates / plantillas
A folder with a radio button menu, on a dialog: test.prg [code=fw:i689cwy7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br />&nbsp;<br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFld, nOption := <span style="color: #000000;">1</span>, oRadMenu <br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span> <br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span> ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span> ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg <br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">RADIO</span> oRadMenu <span style="color: #0000ff;">VAR</span> nOption <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span>, <span style="color: #000000;">120</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br />&nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:i689cwy7] test.rc [code=fw:i689cwy7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifdef __FLAT__ <br />&nbsp; &nbsp;<span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WindowsXP.Manifest"</span> <br />#endif <br />&nbsp;<br />test <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">17</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">185</span>, <span style="color: #000000;">147</span> <br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU <br />CAPTION <span style="color: #ff0000;">"Test"</span> <br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span> <br /><span style="color: #000000;">&#123;</span> <br />&nbsp;CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">100</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">5</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">117</span> <br />&nbsp;DEFPUSHBUTTON <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">67</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">14</span> <br /><span style="color: #000000;">&#125;</span> <br />&nbsp;<br />one <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">117</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp;CONTROL <span style="color: #ff0000;">"&One"</span>, <span style="color: #000000;">110</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, <span style="color: #000000;">10</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span><br />&nbsp;CONTROL <span style="color: #ff0000;">"&Two"</span>, <span style="color: #000000;">120</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, <span style="color: #000000;">10</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span><br />&nbsp;CONTROL <span style="color: #ff0000;">"T&hree"</span>, <span style="color: #000000;">130</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, <span style="color: #000000;">10</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp;<br />two <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">117</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:i689cwy7]
templates / plantillas
Template of a class to create a user defined control: MyControl.prg [code=fw:5l4fns3h]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">CLASS</span> TMyControl <span style="color: #0000ff;">FROM</span> TControl<br /><br />   CLASSDATA lRegistered AS LOGICAL<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTop, nLeft, oWnd, nPos, nClrFore,;<br />               nClrBack, lPixel, lDesign, nWidth, nHeight,;<br />               cMsg, lVertical <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, oWnd <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTop, nLeft, oWnd, nPos, nClrFore, nClrBack, lPixel,;<br />            lDesign, nWidth, nHeight, cMsg, lVertical <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TMyControl<br /><br />   <span style="color: #00C800;">DEFAULT</span> nTop     := <span style="color: #000000;">0</span>, nLeft := <span style="color: #000000;">0</span>,;<br />           oWnd     := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />           nClrFore := oWnd:<span style="color: #000000;">nClrText</span>,;<br />           nClrBack := GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNFACE <span style="color: #000000;">&#41;</span>,;<br />           lPixel   := .f.,;<br />           lDesign  := .f.,;<br />           nWidth   := <span style="color: #000000;">200</span>, nHeight := <span style="color: #000000;">21</span>,;<br />           lVertical := .f.<br /><br />   ::<span style="color: #000000;">nStyle</span>    = nOR<span style="color: #000000;">&#40;</span> WS_CHILD, WS_VISIBLE, WS_TABSTOP <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nId</span>       = ::<span style="color: #000000;">GetNewId</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">oWnd</span>      = oWnd<br />   ::<span style="color: #000000;">cMsg</span>      = cMsg<br />   ::<span style="color: #000000;">nTop</span>      = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lPixel, nTop, nTop * SAY_CHARPIX_H <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nLeft</span>     = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lPixel, nLeft, nLeft * SAY_CHARPIX_W <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nBottom</span>   = ::<span style="color: #000000;">nTop</span> + nHeight - <span style="color: #000000;">1</span><br />   ::<span style="color: #000000;">nRight</span>    = ::<span style="color: #000000;">nLeft</span> + nWidth - <span style="color: #000000;">1</span><br />   ::<span style="color: #000000;">lDrag</span>     = lDesign<br />   ::<span style="color: #000000;">lCaptured</span> = .f.<br />   ::<span style="color: #000000;">nClrText</span>  = nClrFore<br />   ::<span style="color: #000000;">nClrPane</span>  = nClrBack<br /><br />   ::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">Create</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oWnd:<span style="color: #000000;">AddControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      oWnd:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> lDesign<br />      ::<span style="color: #000000;">CheckDots</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, oWnd <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TMyControl<br /><br />   <span style="color: #00C800;">DEFAULT</span> oWnd := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   ::<span style="color: #000000;">nId</span>  = nId<br />   ::<span style="color: #000000;">oWnd</span> = oWnd<br /><br />   ::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oWnd:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:5l4fns3h]
templates / plantillas
A dialog box from source code with a folder and several GETs and SAYs: [code=fw:yfl5jr0s]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br />&nbsp;<br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFld <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cVar1 := <span style="color: #ff0000;">"First GET &nbsp; "</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cVar2 := <span style="color: #ff0000;">"Second GET &nbsp;"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cVar3 := <span style="color: #ff0000;">"Tercer GET &nbsp;"</span> &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">290</span><br />&nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">0.5</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">FOLDER</span> oFld <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">188</span>, <span style="color: #000000;">115</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Say1"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cVar1 <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Say2"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cVar2 <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Say3"</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> cVar3 <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">7</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">7</span>, <span style="color: #000000;">17</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br />&nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:yfl5jr0s]
templates / plantillas
Evaluate a codeblock from C code with no parameters: [code=fw:3m6nzmwz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;PHB_ITEM pBlock = hb_param<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> HB_IS_BLOCK<span style="color: #000000;">&#40;</span> pBlock <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; hb_evalBlock0<span style="color: #000000;">&#40;</span> pBlock <span style="color: #000000;">&#41;</span>; &nbsp; <br />&nbsp;</div>[/code:3m6nzmwz]
templates / plantillas
Showing a database record with a xbrowse: [code=fw:wrdjb41s]<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 /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oCol, aRecord, nAt := <span style="color: #000000;">1</span><br />   <br />   USE Customer<br />   <br />   aRecord = Array<span style="color: #000000;">&#40;</span> Customer-><span style="color: #000000;">&#40;</span> FCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span><br /><br />   @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ARRAY aRecord <span style="color: #B900B9;">// AUTOSORT</span><br /><br />   oCol = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || Customer-><span style="color: #000000;">&#40;</span> FieldName<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />   oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"FieldName"</span>   <br /><br />   oCol = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />   oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || Customer-><span style="color: #000000;">&#40;</span> FieldGet<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />   oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Value"</span>   <br /><br />   oBrw:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROW<br /><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">bKeyCount</span> = <span style="color: #000000;">&#123;</span> || Customer-><span style="color: #000000;">&#40;</span> FCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <br />   oDlg:<span style="color: #000000;">oClient</span> = oBrw   <br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">Resize</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 /> </div>[/code:wrdjb41s] [img:wrdjb41s]http&#58;//img39&#46;imageshack&#46;us/img39/3834/70372365&#46;png[/img:wrdjb41s]
templates / plantillas
Nested folders from resources: test.prg [code=fw:436buc1m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /> <br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <br />   <span style="color: #00C800;">local</span> oDlg, oFld1, oFld2<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span><br /> <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld1 ;<br />      <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"three"</span> ;<br />      <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"Another"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> ;<br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld2 ;<br />      <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"three"</span> ;<br />      <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> ;<br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span> <span style="color: #0000ff;">OF</span> oFld1:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:436buc1m] test.rc [code=fw:436buc1m]<div class="fw" id="{CB}" style="font-family: monospace;">#ifdef __FLAT__<br />   <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WindowsXP.Manifest"</span> <br />#endif<br /> <br />test <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">17</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">185</span>, <span style="color: #000000;">200</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">100</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">5</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">170</span><br /> DEFPUSHBUTTON <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">67</span>, <span style="color: #000000;">180</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">14</span><br /><span style="color: #000000;">&#125;</span><br /><br />another <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">117</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">200</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">5</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">162</span>, <span style="color: #000000;">140</span><br /><span style="color: #000000;">&#125;</span><br /> <br />one <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">117</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />   PUSHBUTTON <span style="color: #ff0000;">"Test"</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">148</span>, <span style="color: #000000;">115</span><br /><span style="color: #000000;">&#125;</span><br /> <br />two <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">117</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br /><span style="color: #000000;">&#125;</span><br /> <br />three <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">175</span>, <span style="color: #000000;">117</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:436buc1m] [img:436buc1m]http&#58;//img52&#46;imageshack&#46;us/img52/4959/34859289&#46;png[/img:436buc1m] <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=100720#p100720">viewtopic.php?p=100720#p100720</a><!-- l -->
templates / plantillas
Antonio, Por error, he descubierto un método para crear diálogo y GEts y se pone fácil como en el viejo clipper dos [code=fw:2pf3mn8z]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">Function</span> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oDlg<br /><span style="color: #00C800;">Local</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">Local</span> cNomeUtente:=space<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>,;<br />        cPassword :=space<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>  ,;<br />        nTipoAccesso:=space<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">Local</span> nBottom   := <span style="color: #000000;">22</span><br />   <span style="color: #00C800;">Local</span> nRight    := <span style="color: #000000;">62</span><br />   <span style="color: #00C800;">Local</span> nWidth :=  <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Local</span> nHeight := nBottom * DLG_CHARPIX_H<br />   <span style="color: #00C800;">Local</span> nRowPix:=<span style="color: #000000;">13</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg        ;<br />   <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"test"</span>   ;<br />   <span style="color: #0000ff;">SIZE</span> nWidth, nHeight   <span style="color: #0000ff;">PIXEL</span><br /><br />   @ <span style="color: #000000;">1</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Nome      :"</span>      <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">2</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Cognome   :"</span>      <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">3</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Indirizzo : "</span>     <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">4</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Città     :"</span>      <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">5</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Provincia :"</span>      <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">6</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Cap       : "</span>     <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">7</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Telefono  :"</span>      <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">8</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Fax       :"</span>      <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br />   @ <span style="color: #000000;">9</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">8</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Cellulare : "</span>     <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">color</span> CLR_BLACK,CLR_WHITE <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">pixel</span>  TRANSPARENT<br /><br /><br />  @ <span style="color: #000000;">1</span>*nRowPix,<span style="color: #000000;">8</span>*<span style="color: #000000;">9</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cNomeUtente  <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">pixel</span><br />  @ <span style="color: #000000;">2</span>*nRowPix,<span style="color: #000000;">8</span>*<span style="color: #000000;">9</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cPassword    <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">pixel</span><br />  @ <span style="color: #000000;">3</span>*nRowPix,<span style="color: #000000;">8</span>*<span style="color: #000000;">9</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nTipoAccesso <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">update</span> <span style="color: #0000ff;">pixel</span><br /><br />     @ <span style="color: #000000;">11</span>*nRowPix,<span style="color: #000000;">02</span>*<span style="color: #000000;">60</span>  <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">" &ok"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">center</span><br /><br /><span style="color: #00C800;">RETURN</span>  <span style="color: #00C800;">NIL</span></div>[/code:2pf3mn8z] multiplicando cada línea con 13 para x y 8 para y
temporay index
Hello, I create a temporary index on a dbf that already has been opened with other indexes. But I want to restore the original state but I can´t. How do I close temporary index and go back to original indexes?. Thank you,
temporay index
Can you open/use dbf again?
temporay index
If you use DBFCDX with OrdSetFocus( original cTag) Maurizio
temporay index
When you create the temp. index , add ADDITIVE Frank
temporay index
Thank you. I missed Additive. Also, how many times could I create new indexes with additive clause? Thanks.
temporay index
Consider this code using an .idx on an open table ( may have to be opened exclusively ) if you really just want this index to be temporary .. say for a report .. then when you are done .. close the table ( or close the index ) and delete the .idx.. This will eliminate the need to add another tag to an existing .CDX. Rick Lipkin [code=fw:22x4ckaq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// create a name for the index in a temp folder</span><br /><br /><span style="color: #B900B9;">// get application default .. assumes that</span><br /><span style="color: #B900B9;">// SET DEFA to    was defined in the program startup</span><br /><br />cDEFA := SET<span style="color: #000000;">&#40;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#41;</span>  <br /><br /><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br />   SITEiDX := <span style="color: #ff0000;">"TEMP"</span>+<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>TIME<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">7</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>+<span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>TIME<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">4</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">".IDX"</span><br />   <span style="color: #00C800;">IF</span> .not. FILE<span style="color: #000000;">&#40;</span> cDEFA+<span style="color: #ff0000;">"<span style="color: #000000;">\D</span>BTMP<span style="color: #000000;">\"</span>+SITEiDX )<br />      EXIT<br />   ENDIF<br />ENDDO<br /><br />// open table shared<br />// should work without opening table exclusively<br /><br />SELECT 4<br />IF NETUSE( cDEFA+"</span>\Table.dbf<span style="color: #ff0000;">", .F.,5)<br />    SET ORDER to TAG Whatever<br />ELSE<br />   CLOSE DATABASES<br />    FERASE( cDEFA+"</span>\DBTMP\<span style="color: #ff0000;">"+SITEiDX)<br />   oDlg:END()<br />   RETURN(.F.)<br />ENDIF<br /><br />SELECT 4<br />INDEX on YourField to ( cDEFA+"</span>\DBTMP\<span style="color: #ff0000;">"+SITEiDX )<br />SET INDEX to ( cDEFA+"</span>\DBTMP\<span style="color: #ff0000;">"+SITEiDX )<br /><br />// .. do what you need<br /><br />CLOSE 4<br />FERASE( cDEFA+"</span>\DBTMP\<span style="color: #ff0000;">"+SITEiDX)<br /><br />// if you need to keep the table open you can<br />// attempt to close the index<br />//<br />// SELECT 4<br />// CLOSE( cDEFA+"</span>\DBTMP\<span style="color: #ff0000;">"+SITEiDX)<br />// FERASE( cDEFA+"</span>\DBTMP\<span style="color: #ff0000;">"+SITEiDX)  <br />//<br />// SELECT 4<br />// SET ORDER to TAG Whatever<br />// .. continue on with your code<br /><br />oDlg:END()<br />RETURN(.T.)<br /><br /></span></div>[/code:22x4ckaq]
temporay index
I know xHarbour has the "temporary" clause on the "index on" command. It manages the temporary index automatically. It is created on the local computer and deleted after the dbf is closed. Here is some documentation on the index clauses you might be interested in. I don't know if all of these are implemented in Harbour. [list:3xhlwa2j]USECURRENT - The option instructs the database driver to use the current logical order of records for navigating the database during index creation. The logical order is determined by the controlling index and the SET SCOPE restriction. When the USECURRENT clause is omitted, the records in the current work area are evaluated in physical order. ADDITIVE - The option makes sure that index files remain open during index creation. If not specified, all files but <cIndexFile> are closed prior to indexing. TEMPORARY - If this option is specified, a temporary index is created which is automatically destroyed when the index is closed. The temporary index may be created in memory only or in a temporary file. This lies in the responsibility of the RDD used for index creation. USEFILTER - This option instructs the RDD to recognize a filter condition active in the current work area that is set with SET FILTER or SET DELETED. In this case, filtered records are not included in the index. [/list:u:3xhlwa2j]
temporay index
Thank you. I finally use: close( cIndex ) ferase( cIndex ) set order to 1 It is working perfect with additive clause. But why index are faster than set filter?. Why set filter is not optimized?. Thank you.