topic
stringlengths
1
63
text
stringlengths
1
577k
BUTTONBMP Transparente
Hola: ¿Se pueden hacer BUTTONBMP transparentes?. Muchas gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
BUTTONBMP Transparente
No es posible pues la clase TButtonBmp está basada en la clase button propia de Windows que no permite pintarse transparente. Puedes usar la Clase TBtnBmp de FiveWin. Tienes un ejemplo en FWH\samples\TestBtnB.prg Tambien puedes usar la nueva Clase TRBtn usada en la nueva RibbonBar de FWH. En FWH\samples\ribbon.prg pulsando el botón "Paste" puedes ver una demo de las posibilidades de esta nueva clase de botón: [img:3obq3eyd]http&#58;//img22&#46;imageshack&#46;us/img22/8487/controlso&#46;jpg[/img:3obq3eyd]
BUTTONBMP Transparente
[url=http&#58;//img198&#46;imageshack&#46;us/i/botontransparente&#46;jpg/:1agqib8i][img:1agqib8i]http&#58;//img198&#46;imageshack&#46;us/img198/3455/botontransparente&#46;th&#46;jpg[/img:1agqib8i][/url:1agqib8i] Pequeño ejemplo con BTNBMP, intente ponerlo asi como las de A.L. en grande pero no conseguir como... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> REDEFINE BTNBMP oBtn ID 300 OF oDlg UPDATE; // PRUEBA BOTON TRANSPARENTE TRANSPARENT NOBORDER; FILENAME "rojolen.bmp"; ACTION ( msginfo("Boton Rojo Largo...") )
BUTTONBMP Varios Click
Amigo tengo un Problema con la Clase ButtonBmp a veces el boton le tengo que presionar varios click para q se ejecute.
BUTTONBMP duda
Saludos a todos,Alguien sabría como colgarle un menupopup sin que en el boton creado salga la flechita?bueno, he colgado el menu popup pero, sale la flechita, lo cual no se me hace muy estético.una imagen dice mas que mil palabras:[img:31odwj60]http&#58;//img149&#46;imageshack&#46;us/img149/1470/envioshk0&#46;th&#46;jpg[/img:31odwj60]este es el código:[code:31odwj60] @ 200, 455 BTNBMP oBtn&#91;6&#93; PROMPT "Terminar Sistema" ; SIZE 150,70 ; ACTION this&#58;execute&#40; 7,&#123;|| this&#58;lSalir &#58;= &#46;t&#46;, this&#58;oWnd&#58;End&#40;&#41;&#125; &#41; ; OF &#58;&#58;oWnd ; NOBORDER TOP FONT &#58;&#58;oFont&#58;BUTTON ; MESSAGE "CTRL-X &#58;&#58; Terminar aplicación" ; FILE "parada&#46;bmp" oBtn&#91;6&#93;&#58;bRClicked &#58;= &#123;|nRow,nCol| &#58;&#58;menuPopup&#40; nRow, nCol, oBtn&#91;6&#93; &#41;&#125; [/code:31odwj60]cualquier comentario será bienvenido.
BUTTONBMP duda
William,Una solucion rapida es que declares esta funcion en tu PRG principal:function PolyPolygon() ; return nilen el caso de que no uses esa funcion desde otra parte de tu aplicacion.
BUTTONBMP duda
Antonio,no fue la solución, pues sigue moviendo la imagen del boton y apareciendo la separación donde iria la flechita, aunque la flechita no aparece.La idea es que no aparezca ni la separación ni la flechita, ni mueva la imagen del boton, sino que solamente aparezca el popup.espero haberme explicado.saludos
BUTTONBMP duda
[quote="wmormar":2azqzq88]La idea es que no aparezca ni la separación ni la flechita, ni mueva la imagen del boton, sino que solamente aparezca el popup.[/quote:2azqzq88]Hola William:Prueba con: oBtn[ 6 ]:oPopup := NilUn abrazo.Manuel Mercado.
BUTTONBMP duda
Manuel,sorry, no funcionó.sigo esperando comentariosgracias por adelantado
BUTTONBMP el bmp sale encima del texto
Hola foro, compile el TextBuBm.prg pero solo viene el bitmap con el botón. Bien,,, pues ya tiene texto. He logrado hacer lo siguiente REDEFINE BUTTONBMP oBtn ID 702 OF oDlg ; BITMAP "Acerca.BMP" ; Pero el Bitmap aparece encima del texto... ¿Cómo le hago para que el bitmap apareca a la izquierda?? Saludos
BUTTONBMP el bmp sale encima del texto
En el método Paint() de la Clase TButtonBmp hay este código: if ! Empty( ::hBitmap ) nTop = ( ::nHeight() / 2 ) - ( nBmpHeight( ::hBitmap ) / 2 ) nLeft = ( ::nWidth() / 2 ) - ( nBmpWidth( ::hBitmap ) / 2 ) if ::lActive DrawMasked( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),; nLeft + If( lPressed, 1, 0 ) ) else DrawGray( ::hDC, ::hBitmap, nTop + If( lPressed, 1, 0 ),; nLeft + If( lPressed, 1, 0 ) ) endif endif Sólo tienes que modificar nLeft para que se situe más a la izquierda.
BUTTONBMP el bmp sale encima del texto
Gracias Antonio
BUTTONBMP no es completamente compatible con clausula WHEN
Si se usa el boton BUTTONBMP juno con la clausula WHEN, la imagen no se despliega en caso de que esta se cumpla. Todo funciona bine si no se usa esta condicion o si la condicion no se cumple. Version 13.05 FivewinH 32 bits REDEFINE BUTTONBMP ID 500 OF oFld:aDialogs[1] ; //procesa alta ACTION aux_llama(oDbf:numero,archivos,cImagenes) BITMAP ".\imagenes\alta.bmp" WHEN lAltas //solo si es alta Una disculpa por los acentos. Uso un teclado extranjero.
BUTTONBMP no es completamente compatible con clausula WHEN
Actualización: Aunque parezca paradójico, no sucede con Windows 8, 7 ni Vista. Sólo con Windows XP. Lo que lo hace aún más extraño.
BUTTONBMP no es completamente compatible con clausula WHEN
Pudiera ser la resolución del bitmap que sea superior a la que soporta tu XP ? Has probado con otros bitmaps ?
BUTTONBMP no es completamente compatible con clausula WHEN
Cuando WHEN es .F., el control se deshabilita y Windows dibuja el bitmap con colores cambiados, tal vez por la resolución no consiga hacer este efecto
BUTTONBMP no es completamente compatible con clausula WHEN
No era nada de eso, bueno no del todo. El pintado del bitmap lo hace FWH (no lo pensé antes de responder) y cuando el botón está deshabilitado se llama a la función DrawGray() y esta es la que no esta funcionando correctamente en XP. Puede tratarse por la resolución que tengas en XP, prueba a aumentarla (me refiero al numero de colores que usa), voy a revisar la función DrawGray() por si pudiese tener algún fallo, gracias
BUTTONBMP no es completamente compatible con clausula WHEN
Por el código de DrawGray() me reitero en la idea de que es la resolución de colores de XP. Puedes comprobarla y decirmela ? gracias
BUTTONBMP no es completamente compatible con clausula WHEN
Pues efectivamente tiene que ver en un juego entre la resolucion, el numero de colores y el tamano de la imagen. En algunos sistemas y pantallas funciona a la perfeccion mientras que en otros depende de si esta habilitada o no. (se trata de una imagen de 48x48 pixeles en una profundidad de campo de 8 bits que he disminuido a 32 x 32 pixeles)
BUTTONBMP no es completamente compatible con clausula WHEN
Finalmente quedo en una imágen de 38x38 bits 256 colores y el asunto parece arreglado. Gracias
BUTTONBMP no es completamente compatible con clausula WHEN
muy bien <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BUTTONBMP transparency
I'm using REDEFINE BUTTONBMP BITMAP "HROK" ..... to place an alpha bitmap on a dialog. When it first displays, it shows a black background in the area which is supposed to be transparent. If I mouseover the button, it then changes to a transparent background. I would also like to have NOBORDER on the button, but that did not work. Any ideas ?
BUTTONBMP transparency
Hello Tim, All possible Settings : There is a transparent-problem, using a Dialog-[color=#FF0000:h27wmeiw]Image-Background [/color:h27wmeiw]( doesn't work ). Gradient, Color and Brush is OK. [img:h27wmeiw]http&#58;//www&#46;pflegeplus&#46;com/pictures/BButton1&#46;jpg[/img:h27wmeiw] [code=fw:h27wmeiw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//------------------- RESOURCE - TEST -----------------------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> D_RESOUR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oBtn1, oBtn2, oBtn3<br /><span style="color: #00C800;">local</span> oBtn4, oBtn5, oBtn6<br /><span style="color: #00C800;">local</span> oBtn7, oBtn8, oBtn9<br /><span style="color: #00C800;">local</span> oBtn10, oBtn11, oBtn12, oBtn13, oSay3, oBMP2<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oCursorHand HAND<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg2 <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DIALOG1"</span> <span style="color: #0000ff;">FONT</span> oDlgFont ;<br />TRANSPARENT <br /><br /><span style="color: #B900B9;">// Color</span><br /><span style="color: #B900B9;">// -------</span><br /><span style="color: #00C800;">IF</span> nSTYLE = <span style="color: #000000;">1</span><br />   D_COLOR<span style="color: #000000;">&#40;</span> oDlg2 <span style="color: #000000;">&#41;</span>   <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #B900B9;">// Style-Brush ( bricks, Borland ... )</span><br /><span style="color: #B900B9;">// ---------------------------------------</span><br /><span style="color: #00C800;">IF</span> nSTYLE = <span style="color: #000000;">3</span><br />   D_BRUSH1<span style="color: #000000;">&#40;</span> oDlg2 <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #B900B9;">// ImageBrush</span><br /><span style="color: #B900B9;">// ----------------</span><br /><span style="color: #00C800;">IF</span> nSTYLE = <span style="color: #000000;">4</span><br />   DB_IMAGE<span style="color: #000000;">&#40;</span> oDlg2 <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #B900B9;">// -----  Transparent NOBORDER ---------</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg2 ;<br />NOBORDER ;<br />FILENAME c_path + <span style="color: #ff0000;">"<span style="color: #000000;">\p</span>roject<span style="color: #000000;">\"</span> + D_BUTTON1 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">1</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.1</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />RIGHT<br />oBtn1:lTransparent := .T.   <br />oBtn1:cTooltip := "</span>Button1<span style="color: #ff0000;">"<br />oBtn1:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn2 ID 110 OF oDlg2 ;<br />NOBORDER ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON2 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">2</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.2</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />LEFT<br />oBtn2:lTransparent := .T.<br />oBtn2:cTooltip := "</span>Button2<span style="color: #ff0000;">"<br />oBtn2:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn3 ID 120 OF oDlg2 ;<br />NOBORDER ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON3 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">3</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.3</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />TOP<br />oBtn3:lTransparent := .T.<br />oBtn3:cTooltip := "</span>Button3<span style="color: #ff0000;">"<br />oBtn3:SetColor( D_TCOLOR, )<br /><br />// -----  Transparent BORDER ---------<br /><br />REDEFINE BTNBMP oBtn4 ID 130 OF oDlg2 ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON1 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">4</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.4</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />BOTTOM<br />oBtn4:lTransparent := .T.   <br />oBtn4:cTooltip := "</span>Button4<span style="color: #ff0000;">"<br />oBtn4:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn5 ID 140 OF oDlg2 ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON2 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">5</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span><span style="color: #0000ff;">Centered</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />CENTER<br />oBtn5:lTransparent := .T.   <br />oBtn5:cTooltip := "</span>Button5<span style="color: #ff0000;">"<br />oBtn5:SetColor( 7138036, )<br />oBtn5:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn6 ID 150 OF oDlg2 ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON3 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">6</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span> <span style="color: #ff0000;">" <br />oBtn6:lTransparent := .T.   <br />oBtn6:cTooltip := "</span>Button6<span style="color: #ff0000;">"<br />oBtn6:SetColor( D_TCOLOR, )<br /><br />// -----  Style 2007 Transparent NOBORDER --------<br /><br />REDEFINE BTNBMP oBtn7 ID 200 OF oDlg2 2007 ;<br />NOBORDER ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON1 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">1</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.1</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />RIGHT<br />oBtn7:cTooltip := "</span>Button1<span style="color: #ff0000;">"<br />oBtn7:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn8 ID 210 OF oDlg2 2007 ;<br />NOBORDER ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON2 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">2</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.2</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />LEFT<br />oBtn8:cTooltip := "</span>Button2<span style="color: #ff0000;">"<br />oBtn8:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn9 ID 220 OF oDlg2 2007 ;<br />NOBORDER ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON3 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">3</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.3</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />TOP<br />oBtn9:cTooltip := "</span>Button3<span style="color: #ff0000;">"<br />oBtn9:SetColor( D_TCOLOR, )<br /><br />// -----  Style 2007 Transparent BORDER --------<br /><br />REDEFINE BTNBMP oBtn10 ID 230 OF oDlg2 2007 ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON1 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">4</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.4</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />BOTTOM<br />oBtn10:cTooltip := "</span>Button4<span style="color: #ff0000;">"<br />oBtn10:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn11 ID 240 OF oDlg2 2007 ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON2 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">5</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span><span style="color: #0000ff;">Centered</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />CENTER<br />oBtn11:cTooltip := "</span>Button5<span style="color: #ff0000;">"<br />oBtn11:SetColor( 7138036, )<br />oBtn11:SetColor( D_TCOLOR, )<br /><br />REDEFINE BTNBMP oBtn12 ID 250 OF oDlg2 2007 ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON3 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">6</span><span style="color: #ff0000;">" ) <br />oBtn12:cTooltip := "</span>Button6<span style="color: #ff0000;">"<br /><br />// --------------<br />      <br />REDEFINE BTNBMP oBtn13 ID 300 OF oDlg2 2007 ;<br />FILENAME c_path + "</span>\system\stop.bmp<span style="color: #ff0000;">" ;<br />PROMPT "</span>Close<span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />ACTION ( lOPEN[3] := .F., oDlg2:End() )<br />oBtn13:lTransparent := .T.   <br />oBtn13:cTooltip := "</span>Close<span style="color: #ff0000;">"<br /><br />REDEFINE SAY oSay3  PROMPT "</span>Transparent <span style="color: #0000ff;">Text</span><span style="color: #ff0000;">" ID 260 OF oDlg2 FONT oButtFont ;<br />COLOR D_TCOLOR PIXEL  transparent adjust<br /><br />AEval( oDlg2:aControls, { | o | o:oCursor := oCursorHand } )<br /><br />// YOU can RESIZE the Buttons from Resource at Runtime !!!!<br />// D_MOVE = Gradient-Color-Position<br />// ---------------------------------------------------------------------<br /><br />ACTIVATE DIALOG oDlg2 CENTERED NOWAIT ;<br />ON INIT ( oDlg2:Move( 100, 470, oDlg2:nWidth, oDlg2:nHeight, .f. ), ;<br />            oBtn1:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn2:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn3:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn4:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn5:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn6:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn7:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn8:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn9:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn10:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn11:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), ;<br />            oBtn12:SetSize( D_BUTTONH * 2, D_BUTTONV * 2, .T. ), oDlg2:Refresh() ) ;<br />ON PAINT ( IIF( nSTYLE = 2,  ;<br />   ( D_GRADIENT( hDC, oDlg2, .T. ), ;<br />     GradBrush( oDlg2, { { D_MOVE, D_COLOR1, D_COLOR2 },;<br />     { D_MOVE, D_COLOR2, D_COLOR1 } }, .T. ) ), NIL ), ;<br />     IIF( nSTYLE = 5,   DL_IMAGE( hDC, oDlg2 ), NIL ), ;<br />          D_ALPHA( hDC, D_BUTTON1, 55, 430 ), ;<br />          D_ALPHA( hDC, D_BUTTON2, 190, 430 ), ;<br />          D_ALPHA( hDC, D_BUTTON3, 330, 430 ) )<br /><br />RETURN NIL<br /><br />// -------------- DIALOG - GRADIENT --------------------<br /><br />STATIC FUNCTION D_GRADIENT( hDC, oDlg, lDirect )<br />local aGrad := { { D_MOVE, D_COLOR1, D_COLOR2 }, ; &nbsp;<br />&nbsp; &nbsp;{ D_MOVE, D_COLOR2, D_COLOR1 } } &nbsp; &nbsp;<br /><br />IF lDirect = .T.<br />&nbsp; &nbsp;GradientFill( hDC, &nbsp;0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .T. )<br />ELSE<br />&nbsp; &nbsp;GradientFill( hDC, &nbsp;0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .F. )<br />ENDIF<br />RELEASEDC( hDC )<br /><br />RETURN NIL<br /><br />// -------------------------------<br /><br />FUNCTION GradBrush( oDlg, aColors , nDir)<br />local hDC, hBmp, hBmpOld , nWidth , nHeight, lDir<br /><br />DEFAULT lDir := .T.<br />IF nDir = 1<br />&nbsp; &nbsp;lDir := .T.<br />ELSE<br />&nbsp; &nbsp;lDir := .F.<br />ENDIF<br /><br />if Empty( oDlg:oBrush:hBitmap )<br />&nbsp; &nbsp; &nbsp; nHeight := if(lDir,oDlg:nHeight,1)<br />&nbsp; &nbsp; &nbsp; nWidth &nbsp;:= if(lDir,1,oDlg:nWidth)<br />&nbsp; &nbsp; &nbsp; hDC = CreateCompatibleDC( oDlg:GetDC() )<br />&nbsp; &nbsp; &nbsp; hBmp = CreateCompatibleBitMap( oDlg:hDC, nWidth, nHeight )<br />&nbsp; &nbsp; &nbsp; hBmpOld = SelectObject( hDC, hBmp )<br />&nbsp; &nbsp; &nbsp; GradientFill( hDC, 0, 0, nHeight, nWidth, aColors,lDir )<br />&nbsp; &nbsp; &nbsp; DeleteObject( oDlg:oBrush:hBrush )<br />&nbsp; &nbsp; &nbsp; oDlg:oBrush:hBitmap = hBmp<br />&nbsp; &nbsp; &nbsp; oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )<br />&nbsp; &nbsp; &nbsp; SelectObject( hDC, hBmpOld )<br />&nbsp; &nbsp; &nbsp; oDlg:ReleaseDC()<br />endif<br /><br />RETURN NIL<br /><br />// ------------- DIALOG - COLOR ----------------------------------<br /><br />STATIC FUNCTION D_COLOR( oDlg )<br />local oCBrush<br /><br />DEFINE BRUSH oCBrush &nbsp;COLOR D_COLOR1<br />SET BRUSH OF oDlg TO oCBrush<br />RELEASE BRUSH oCBrush<br /><br />RETURN NIL<br /><br />//----------------- DIALOG - STYLE ---------------- <br /><br />FUNCTION D_BRUSH1( oDlg ) <br />LOCAL oBrush<br /><br />DEFINE BRUSH oBrush &nbsp;STYLE "</span>BORLAND<span style="color: #ff0000;">" &nbsp; <br /><br />SET BRUSH OF oDlg TO oBrush<br />RELEASE BRUSH oBrush<br /><br />RETURN NIL<br /><br />//------------- IMAGE - BRUSH -------------------- <br /><br />FUNCTION DB_IMAGE( oDlg ) <br />LOCAL oImage<br /><br />DEFINE BRUSH oImage FILE c_path + "</span>\project\<span style="color: #ff0000;">" + D_BRUSH<br />SET BRUSH OF oDlg TO oImage<br />RELEASE BRUSH oImage<br /><br />RETURN NIL<br /><br />//------------- IMAGE - Background -------------------- <br /><br />STATIC FUNCTION DL_IMAGE( &nbsp;hDC, oDlg ) <br />LOCAL oImage1<br />LOCAL nWidth &nbsp;:= oDlg:nWidth()<br />LOCAL nHeight := oDlg:nHeight()<br /><br />DEFINE IMAGE oImage1 FILE c_path + "</span>\project\<span style="color: #ff0000;">" + D_LOGO <br />PalBmpDraw( hDC, 0, 0, oImage1:hBitmap, , nWIDTH, nHEIGHT, , .T. ) <br />oDlg:ReleaseDC()<br /><br />RETURN NIL<br /><br /><br /><br />// --------------------------------------------------------------<br />// Using different BMP's for Focus, pressed, Caption ...<br />// --------------------------------------------------------------<br />REDEFINE BTNBMP oBtn ID 300 OF oDlg ;<br />PROMPT "</span><span style="color: #0000ff;">Help</span><span style="color: #ff0000;">" ;<br />FONT oBarFont ;<br />TOP ;<br />NOBORDER ;<br />FILENAME c_path + "</span>\system\Info_A.bmp<span style="color: #ff0000;">", ;<br />                  c_path + "</span>\system\Info_P.bmp<span style="color: #ff0000;">",  ;<br />                  c_path + "</span>\system\Info_D.bmp<span style="color: #ff0000;">",  ;<br />                  c_path + "</span>\system\Info_M.bmp<span style="color: #ff0000;">" ;<br />ACTION ( D_START(), ;<br />   IIF( FILE("</span>ButtonHelp.exe<span style="color: #ff0000;">"),  Winexec("</span>ButtonHelp.exe<span style="color: #ff0000;">" ), MsgAlert("</span>Helpfile : <span style="color: #000000;">ButtonHep</span>.exe <span style="color: #ff0000;">" ;<br />        + CRLF + "</span>not found !<span style="color: #ff0000;">", "</span>ATTENTION<span style="color: #ff0000;">") ) )<br />oBtn:lTransparent := .T.<br />oBtn:cTooltip := "</span><span style="color: #000000;">2</span>. <span style="color: #0000ff;">Resource</span> Preview<span style="color: #ff0000;">"<br />oBtn:lBorder := .F. <br /><br /></span></div>[/code:h27wmeiw] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BUTTONBMP transparency
Are you saying that BTNBMP will not work properly against an image background ? Thanks for all of the examples.
BUTTONBMP transparency
Tim I tested all possible Combinations. Transparent button on Image-Background didn't work. It is the same Example from above but with Image. Maybe a Solution for the Problem ? The Result with Image-background. Option 2007 works : [img:1hy0pr4j]http&#58;//www&#46;pflegeplus&#46;com/pictures/btntrans&#46;jpg[/img:1hy0pr4j] With [color=#FF0000:1hy0pr4j]Ribbonbar[/color:1hy0pr4j], I got the same Button-problem. A Brush-background works : [img:1hy0pr4j]http&#58;//www&#46;pflegeplus&#46;com/pictures/ribbbutt1&#46;jpg[/img:1hy0pr4j] Not transparent on Image-background : [img:1hy0pr4j]http&#58;//www&#46;pflegeplus&#46;com/pictures/ribbbutt2&#46;jpg[/img:1hy0pr4j] [code=fw:1hy0pr4j]<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;">'ribbon.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'Image.ch'</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oDlg, oGrp, oBtn, oImg, hDC<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;">440</span>, <span style="color: #000000;">200</span> <span style="color: #B900B9;">// TRANSPARENT</span><br /><br />DB_IMAGE<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// BMP-brush</span><br /><br /><span style="color: #B900B9;">// DEFINE IMAGE oImg FILE "backgrd.jpg" </span><br /><br />@ <span style="color: #000000;">15</span>,<span style="color: #000000;">50</span> RBGROUP oGrp <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Transparent'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">50</span> <span style="color: #B900B9;">// TRANSPARENT</span><br /><br />@ <span style="color: #000000;">15</span>,<span style="color: #000000;">120</span> RBBTN oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Button'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">NORMAL</span>;<br />BITMAP <span style="color: #ff0000;">"Video.bmp"</span> TRANSPARENT <span style="color: #0000ff;">ROUND</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #B900B9;">// ;</span><br />*<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span><span style="color: #000000;">&#40;</span> PalBmpDraw<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImg:<span style="color: #000000;">hBitmap</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: #B900B9;">//------------- BMP - BRUSH -------------------- </span><br /><br /><span style="color: #00C800;">FUNCTION</span> DB_IMAGE<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">LOCAL</span> oImage<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oImage FILE <span style="color: #ff0000;">"Paper.bmp"</span><br />SET <span style="color: #0000ff;">BRUSH</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">TO</span> oImage<br /><span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oImage<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1hy0pr4j] Best regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BUTTONBMP transparency
I was using BUTTONBMP BITMAP .... and had the problem. I went to BTNBMP and made it NOBORDER TRANSPARENT and it does work. I'm using a .BMP image in the resource as a BRUSH and it works. At least I have it under control now. Thanks.
BUTTONBMP transparency
>> There is a transparent-problem, using a Dialog-Image-Background ( doesn't work ). Gradient, Color and Brush is OK. >> This is the reason, I advise converting image as brush and use it as background instead of painting image in the paint method.
BUTTONBMP y Texto del boton
Estoy pasando mis botones a esta clase y queda muy bien además que toma los themes de XP. El problema es que el texto siempre sale centrado, y lo que se corre de un lado a otro con la clausula TEXTRIGHT (por ej) es el bitmap. Hay alguna solución como para que el texto lo ponga a un costado del bitmap? Gracias
BUTTONBMP y Texto del boton
Puedes usar una de estas claúsulas: TEXTTOP | TEXTBOTTOM | TEXTLEFT | TEXTRIGHT al crearlo bien con @ ó con REDEFINE
BUTTONBMP y Texto del boton
Si, Antonio uso la cláusula TEXTRIGHT y si bien me pone el bitmap a la izquierda del botón, el texto sigue saliendo centrado y muchas veces queda bajo la imagen (bmp). Mi FWh es de 03/2006 puede ser que se haya modificado esta clase? Gracias
BUTTONBMP y Texto del boton
ivan Prueba modificar la alineacion del boton en el recurso(pellesC,workshop) yo he modificado parte de la clase para que salgan los textos en la misma posicion [url:3lcyt3as]http&#58;//img161&#46;imageshack&#46;us/my&#46;php?image=botonbmpyf2&#46;jpg[/url:3lcyt3as] [img:3lcyt3as]http&#58;//img161&#46;imageshack&#46;us/my&#46;php?image=botonbmpyf2&#46;jpg[/img:3lcyt3as] podrias modificar la clase button.prg en el metodo [code:3lcyt3as]METHOD Initiate&#40; hDlg &#41; CLASS TButton if ! Empty&#40; &#58;&#58;cCaption &#41; SetWindowText&#40; &#58;&#58;hWnd, SPACE&#40;9&#41;+ &#58;&#58;cCaption &#41; endif [/code:3lcyt3as] ademas en tu recurso(pellesc,workshop) debe estar alineacion left el texto en mi caso yo modifique la clase Tbutton y TButtonBmp este le envia que es de la clase Tbutonbmp espero que te sirva Saludos Patricio pd. Lo ideal seria saber que tipo de boton es, que tipo de alineacion tiene etc, etc.
BUTTONBMP y Texto del boton
Gracias Patricio, anduvo de maravillas.
BUTTONS ON A WINDOW
I must create in a window 160 buttons I create this function to create buttons : [code:rn4uiio2] STATIC FUNCTION makebuttons&#40;X,y,oCassa,oFont,oGet,oLBX&#41; LOCAL k BOTTONI &#58;=40 n &#58;= 1 aBtn &#58;= Array&#40;BOTTONI&#41; X = 20 Y = 810 USE LISTBAR Alias LISTBAR INDEX ON LISTBAR->PUSH TO LISTBAR FOR k &#58;= 1 TO BOTTONI cCaption &#58;= "" nBottone&#58;=n LISTBAR->&#40;DbSeek&#40;nBottone&#41;&#41; cCaption &#58;= AllTrim&#40;LISTBAR->CODICE&#41; IF !Empty&#40; cCaption &#41; @ X+2 ,Y BUTTON aBtn&#91;n&#93; PROMPT cCaption OF oCassa FONT oFont ; SIZE 140,85 PIXEL ELSE @ X+2 ,Y BUTTON aBtn&#91;n&#93; PROMPT Str&#40;nBottone,3,0&#41; OF oCassa FONT oFont ; SIZE 140,85 PIXEL ENDI * SayNum&#40;oGet,5&#41; aBtn&#91;n&#93;&#58;bAction &#58;= &#123;|oBtn| AddLbx&#40;oGet,oBtn,oLbx&#41; &#125; // SE C'è L'ARTICOLO SI OPPURE NO CHIARO????? IF !Empty&#40;cCaption &#41; aBtn&#91;n&#93;&#58;cargo &#58;= &#123; 'Full', n &#125; ELSE aBtn&#91;n&#93;&#58;cargo &#58;= &#123; 'Empty', n &#125; ENDIF X +=85 n++ LISTBAR->&#40;dbskip&#40;&#41;&#41; IF n= 11 &#46;OR&#46; n=21 &#46;OR&#46; n=31 X=20 Y=Y+145 ENDIF NEXT y=810 @ X+2 ,Y BUTTON aPag1 PROMPT PAGINA1 OF oCassa FONT oFont ; SIZE 140,50 PIXEL Y=Y+145 @ X+2 ,Y BUTTON aPag2 PROMPT PAGINA2 OF oCassa FONT oFont ; SIZE 140,50 PIXEL Y=Y+145 @ X+2 ,Y BUTTON aPag1 PROMPT PAGINA3 OF oCassa FONT oFont ; SIZE 140,50 PIXEL Y=Y+145 @ X+2 ,Y BUTTON aPag1 PROMPT PAGINA4 OF oCassa FONT oFont ; SIZE 140,50 PIXEL RETURN NIL [/code:rn4uiio2] Now I create only 40 buttons because I want insert on bottom another buttons Page1,Page2,Page3 and Page4 when I clicked on pag2 the procedure must me show the interval from button number 41 to button number 80 How I can Make it ? Regards[/b]
BUTTONS ON A WINDOW
Silvio, Please provide a small and self contained sample. A PRG that can be compiled and tested quickly. Its the only way to provide efficient tech support. Thanks,
BUTTONS ON A WINDOW
ok : this isthe link <!-- m --><a class="postlink" href="http://hyperupload.com/download/02ed1fbb65/linares.zip.html">http://hyperupload.com/download/02ed1fb ... s.zip.html</a><!-- m --> I made this sample to see only 40 buttons but I want to show 160 button at the same positions : I explain you Page 1 ->>> from 1 to 40 button Page2 ->>>> from 41 to 80 button Page3 ->>>>>from 81 to 120 button Page4 ->>>>>>from 121 to 160 button thank in advance...
BUTTONS ON A WINDOW
Silvio, What screen resolution do you use ? We can't see the full window...
BUTTONS ON A WINDOW
oopss 1400x1050 now but I modified the test with screen 1280X1024 the code is : [code:3gkfsvuz] #include "fivewin&#46;ch" #define PAGINA1 "Pag1" #define PAGINA2 "Pag2" #define PAGINA3 "Pag3" #define PAGINA4 "Pag4" // TO Antonio // I made this sample WITH 40 buttons but I want TO see 160 buttons !!!!!!!!!!!!! Function cassa&#40;&#41; LOCAL oWnd,oFont,oFont2,oFont3 DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, -20 DEFINE FONT oFont2 NAME "MS Sans Serif" SIZE 0, -40 DEFINE FONT oFont3 NAME "ARIAL" SIZE 0, -50 DEFINE WINDOW oWnd STYLE nOr&#40; WS_POPUP, WS_VISIBLE &#41; COLOR GetSysColor&#40;13&#41;, GetSysColor&#40;1&#41; @20,5 LISTBOX oLbx FIELDS ""; HEADER "ARTICOLO", "QTA", ; "PREZZO", "TOTALE" ; OF oWnd SIZE 650,600 PIXEL ; SIZES 230, 80,90,90; FONT oFont makebuttons&#40;20,660,oWnd,oFont,oLBX&#41; ACTIVATE WINDOW oWnd MAXIMIZED RETURN NIL STATIC FUNCTION makebuttons&#40;X,y,ownd,oFont,oLBX&#41; LOCAL k BOTTONI &#58;=40 // but I want see 160 buttons !!!!!!!!!!!!! n &#58;= 1 aBtn &#58;= Array&#40;BOTTONI&#41; X = 20 Y = 660 USE LISTBAR Alias LISTBAR INDEX ON LISTBAR->PUSH TO LISTBAR FOR k &#58;= 1 TO BOTTONI cCaption &#58;= "" nBottone&#58;=n LISTBAR->&#40;DbSeek&#40;nBottone&#41;&#41; cCaption &#58;= AllTrim&#40;LISTBAR->CODICE&#41; IF !Empty&#40; cCaption &#41; @ X+2 ,Y BUTTON aBtn&#91;n&#93; PROMPT cCaption OF oWnd FONT oFont ; SIZE 140,85 PIXEL ELSE @ X+2 ,Y BUTTON aBtn&#91;n&#93; PROMPT Str&#40;nBottone,3,0&#41; OF oWnd FONT oFont ; SIZE 140,85 PIXEL ENDI /* aBtn&#91;n&#93;&#58;bAction &#58;= &#123;|oBtn| AddLbx&#40;oGet,oBtn,oLbx&#41; &#125; IF !Empty&#40;cCaption &#41; aBtn&#91;n&#93;&#58;cargo &#58;= &#123; 'Full', n &#125; ELSE aBtn&#91;n&#93;&#58;cargo &#58;= &#123; 'Empty', n &#125; ENDIF */ X +=85 n++ // LISTBAR->&#40;dbskip&#40;&#41;&#41; IF n= 11 &#46;OR&#46; n=21 &#46;OR&#46; n=31 X=20 Y=Y+145 ENDIF NEXT // bottoni per le pagine ??????? // ma come cambiare pagina ?????? // Pagina1 da 1a 40 // pagina 2 da 41 a 80 // pagina 3 da 81 a 120 // pagina 4 da 121 a 160 y=660 @ X+2 ,Y BUTTON aPag1 PROMPT PAGINA1 OF oWnd FONT oFont ; SIZE 140,50 PIXEL Y=Y+145 @ X+2 ,Y BUTTON aPag2 PROMPT PAGINA2 OF oWnd FONT oFont ; SIZE 140,50 PIXEL Y=Y+145 @ X+2 ,Y BUTTON aPag1 PROMPT PAGINA3 OF oWnd FONT oFont ; SIZE 140,50 PIXEL Y=Y+145 @ X+2 ,Y BUTTON aPag1 PROMPT PAGINA4 OF oWnd FONT oFont ; SIZE 140,50 PIXEL CLOSE LISTBAR Select 1 // PULSANTE FINE @ 980 ,1100 BUTTON aSTOR PROMPT "USCITA" OF oWnd FONT oFont ; SIZE 140,50 PIXEL ACTION oWnd&#58;END&#40;&#41; RETURN NIL[/code:3gkfsvuz]
BUTTONS ON A WINDOW
Silvio, Just a sample: [code:34h8eo7t] @ X+2 ,Y BUTTON aPag2 PROMPT PAGINA2 OF oWnd FONT oFont ; SIZE 140,50 PIXEL ACTION Pagina2&#40; oWnd &#41; &#46;&#46;&#46; function Pagina2&#40; oWnd &#41; local n for n = 2 to 41 oWnd&#58;aControls&#91; n &#93;&#58;SetText&#40; AllTrim&#40; Str&#40; n + 39 &#41; &#41; &#41; next return nil [/code:34h8eo7t] From Pagina2() you may use your DBF to find the right text, and also change DATA bAction of buttons.
BUTTONS ON A WINDOW
THANKS ANTONIO BUT i HAVE ON ORIGINAL WINDOW MANY CONTROL HOW i CAN MAKE TO KNOW THE NUMBER OF CONTROLS TO CHANGE ? THERE IS A FUNCTION TO GIVE ME A LIST OF ALL CONTROLS OD THE WINDOWS WITH THEIR NUMBERS ? REGARDS
BUTTONS ON A WINDOW
Silvio, You may use their DATA cargo to store an identifier, or check its position in oWnd:aControls, its nID, etc.
BUTTONS ON A WINDOW
thank i resolve it
BUTTONS ON A WINDOW
Dear Antonio, Now I use STYLE nOr( WS_POPUP, WS_VISIBLE ) to show the window but i wanted create a window (child of mainwindow) when I shrink the window or increase the window the procedure must repaint all the controls (lbx and buttons) : there is a sample as it ?
BUTTONS ON A WINDOW
Silvio, Windows may do it automatically. In case you want to force it you may do a oWnd:Refresh()
BUUUUU ya no puedo poner colores condicionados en Txbrowse??
HolaYo tenia una rutinita que funcionaba muy bien en Txbrowse pero ahora ya no funciona <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> ahora es diferente o ya no se puede:?: asi lo tenia antes con un fivewin 6 ahora uso el 7 <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> oBrw:bClrStd := { || ColoreaSTDRenglon() }//----------------------------- STAT FUNC ColoreaSTDRenglon()Local aColores := {}IF BITACORA->TIPO="Urgencia"aColores := { CLR_WHITE, CLR_BLUE }EndIFIF BITACORA->TIPO="Traslado"aColores := { CLR_BLUE,CLR_WHITE }EndIFIF BITACORA->TIPO="Falsa Alarma"aColores := { CLR_WHITE, CLR_RED }ENDIFReturn aColores //--------------------YA ME DIJERON COMO SE HACE AHORA YA ME FUNCIONA <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> AHORA ES A SI <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> oBrw:bClrStd:= {|| { IIF(BITACORA->TIPO="Falsa Alarma",Rgb(255,0,0),CLR_BLACK) , IIF(OrdKeyNo()%2=0,Rgb(193,221,255),Rgb(221,245,255)) } }SaludosAida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Back after 10 years due to illness [ Javier Lloris ]
Good morning: Antes que nada quiero expresar mi gratitud a Antonio, por ser una persona maravillosa, empática, educada, entre otros miles de calificativos positivos y no puedo faltar, como genio de la programación. Gracias por todo Antonio. [b:8r23cuc5]First of all, I want to express my gratitude to Antonio, for being a wonderful, empathetic, educated person, among thousands of other positive adjectives and I cannot miss him, as a programming genius. Thanks for everything Antonio.[/b:8r23cuc5] Para todos aquellos que aún se acuerden de mi, un gran abrazo y para los que no, aquí me tenéis para ayudaros en lo que pueda. Estos 10 años fuera de este mundillo y realmente de todos, ha sido por enfermedades graves como 3 cánceres seguidos 2 ( con metástasis que me a reventado todo mi cuerpo) . Aunque mi cuerpo no me permite hacer casi nada por las todas la secuelas muy graves y con fecha de caducidad, aquí estamos ahora diseñando software de nuevo para la comunidad. [b:8r23cuc5]For all those who still remember me, a big hug and for those who don't, here I am to help you in any way I can. These 10 years away from this world and really from everyone, have been due to serious illnesses such as 3 cancers in a row, 2 (with metastases that have burst my entire body). Although my body does not allow me to do almost anything due to all the very serious consequences and with an expiration date, here we are now designing software again for the community.[/b:8r23cuc5] Un inciso: recuerdo leer algunos hilos en el foro sobre como hacer Backup/Restores que también incluye crear ZIP con claves para descomprimir por seguridad y también como subir archivos a un servidor FTP. ( la próxima versión incluire SFTP ) pues en mi Blog teneis dos programas completos para estos asuntos que funciona a la perfección, al menos yo los uso sin ningún error hasta la fecha. [b:8r23cuc5]An aside: I remember reading some threads in the forum about how to do Backup/Restores, which also includes creating ZIP with keys to decompress for security and also how to upload files to an FTP server. (the next version will include SFTP) because in my Blog you have two complete programs for these matters that work perfectly, at least I use them without any errors to date.[/b:8r23cuc5] Modificando el Blog pero aquí podéis descargarlos: [b:8r23cuc5]Modifying the Blog but here you can download them:[/b:8r23cuc5] [url:8r23cuc5]https&#58;//javierlloris&#46;blogspot&#46;com/[/url:8r23cuc5] Por cierto yo soy de los que empezó con Fivewin 1.0 e incluso antes con FiveMenu creo recordar que se llamaba así. Por desgracia al cambiarme de casa vinieron algunos amigos para ayudar en la mudanza y me equivoque totalmente al tirar muchísimas cosas que ahora me doy cuenta que lo necesito, aunque sea por curiosidad y recordar tiempos pasados. Es decir, resumo, mis amigos preguntaban esto para guardar o para tirar pues dije demasiadas veces tirar y todo el software y librerías de MS-DOS guardadas en disquetes de 3" se fueron a la basura. Años de trabajo en la basura, madre mía. ( se unió todo a la vez, mudanza, enfermedad y que tu mujer te deje en el segundo cáncer, pues no ayudo mucho a organizarlo todo bien, pero así es la vida ). [b:8r23cuc5]y the way, I am one of those who started with Fivewin 1.0 and even before with FiveMenu, I think I remember that it was called that. Unfortunately, when I moved house, some friends came to help with the move and I made a total mistake by throwing away many things that I now realize I need, even if it is out of curiosity and remembering past times. That is, to summarize, my friends asked this to save or to throw away because I said throw away too many times and all the MS-DOS software and libraries saved on 3" floppy disks went in the trash. Years of work in the trash, oh my goodness (everything came together at once, moving, illness and your wife leaving you with the second cancer, because I didn't help much to organize everything well, but that's life).[/b:8r23cuc5] Entre organizar todo sobre programación, hacer copias de seguridad e intentar ponerme al día de todo lo nuevo, probando y documentando el nuevo programa que voy a publicar y revisar por encima de momento el foro, he estado tres semanas bastante ocupado. ( algún disco y pendrive me han dado un poco por saco para recuperar los backup pero bueno, lo que no he podido recuperar son un montón de programas a 16bits pero en algún disco antiguo que tengo por ahí habrá alguna copia.) [b:8r23cuc5]Between organizing everything about programming, making backups and trying to catch up on everything new, testing and documenting the new program that I am going to publish and reviewing the forum at the moment, I have been quite busy for three weeks. (some disk and pendrive have given me a bit of trouble to recover the backups but well, what I have not been able to recover are a lot of 16-bit programs but on some old disk that I have lying around there will be a copy.)[/b:8r23cuc5] Hace unas semanas me contacto por WA ( jvtecheto ) valenciano como yo, sobre la clase TBarBRW 16/32bits. Comentar que la he subido de nuevo a la nube para que se pueda descargar, cuando controle GitHub subiré todo allí. La clase la he documentado estos días pero es muy sencilla que cualquiera sabe lo que hace al instante. Esta clase no tiene nada de especial porque hace lo mismo que TBar pero la cree porque me serbia en el trabajo para crear barras de títulos y barras de botones estrechas. Como la usaba muchísimo solo cambiando las acciones como parámetros me agilizaba el trabajo. La podéis utilizar, modificar o no, eso ya es cosa vuestra, de hecho en los programas del 2010 que estaba creando para la comunidad la usaba y seguiré usándola. [b:8r23cuc5]A few weeks ago I was contacted by WA (jvtecheto), a Valencian like me, about the TBarBRW 16/32bits class. Comment that I have uploaded it again to the cloud so that it can be downloaded, when I control GitHub I will upload everything there. I have documented the class these days but it is very simple that anyone knows what they are doing instantly. This class is nothing special because it does the same thing as TBar but I created it because it helped me at work to create title bars and narrow button bars. Since I used it a lot, just changing the actions as parameters made my work faster. You can use it, modify it or not, that is up to you, in fact in the 2010 programs that I was creating for the community I used it and I will continue to use it. [/b:8r23cuc5] Os muestro una imagen, he marcado en rojo las barras que se crean automáticamente. Espero que Google drive visualice las imágenes porque creo recordar que estaba como publico. ( en algunas cosas como estas no recuerdo muy bien como iban o como estaban configuradas si públicas o privadas, tengo que revisar estas cosas ). Al final pondré donde podéis descargar los programas y clases. [b:8r23cuc5]I show you an image, I have marked in red the bars that are created automatically. I hope Google Drive displays the images because I seem to remember that it was as public. (In some things like these I don't remember very well how they worked or how they were configured, whether public or private, I have to check these things). At the end I will put where you can download the programs and classes.[/b:8r23cuc5] [b:8r23cuc5]Descargar:[/b:8r23cuc5] [b:8r23cuc5]Download:[/b:8r23cuc5] [url:8r23cuc5]https&#58;//drive&#46;google&#46;com/drive/u/0/folders/1T6rLQMmPU87iSa7gwooBdnQ7Qx1l3_un[/url:8r23cuc5] [b:8r23cuc5]Imagen:[/b:8r23cuc5] [b:8r23cuc5]Images:[/b:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/Qt9Q377D/preproducir4&#46;jpg[/img:8r23cuc5] En una semana mas o menos publicaré el programa pReproducir ver 1.5 32bits, este programa muestra como usar el WMP (). De momento solo el programa EXE para que lo probéis en sistemas operativos que yo no tengo instalados como pueden ser WinXP, WinVista, Win8,Win10 32bits y Win11para que me reportéis si aparece algún error, el programa comprueba en que sistema operativo esta corriendo porque depende del S.O la versión de WMP puede reproducir archivos diferentes de audio pero todo lo que reproduce WMP lo podemos reproducir nosotros porque usamos WMP mediante el API de windows. Os dejo algunas muestras: ( desde hace muchos años decidí crear las aplicaciones minimalistas, usar los mínimos bitmaps posibles, tanta imagen como hemos hecho casi todos al comienzo, solo sirve para perder muchísimo tiempo para encontrar el bitmap adecuado y que luego el usuario no lo aprecia, al menos en grandes empresas que son las que he trabajado, en estos casos solo buscan rapidez y eficiencia. [b:8r23cuc5]In a week or so I will publish the program [b]pReproduce ver 1.5 32bits[/b:8r23cuc5], this program shows how to use WMP (). At the moment only the EXE program so that you can try it on operating systems that I do not have installed such as WinXP, WinVista, Win8, Win10 32bits and Win11 so that you can report me if any error appears, the program checks which operating system it is running on because it depends of the OS version of WMP can play different audio files but everything that WMP plays can be played by us because we use WMP through the Windows API. I leave you some samples: (for many years I decided to create minimalist applications, use the minimum possible bitmaps, as much image as almost all of us have done at the beginning, it only serves to waste a lot of time to find the appropriate bitmap and then the user does not find it. appreciate, at least in large companies that are the ones I have worked for, in these cases they only look for speed and efficiency.[/b] [b:8r23cuc5]Imagenes:[/b:8r23cuc5] [b:8r23cuc5]Images:[/b:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/fySCQzNK/preproducir1&#46;jpg[/img:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/4dX25BHd/preproducir2&#46;jpg[/img:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/QCHb4P8X/preproducir3&#46;jpg[/img:8r23cuc5] Sobre el programa Twebcam ver 1.0 32bits que esta publicado en las contribuciones de Fivewin, dejarme un par de semanas para publicar la versión 1.5 que le añadí hacer una foto de la Webcan y poder recortar la imagen con la clase TImagesV y quitarle el apartado de Streming que funciona pero no estoy contento del todo, la añadiré de nuevo en la versión 2.0. Hace 10 años lo probé con mi servidor web y podía ver las imágenes capturadas por la webcam en internet. [b:8r23cuc5]Regarding the[b] Twebcam ver 1.0 32bits[/b:8r23cuc5] program that is published in the Fivewin contributions, give me a couple of weeks to publish version 1.5 that I added to take a photo of the Webcan and be able to crop the image with the TImagesV class and remove the Streming section that It works but I'm not entirely happy, I'll add it again in version 2.0. 10 years ago I tried it with my web server and I could see the images captured by the webcam on the internet.[/b] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/SRtJvDSq/pWebcam&#46;jpg[/img:8r23cuc5] En unos de los hilos del foro leí hace unas semanas un comentario de un compañero ( discúlpame que no recuerde ahora mismo tu nombre ) que solo funcionaba con la webcam por defecto. No tengo ninguna captura de pantalla pero funciona con tantas cámaras como tengas instaladas. Recuerdo que tenias que tener los controladores de las camarás instaladas. ( con este programa usaba Windows 7 ). Este programa lo cree porque antes tenia como afición entre muchas, criar loros y tenía 6 camarás instaladas en los grandes nidos para controlar la cría sin molestarlos. ( por cierto, tengo un programa inmenso de opciones para la gestión de psitácidos también por terminar, con videos, imágenes, audios, etc, tengo unos cuantos de todo tipo ). [b:8r23cuc5]In one of the forum threads a few weeks ago I read a comment from a colleague (forgive me for not remembering your name right now) that it only worked with the webcam by default. I don't have any screenshots but it works with as many cameras as you have installed. I remember that you had to have the camera drivers installed. (with this program I used Windows 7). I believe this program because before I had one of many hobbies, raising parrots and I had 6 cameras installed in the large nests to control the breeding without disturbing them. (By the way, I have a huge program of options for psittacine management also to be finished, with videos, images, audios, etc., I have a few of all kinds).[/b:8r23cuc5] P.D: FWH posiblemente uno de los mejores lenguajes junto a C++ para el desarrollo de software de escritorio. Programas con FW a 16bits, ADS y Cristal Report 16/32bits funcionado con bases de datos de millones de registros funcionado a las mil maravillas y sin generar nunca ningún tipo de error. Felicidades tanto a Antonio como al Team de FWH y a los nuevos colaboradores que he visto que hay compañeros nuevos que ayudan a todos. [b:8r23cuc5]P.S: FWH is possibly one of the best languages ??along with C++ for desktop software development. Programs with 16-bit FW, ADS and Cristal Report 16/32-bit worked with databases of millions of records worked like a charm and never generated any type of error. Congratulations to both Antonio and the FWH Team and to the new collaborators that I have seen, there are new colleagues who help everyone[/b:8r23cuc5]. Mucha fuerza para todos aquellos con cáncer, nunca dejes de mirar hacia adelante y piensa que todo saldrá bien. Yo he pasado 3 cánceres 2 con metástasis y aunque tanta quimioteria me a destrozado todos los órganos incluido los huesos, lo peor que llevo es la neumonía farmacológica crónica que no puedo estar mas de 2/3 min de pie porque me ahogo y tengo que sentarme enseguida donde sea o al suelo y ponerme el oxigeno y mil cosas mas, no dejo que mi mente me haga chantaje emocional teniendo 24h la mente ocupada. Ya sea con tocar el piano, la guitarra, aprender japonés, manualidades, programación tengo un montón de hobbys. Respecto a las manualidades creo midoris, agendas, libretas, cuadernos todo hecho a mano, cuando acabe la web que estoy haciendo la publicaré para aquellos que quieran colaborar puedan. Tengo un montón de cosas por hacer y acabar uuufff. SIEMPRE PENSAR EN POSITIVO, SIEMPRE. [b:8r23cuc5]Much strength to all those with cancer, never stop looking forward and think that everything will be fine. I have had 3 cancers, 2 with metastases and although so much chemotherapy has destroyed all my organs including my bones, the worst thing I have is chronic pharmacological pneumonia that I cannot stand for more than 2/3 minutes because I suffocate and have to sit down. immediately wherever or on the ground and put on oxygen and a thousand other things, I don't let my mind do emotional blackmail with my mind occupied for 24 hours. Whether it's playing the piano, the guitar, learning Japanese, crafts, programming, I have a lot of hobbies. Regarding crafts, I create midoris, agendas, notebooks, all handmade. When I finish the website I am making, I will publish it for those who want to collaborate. I have a lot of things to do and finish uuufff. ALWAYS THINK POSITIVE, ALWAYS.[/b:8r23cuc5] Se me olvidad de pMedia ver 1.5 32bits un programa que combina como reproducir videos con WMP y como reproducir CDA usando MCI, también tiene visualizar imágenes con TImagesV, audio y quizás ya que tengo que revisarlo y documentarlo, le añada ver TV por internet. Todos los programas creados como hobby llevaran como logotipo el pingüino con la cascara en la cabeza. Se quedo por ajustar algunas cosas en los formularios. [b:8r23cuc5]I was left to adjust some things in the forms.[/b:8r23cuc5] [b:8r23cuc5]I forgot about pMedia 1.5 32bits, a program that combines how to play videos with WMP and how to play CDA using MCI, it also has to view images with TImagesV, audio and perhaps since I have to review and document it, I will add watching TV over the internet. All programs created as a hobby will have the penguin with the shell on its head as its logo.[/b:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/bvDHHVhx/pMedia1&#46;jpg[/img:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/yNMhfh1w/pMedia2&#46;jpg[/img:8r23cuc5] Programa pBackup ver 1.0 32bits lo podéis descargar en: [b:8r23cuc5]You can download [b]pBackup program ver 1.0 32bits[/b:8r23cuc5] at:[/b] [url:8r23cuc5]https&#58;//javierlloris&#46;blogspot&#46;com/[/url:8r23cuc5] Programa pFtp ver 1.0 32bits lo podéis descargar en: [b:8r23cuc5]You can [b]download pFtp program ver 1.0 32bits [/b:8r23cuc5]at:[/b] [url:8r23cuc5]https&#58;//javierlloris&#46;blogspot&#46;com/[/url:8r23cuc5] El programa pFinanzas ver 1.5 32bits aun le queda un poco de trabajo pero intentaré acabarlo cuanto antes. [b:8r23cuc5]The [b]pFinanzas ver 1.5 32bit[/b:8r23cuc5] program still has a little work left but I will try to finish it as soon as possible.[/b] Imagenes: [b:8r23cuc5]Images:[/b:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/NMBgm0sP/p-Finanzas1&#46;jpg[/img:8r23cuc5] [img:8r23cuc5]https&#58;//i&#46;postimg&#46;cc/vBhGzdD8/p-Finanzas2&#46;jpg[/img:8r23cuc5] Aún tengo algunos programas mas por subir. [b:8r23cuc5]I still have some more programs to upload.[/b:8r23cuc5] Gracias por aguantar mi rollo de vuelta. [b:8r23cuc5]Thanks for putting up with my comeback.[/b:8r23cuc5] Excuse my terrible English. Un gran abrazo a todos y aquí estoy de vuelta y espero que con fuerzas, aunque mi cuerpo diga lo contrario. [b:8r23cuc5]A big hug to everyone and here I am back and I hope with strength, even though my body says otherwise.[/b:8r23cuc5] Greeting; [b:8r23cuc5]Javier Lloris[/b:8r23cuc5] <!-- e --><a href="mailto:javierllorisprogramador@gmail.com">javierllorisprogramador@gmail.com</a><!-- e --> Blogs personales: Programación: <!-- m --><a class="postlink" href="https://javierlloris.blogspot.com/">https://javierlloris.blogspot.com/</a><!-- m --> Japonés: <!-- m --><a class="postlink" href="https://bitacorajaponesa.blogspot.com/">https://bitacorajaponesa.blogspot.com/</a><!-- m --> Cubos de Rubik: <!-- m --><a class="postlink" href="https://www.instagram.com/jllorispersonal/?next=%2Falbarakatr%2Ffeed%2F&ref=2ybz0gmvul">https://www.instagram.com/jllorisperson ... 2ybz0gmvul</a><!-- m --> Tengo una colección de unos 100 cubos de todo tipo de formas geométricas, todos resueltos, en instagram solo hay unos cuentos cubos.
Back after 10 years due to illness [ Javier Lloris ]
Buenas Javier. TBarBRW.prg - tiene un ejemplo de uso? Gracias. Regards, saludos.
Back after 10 years due to illness [ Javier Lloris ]
Javier: Es un excelente trabajo, felicidades al "chef" Saludos
Back in Spain :-)
Dear friends, We are already back in Spain. Development in Korea has been really great and we are so satisfied with the results <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Now we will continue our FiveTech development as usual, and expect more support from me in the forums too <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> And a real big and nice surprise for all: Daniel Garcia Gil has joined FiveTech in Spain <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> So expect lots of new features and great things for next FiveWin versions. We are working on really cool new technologies. Lots of big surprises comming very soon...
Back in Spain :-)
Dear Antonio, >>We are already back in Spain. Development in Korea has been really great and we are so satisfied with the results Congratulations. >>And a real big and nice surprise for all: >>Daniel Garcia Gil has joined FiveTech in Spain So expect lots of new features and great things for next FiveWin versions. >>We are working on really cool new technologies. Lots of big surprises comming very soon... >>Dear friends, I am highly motivated. Regards, - Ramesh Babu P
Back in Spain :-)
Hi Antonio, congratulations and compliments. But you're back to Spain for working when a lot of people is coming to Spain for holydays <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Back in Spain :-)
Dear Massimo, Working with computers is real holydays for me <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BackGround Painting (SOLVED)
Hi all, I have the following problem when using tFolderX: Check Boxes & Group Boxes: [img:2l8ftso2]http&#58;//www&#46;mayapos&#46;com/FiveWin/setdlg&#46;png[/img:2l8ftso2] I use SetDlgGradient()... Anyone knows of a way to fix this...???
BackGround Painting (SOLVED)
Hello Bayron, using a folder is different. You can download a working sample. Folder-Brush, Color, Gradient and image. Please remember : changing the radio- and Checkbox-textcolor from black to defined, only works [b:2pccu0ud]without[/b:2pccu0ud] XPMANIFEST Download ( different backgrounds ) : <!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/testfld1.zip">http://www.pflegeplus.com/fw_downloads/testfld1.zip</a><!-- m --> Different backgrounds for each folderpage : [img:2pccu0ud]http&#58;//www&#46;pflegeplus&#46;com/pictures/TFolderex1&#46;jpg[/img:2pccu0ud] Using : [b:2pccu0ud]SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )[/b:2pccu0ud] will ignore the different background-selections and the folder will be transparent ( shows gradient from dialog ) To test it, [color=#FF0000:2pccu0ud]disable[/color:2pccu0ud] the brushdefine ON INIT and enable [color=#0000FF:2pccu0ud]SetDlgGradien[/color:2pccu0ud]t !!!! Download ( using XPMANIFEST : black textcolor for Radios and checkboxes ) : <!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/testfld2.zip">http://www.pflegeplus.com/fw_downloads/testfld2.zip</a><!-- m --> [color=#0000FF:2pccu0ud][b:2pccu0ud]SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )[/b:2pccu0ud][/color:2pccu0ud] REDEFINE FOLDEREX oFld ID 110 PROMPT "Page 1", "Page 2", "Page 3", "Page 4"; BITMAPS "new", "new", "new", "new"; DIALOGS "sub1", "sub2", "sub1", "sub2" ; ROUND 5 // Disable the red lines from sample ! // [color=#FF0000:2pccu0ud]F_BACKGRD( oFld, 550, 300 )[/color:2pccu0ud] // no! needed oFld:lTransparent := .T. oFld:nFolderHeight := 30 oFld:nSeparator := 10 oFld:bClrText := {| o, n | 128 } oFld:oFont := oFont [size=150:2pccu0ud]// each Folderpage is defined in a extra function ( to keep the main-dialog small in size )[/size:2pccu0ud] PAGE1( oFld) PAGE2( oFld) PAGE3( oFld) PAGE4( oFld) ACTIVATE DIALOG oDlg CENTERED ; [color=#FF0000:2pccu0ud]ON INIT DLG_BACK( oDlg, 2, .T., 16038911, 16777215, 0.5, "Marble.bmp", "Backgrd-jpg" ) ;[/color:2pccu0ud] VALID MsgYesNo( "Do you want to end?" ) without XPMANIFEST ( RED textcolor selected ) [img:2pccu0ud]http&#58;//www&#46;pflegeplus&#46;com/pictures/TFolderex2&#46;jpg[/img:2pccu0ud] Best regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BackGround Painting (SOLVED)
Hi Uwe, Your sample works perfectly... But for some reason It does not work for me in my main program... I have done everything from: changing the manifest file changing my code Saving my .res file to .rc and check that everything is the same Tomorrow I will reconstruct everything from scratch using your sample as base... But I wonder if you can explain the reason why this happens when using the XPMANIFEST...????
BackGround Painting (SOLVED)
Hello Bayron, It is the reason, I show complete working samples, not just a few lines, to get a overview, how it works together. There are 2 !!! samples. One sample uses my functions WITH XPManifest but NOT using => SetDlgGradient( {... The second works as well without my functions. XPManifest only belongs to the Radio- and checkbox textcolors not to work in sample 2. You can seperate the text from radios and checkboxes, if You need a different textcolor. Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BackGround Painting (SOLVED)
Thanks Uwe, I really appreciate the effort you made to provide me with this sample... I'm sure I will solve the problem with this samples... But right now I am doing a complete rewrite of my application, and it will take me some time... Thank you again...
BackGround Painting (SOLVED)
Remember SetDlgGradient is GLOBAL !!! Define a extra dialog-style using global [color=#FF0000:3omay5ve][b:3omay5ve]SetDlgGradient[/b:3omay5ve][/color:3omay5ve] [img:3omay5ve]http&#58;//www&#46;pflegeplus&#46;com/pictures/dlgstyle1&#46;jpg[/img:3omay5ve] FUNCTION MAIN() local oDlg1, oBtn1, oBtn2 [color=#FF0000:3omay5ve]SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )[/color:3omay5ve] DEFINE DIALOG oDlg1 FROM 50, 50 TO 300, 400 ; TITLE "Dialog using SetDlgGradient" PIXEL TRANSPARENT @ 35, 40 BUTTON oBtn1 PROMPT "&Next" SIZE 40, 20 OF oDlg1 PIXEL ; ACTION DIALOG2() @ 35, 100 BUTTON oBtn2 PROMPT "&Quit" SIZE 40, 20 OF oDlg1 PIXEL ; ACTION oDlg1:End() ACTIVATE DIALOG oDlg1 ; ON INIT oDlg1:Move(50, 50) RETURN NIL // ----------------------------- FUNCTION DIALOG2() local oDlg2, oBtn1, oBtn2 [color=#FF0000:3omay5ve]SetDlgGradient()[/color:3omay5ve] // Disabled DEFINE DIALOG oDlg2 FROM 50, 50 TO 300, 400 ; TITLE "A EXTRA Dialog-background" PIXEL TRANSPARENT @ 35, 40 BUTTON oBtn1 PROMPT "&Next" SIZE 40, 20 OF oDlg2 PIXEL ; ACTION ( [color=#FF0000:3omay5ve]SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } ), [/color:3omay5ve]; DIALOG3() ) @ 35, 100 BUTTON oBtn2 PROMPT "&Quit" SIZE 40, 20 OF oDlg2 PIXEL ; ACTION oDlg2:End() ACTIVATE DIALOG oDlg2 ; ON INIT ( [color=#0000FF:3omay5ve][b:3omay5ve]DLG_BACK( oDlg2, .T., 16038911, 16777215, 0.5 ), [/b:3omay5ve];[/color:3omay5ve] oDlg2:Move( 150,150 ) ) // Enable [color=#FF0000:3omay5ve]SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )[/color:3omay5ve] RETURN NIL // ----------------------------- FUNCTION DIALOG3() local oDlg3, oBtn1 DEFINE DIALOG oDlg3 FROM 150, 150 TO 400, 600 ; TITLE "Back to => SetDlgGradient" PIXEL TRANSPARENT @ 35, 60 BUTTON oBtn1 PROMPT "&Quit" SIZE 40, 20 OF oDlg3 PIXEL ; ACTION oDlg3:End() ACTIVATE DIALOG oDlg3 ; ON INIT oDlg3:Move(250, 250) RETURN NIL // -------- FUNCTION DLG_BACK( oWnd, lDirect, nColor1, nColor2, nMove ) local oBrush aGrad := { { nMove, nColor1, nColor2 }, { nMove, nColor2, nColor1 } } hDC = CreateCompatibleDC( oWnd:GetDC() ) hBmp = CreateCompatibleBitMap( oWnd:hDC, oWnd:nWidth, oWnd:nHeight ) hBmpOld = SelectObject( hDC, hBmp ) GradientFill( hDC, 0, 0, oWnd:nHeight, oWnd:nWidth, aGrad, lDirect ) // .T. = Vertical DeleteObject( oWnd:oBrush:hBrush ) oBrush := TBrush():New( ,,,, hBmp ) oBrush:Cargo := aGrad SelectObject( hDC, hBmpOld ) ReleaseDC(hDC) oWnd:SetBrush( oBrush ) oBrush:End() RETURN( NIL ) Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BackGround Painting (SOLVED)
Uwe thanks for all your explanations... Right now I am thinking on going back to individual painting of dialogs, because of the problems I have with SetDlgGradient(), specifically with folders... I'll see what I come up with....
BackGround Painting (SOLVED)
this problem is old... We have allready modified this error (Tgroup class) two year ago but perhaps Linares not included the modifications on future package
BackGround Painting (SOLVED)
Silvio, Have a look at this: [url:38x66n79]http&#58;//community&#46;artofmanliness&#46;com/forum/topics/etiquette-question-last-name-only[/url:38x66n79] Best regards, Otto
BackGround Painting (SOLVED)
Otto, BRAVO!
BackGround Painting (SOLVED)
Otto, Ich kann nicht lachen, ich habe zahnschmerzen !!!!!!!! so viele Fabeln sechs Fall eine Frau? Nur Frauen erzählen viele Geschichten
BackGround Painting (SOLVED)
Your teeth? It 's all your head that does not "run ok".
BackGround Painting (SOLVED)
Dear Otto, Why are you always trying to write nonsense? You are always trying to offend me constantly ... The problem with this class (tgroup) has been corrected by Emg long time ago but as so often mistakes are not saved and we have to recompile the object classes along with those changed as was the case for so long with the class rpreview or with the class msgbar or msgitem. But you continue to offend me not knowing what the real problem But what you are trying to get by in this way ? Dear Massimo with you do not speak anymore after all the crap you wrote to me in private when you told me to be older than me and you told me that " I was a sperm" when you was born this is a technical forum, or you think it's just a place to offend me constantly ?
BackGround Painting (SOLVED)
Bayron, have a look at these changes in TGroup.prg. [url:wp3qmf1w]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=22940&hilit=tgroup[/url:wp3qmf1w] For me everything is working fine, even the transparent groupheader.
BackGround Painting (SOLVED)
Thanks Stefan, This way the problem with the painting of the groups was fixed for me... I also solved the problem with the checkboxes removing this function from my project: [code=fw:3rbe27xx]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//FUNCTION IsAppThemed()</span><br /><span style="color: #B900B9;">//RETURN .f.</span><br /> </div>[/code:3rbe27xx]
BackStage de Ribbon
Buenas tardes No se si el funcionamiento del BackStage del Ribbon es el correcto ya que es la primera vez que lo utilizo. En el siguiente enlace describo los problemas que he encontrado (Fwh 12.03) <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=22&t=26409&start=15#p146651">viewtopic.php?f=22&t=26409&start=15#p146651</a><!-- l --> Si alguno puede aclararme el tema lo agradeceria. Gracias y un saludo
BackStage nType
Hello Daniel, If I use nType 1 action is not fired. oBackStage:AddOption( "Exit",,, 2,,,,, ,,, ,{|Self, oOpt, nLastSelect |Msginfo( oOpt:cPrompt )} ) Best regrads, Otto
BackStage nType
Hello Daniel, Maybe I am missing something but for me it seems as the only nType in METHOD LButtonDown of CLASS TBackStage is: BCKTYPE_SELECT Best regards, Otto
BackStage nType
Otto... several change to launch action in backstage button. implemented xcommand in ribbon.ch is little sample [code=fw:28zfqnaa]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">DEFINE</span> BACKSTAGE oBackStage <br />   <br />   <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Save"</span> ;<br />          BITMAP <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\b</span>s_save.bmp"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span>;<br />          GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />          <br />   <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Save As"</span> ;<br />          BITMAP <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\b</span>s_saveas.bmp"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span>;<br />          GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,  nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">242</span>, <span style="color: #000000;">96</span>, <span style="color: #000000;">96</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">195</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">37</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>;<br />          COLORTEXT CLR_BLACK, CLR_WHITE<br />   <br />   <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Open"</span> ;<br />          BITMAP <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\b</span>s_open.bmp"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span>;<br />          BITMAP <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\b</span>s_close.bmp"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span><br />   <br /><br />   <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Information"</span>;<br />          COLORTEXT <span style="color: #00C800;">NIL</span>, CLR_HRED <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"New"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Save / Send"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span>;<br />      GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> BSSELECT <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Help"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span>;<br />          COLORS nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">242</span>, <span style="color: #000000;">96</span>, <span style="color: #000000;">96</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">195</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">37</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Option"</span> ;<br />          BITMAP <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\b</span>s_options.bmp"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oOpt:<span style="color: #000000;">cPrompt</span> <span style="color: #000000;">&#41;</span><br />          <br />   <span style="color: #0000ff;">DEFINE</span> BSBUTTON <span style="color: #0000ff;">OF</span> oBackStage <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Exit"</span> ;<br />          BITMAP <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\b</span>s_exit.bmp"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oRBar:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <br />   <br />   <br />   SET BACKSTAGE oBackStage <span style="color: #0000ff;">TO</span> oRBar<br /> </div>[/code:28zfqnaa] custom colors [img:28zfqnaa]http&#58;//www&#46;sitasoft&#46;net/fivewin/screen/backs2&#46;png[/img:28zfqnaa] [img:28zfqnaa]http&#58;//www&#46;sitasoft&#46;net/fivewin/screen/backs3&#46;png[/img:28zfqnaa] Launch action [img:28zfqnaa]http&#58;//www&#46;sitasoft&#46;net/fivewin/screen/backs4&#46;png[/img:28zfqnaa] exe sample [url:28zfqnaa]http&#58;//www&#46;sitasoft&#46;net/fivewin/samples/rib1&#46;zip[/url:28zfqnaa]
BackStage nType
Hello Daniel, thank you. But I don't have BSBUTTON in ribbon.ch. Do I need to download a new FWH-version? My libs are from 26.6.2010. Best regards, Otto
BackStage nType
Daniel, thank you. Best regards, Otto [img:37c7qde8]http&#58;//www&#46;atzwanger-software&#46;com/fw/ribbon5&#46;jpg[/img:37c7qde8]
Backgrd.-Tests for Wind. Dialog a Alpha-BMP's ( download )
Hello, After spending some hours with testing, I think, it might be useful, to show a overview of the functions, to show the different backgrounds with combinations ( Gradient, Brushes, Images and combinations with Alpha-BMP's ) from inside a MDI or MODAL-window and Dialog. I'm still busy with testing and it is not finished yet. There will be a Browser-selection with all 30 combinations. [img:wrgeecym]http&#58;//www&#46;pflegeplus&#46;com/pictures/backtests&#46;jpg[/img:wrgeecym] For users with older FWH-versions and no Gradient-support, the use of a extra Gradient-function is included. For the moment, I just want to show the functions and how it works. This post will be updated after all tests are done. [img:wrgeecym]http&#58;//www&#46;pflegeplus&#46;com/pictures/back0&#46;jpg[/img:wrgeecym] [img:wrgeecym]http&#58;//www&#46;pflegeplus&#46;com/pictures/back6&#46;jpg[/img:wrgeecym] Source-Version : 13.01.2009 [code:wrgeecym] // ------- WINDOW - TEST ( MDI ) -------------------------- FUNCTION NEW_WIN() LOCAL oWnd1, oBtn1, oImage1, oBmp1, oBar1, oBtn2, oBtn3 // ( 6 ) Alpha-Blended-BMP // ----------------------------- cALPHA &#58;= ALLTRIM( W_C_ALPHA ) IF !EMPTY ( cALPHA ) DEFINE BITMAP oBmp1 FILENAME "&c_pfad\IMAGE\" + cALPHA ENDIF // MDI-Window // --------------- DEFINE WINDOW oWnd1 TITLE "Background for Windows" MDI MENU TMenu()&#58;New() DEFINE BUTTONBAR oBar1 OF oWnd1 SIZE 60, 60 2007 RIGHT oBar1&#58;bClrGrad &#58;= { | lInvert | If( ! lInvert, ; { { 0&#46;90,11892819,16777215 },{ 0&#46;90,16777215,11892819 } },; { { 0&#46;50,128,16777215 }, { 0&#46;50,16777215,128 } } ) } oBar1&#58;nClrText &#58;= 0 DEFINE BUTTON oBtn2 OF oBar1 ACTION NIL; RESOURCE "floppy" DEFINE BUTTON oBtn3 OF oBar1 ACTION oWnd1&#58;End() ; RESOURCE "quit" PROMPT "Exit" TOOLTIP "Close Window-Test" oBtn2&#58;Hide() // ----- Table of Color- Brush and Image - Selection ------------- // ----------------------------------------------------------------------- // 1", "Black" } // 2", "White" } // 3", "Blue" } // 4", "Blue+" } // 5", "Green" } // 6", "Green+" } // 7", "Red" } // 8", "Red+" } // 9", "Yellow" } // 10", "Select" } // ------------------- // 11", "Borld&#46;" } // 12", "Tiled" } // 13", "Bricks" } // ------------------- // 14", "BACKGRD&#46;" } // ------------------- // ------------------- // Colors // --------- IF W_POS1 < 11 &#46;and&#46; W_STYLE = 2 // Color W_GRAD( hDC, oWnd1 ) ENDIF // Picture Background // -------------------------- *IF W_POS1 = 14 * W_IMAGE( oWnd1 ) *ENDIF // Brush // -------- *IF W_POS1 > 10 &#46;and&#46; W_POS1 < 14 * W_BRUSH( oWnd1 ) *ENDIF // W_POS1 < 11 ( GRADIENT and COLORS ) // W_POS1 > 10 &#46;and&#46; W_POS1 < 14 ( BRUSH ) // W_POS1 = 14 &#46;and&#46; W_LOGOTYP = "I" ( IMAGE ) // !EMPTY( W_C_ALPHA ) ( ALPHA-BLENDED BMP ) ACTIVATE WINDOW oWnd1 MAXIMIZED ; ON INIT ( NEW_COLOR1a(oWnd1), IIF( lPREVIEW = &#46;T&#46;, D_PREVIEW(oWnd1), NIL ) ) ; ON PAINT ( IIF( W_POS1 < 11&#46;and&#46; W_STYLE = 1, W_GRAD( hDC, oWnd1 ), NIL ), ; IIF( W_POS1 = 14, W_IMAGE( oWnd1 ), NIL ), ; IIF( W_POS1 > 10 &#46;and&#46; W_POS1 < 14, W_BRUSH( oWnd1 ), NIL ), ; IIF( !EMPTY( W_C_ALPHA ), ; ABPaint( hDC, W_L_ALPHA, W_T_ALPHA, oBmp1&#58;hBitmap, 220 ), NIL ) ) RETURN NIL // --------- ( 1 + 3 ) GRADIENT and COLORS -------------------------------------- // W_MOVE = Color-Gradient-Position // W_COLOR1 = 1&#46; Gradient-Color or Mono-Color // W_COLOR2 = 2&#46; Gradient-Color // W_STYLE = Horizontal or Vertical STATIC FUNCTION W_GRAD( hDC, oWnd1 ) local oNewbrush local aGrad &#58;= { { W_MOVE, W_COLOR1, W_COLOR2 }, ; { W_MOVE, W_COLOR2, W_COLOR1 } } IF W_STYLE = 1 IF W_DIRECT = 1 IF S_FWHVERS < 7&#46;09 DegradeW ( hDC, oWnd1 ) ENDIF IF S_FWHVERS >= 7&#46;09 &#46;and&#46; S_FWHVERS < 8&#46;07 Gradient( hDC, { 0, 0, oWnd1&#58;nHeight, oWnd1&#58;nWidth }, W_COLOR1, W_COLOR2, &#46;T&#46; ) ENDIF IF S_FWHVERS >= 8&#46;07 GradientFill( hDC, 0, 0, oWnd1&#58;nHeight, oWnd1&#58;nWidth, aGrad, &#46;T&#46; ) ENDIF ELSE IF S_FWHVERS < 7&#46;09 DegradeW ( hDC, oWnd1 ) ENDIF IF S_FWHVERS >= 7&#46;09 &#46;and&#46; S_FWHVERS < 8&#46;07 Gradient( hDC, { 0, 0, oWnd1&#58;nHeight, oWnd1&#58;nWidth }, W_COLOR1, W_COLOR2, &#46;F&#46; ) ENDIF IF S_FWHVERS >= 8&#46;07 GradientFill( hDC, 0, 0, oWnd1&#58;nHeight, oWnd1&#58;nWidth, aGrad, &#46;F&#46; ) ENDIF ENDIF ELSE DEFINE BRUSH oNewBrush COLOR W_COLOR1 SET BRUSH OF oWnd1 TO oNewBrush *FillRect( oWnd1&#58;hDC, 0, 0, oWnd1&#58;nHeight, oWnd1&#58;nWidth, oNewbrush&#58;hBrush ) RELEASE BRUSH oNewbrush ENDIF RETURN NIL //--------- ( 4 + 5 ) IMAGES and BMP-Brush ------------------------ STATIC FUNCTION W_IMAGE( oWnd1 ) LOCAL oImage1 // Selected Image // -------------------- cNEWLOGO &#58;= "&c_pfad\IMAGE\" + ALLTRIM(W_LOGO) // Brush // -------- IF W_LOGOTYP = "B" // Brush IF ! Empty( cNEWLOGO ) &#46;and&#46; File( "&cNEWLOGO" ) DEFINE BRUSH oImage1 FILE "&cNEWLOGO" SET BRUSH OF oWnd1 TO oImage1 ELSE MsgAlert("No file selected !","Attention" ) ENDIF ENDIF // Image // -------- IF W_LOGOTYP = "I" IF ! Empty( cNEWLOGO ) &#46;and&#46; File( "&cNEWLOGO" ) ScreenWidth &#58;= GetSysMetrics(0) ScreenHeight &#58;= GetSysMetrics(1) - 20 @ 0, 0 IMAGE oImage1 SIZE ScreenWidth,ScreenHeight OF oWnd1 ADJUST oImage1&#58;Progress( &#46;f&#46; ) oImage1&#58;LoadBmp( "&cNEWLOGO" ) ELSE MsgAlert("No file selected !","Attention" ) ENDIF ENDIF RETURN NIL //-------- ( 2 ) BRUSHES ------------------------- STATIC FUNCTION W_BRUSH( oWnd1 ) LOCAL oNewbrush IF W_POS1 = 11 DEFINE BRUSH oNewBrush STYLE ("BORLAND") ENDIF IF W_POS1 = 12 DEFINE BRUSH oNewBrush STYLE ("TILED") ENDIF IF W_POS1 = 13 DEFINE BRUSH oNewBrush STYLE ("BRICKS") ENDIF SET BRUSH OF oWnd1 TO oNewBrush RELEASE BRUSH oNewbrush RETURN NIL // ------ GRADIENT-Function for not supported FWH-Versions ------- STATIC FUNCTION DegradeD ( hDC, oDlg ) LOCAL nStep , nStepY LOCAL oBrush LOCAL i, r,g,b LOCAL r0,g0,b0 LOCAL r1, g1, b1 LOCAL rD, gD, bD LOCAL aRect &#58;= GETCLIENTRECT( oDlg&#58;hWnd ) nStep &#58;= ( aRect&#91; 3 &#93; - aRect&#91; 1 &#93; ) nStepY &#58;= ( aRect&#91; 3 &#93; - aRect&#91; 1 &#93; ) / nStep aRect&#91; 3 &#93; = aRect&#91; 1 &#93; + nStepY r0 &#58;= nRGBRed (D_COLOR1) g0 &#58;= nRGBGreen (D_COLOR1) b0 &#58;= nRGBBlue (D_COLOR1) r1 &#58;= nRGBRed (D_COLOR2) g1 &#58;= nRGBGreen (D_COLOR2) b1 &#58;= nRGBBlue (D_COLOR2) rD &#58;= r1-r0 gD &#58;= g1-g0 bD &#58;= b1-b0 r &#58;= 256*rD/Max(nStep,1) g &#58;= 256*gD/Max(nStep,1) b &#58;= 256*bD/Max(nStep,1) r0*=256 g0*=256 b0*=256 FOR i = 0 TO nStep-1 STEP nStepY r0 += r g0 += g b0 += b DEFINE BRUSH oBrush COLOR nRGB( r0/256, g0/256, b0/256 ) FILLRECT( hDC, aRect, oBrush&#58;hBrush ) RELEASE BRUSH oBrush aRect&#91; 1 &#93; += nStepY aRect&#91; 3 &#93; += nStepY NEXT RETURN (nil) [/code:wrgeecym] Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Backgrd.-Tests for Wind. Dialog a Alpha-BMP's ( download )
Hello, all tests are done. Here is the final result : All combinations are tested ( 20 are possible ) It is a nice overview, how to use the different functions. If You like, You can download the complete working-directory ( everything is included ) Download Version 1.0 / Jan 2009 : <!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/backgrdTest.zip">http://www.pflegeplus.com/fw_downloads/backgrdTest.zip</a><!-- m --> Some nice Windows 7 - wallpapers for testing : <!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/Windows7_wall.zip">http://www.pflegeplus.com/fw_downloads/ ... 7_wall.zip</a><!-- m --> [img:cuyxdzpn]http&#58;//www&#46;pflegeplus&#46;com/pictures/backtest1&#46;jpg[/img:cuyxdzpn] Preview on the next version : 2.0 / Jan 2009 [img:cuyxdzpn]http&#58;//www&#46;pflegeplus&#46;com/pictures/backtest2&#46;jpg[/img:cuyxdzpn] [code:cuyxdzpn] #include "fivewin&#46;ch" #include "xbrowse&#46;ch" #include "Image&#46;ch" STATIC S_FWHVERS &#58;= 8&#46;09 STATIC nARRAYPOS &#58;= 1 FUNCTION Main() local oDlg, oFont, oButton DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 SetBalloon( &#46;T&#46; ) // Balloon shape required for tooltips DEFINE DIALOG oDlg SIZE 362, 560 TITLE "Testing Windows- and Dialog-Backgrounds " PIXEL FONT oFont @ 255, 60 BUTTONBMP oButton ; SIZE 60, 20 ; ACTION oDlg&#58;End() OF oDlg ; FONT oFont PIXEL ; BITMAP "Quit&#46;bmp" ; PROMPT " Exit" TEXTRIGHT oButton&#58;cToolTip = { "Exit Background-Test","Background", 1, CLR_BLACK, 14089979 } ACTIVATE DIALOG oDlg CENTERED ; ON INIT DataBrowse( oDlg, oFont ) RELEASE FONT oFont RETURN NIL // ------------------------------------------------ FUNCTION DataBrowse( oDlg, oFont ) local oBrw, aData &#58;= {} AAdd( aData, { 1, 'Window', ' ', 'Gradient ' } ) AAdd( aData, { 2, 'Window', ' ', 'Color ' } ) AAdd( aData, { 3, 'Window', ' ', 'Image- Brush' } ) AAdd( aData, { 4, 'Window', ' ', 'Style- Brush' } ) AAdd( aData, { 5, 'Window', ' ', 'Image ' } ) AAdd( aData, { 6, 'Window', 'Alpha', 'Gradient ' } ) AAdd( aData, { 7, 'Window', 'Alpha', 'Color ' } ) AAdd( aData, { 8, 'Window', 'Alpha', 'Image- Brush' } ) AAdd( aData, { 9, 'Window', 'Alpha', 'Style- Brush' } ) AAdd( aData, { 10, 'Window', 'Alpha', 'Image ' } ) AAdd( aData, { 11, 'Dialog', ' ', 'Gradient ' } ) AAdd( aData, { 12, 'Dialog', ' ', 'Color ' } ) AAdd( aData, { 13, 'Dialog', ' ', 'Image- Brush' } ) AAdd( aData, { 14, 'Dialog', ' ', 'Style- Brush' } ) AAdd( aData, { 15, 'Dialog', ' ', 'Image ' } ) AAdd( aData, { 16, 'Dialog', 'Alpha', 'Gradient ' } ) AAdd( aData, { 17, 'Dialog', 'Alpha', 'Color ' } ) AAdd( aData, { 18, 'Dialog', 'Alpha', 'Image- Brush' } ) AAdd( aData, { 19, 'Dialog', 'Alpha', 'Style- Brush' } ) AAdd( aData, { 20, 'Dialog', 'Alpha', 'Image ' } ) oBrw &#58;= TXBrowse()&#58;New( oDlg ) oBrw&#58;SetArray( aData ) oBrw&#58;aCols&#91; 1 &#93;&#58;cHeader = Padr("No&#46;", 10) oBrw&#58;aCols&#91; 2 &#93;&#58;cHeader = Padr("Type", 11) oBrw&#58;aCols&#91; 3 &#93;&#58;cHeader = Padr("Alpha", 11) oBrw&#58;aCols&#91; 4 &#93;&#58;cHeader = Padr("Test", 18) oBrw&#58;nRecSelColor = 15512898 oBrw&#58;bClrSelFocus = { || { 16777215, 15512898 } } oBrw&#58;bClrSel = { || { 16777215, 15512898 } } // LostFocus oBrw&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLROWMS WITH OBJECT oBrw &#58;nTop &#58;= 10 &#58;nLeft &#58;= 20 &#58;nBottom &#58;= 500 &#58;nRight &#58;= 340 END oBrw&#58;bLClicked &#58;= { | nRow, nCol | nArrayPos &#58;= oBrw&#58;nRowSel, ; IIF( nArrayPos < 11, WINDOW(oFont), NIL ), ; IIF( nArrayPos > 10 , DIALOG(oFont), NIL ) } oBrw&#58;CreateFromCode() RETURN NIL // ------- WINDOW -------------------------- FUNCTION WINDOW(oFont) LOCAL oWnd1, hDC, oButton, oImage1, oBmp1, oBar1, oBtn2, oBtn3 // ---- Alpha-BMP ------- // --------------------------- DEFINE BITMAP oBmp1 FILENAME "A_LOGO&#46;BMP" DEFINE WINDOW oWnd1 TITLE "Background for Windows" // MDI MENU TMenu()&#58;New() // ImageBrush // ---------------- IF nArrayPos = 3 &#46;or&#46; nArrayPos = 8 WB_IMAGE( oWnd1 ) ENDIF @ 620, 800 BUTTONBMP oButton ; SIZE 120, 50 ; ACTION oWnd1&#58;End() OF oWnd1 ; FONT oFont PIXEL ; BITMAP "Quit&#46;bmp" ; PROMPT " Exit" TEXTRIGHT ACTIVATE WINDOW oWnd1 MAXIMIZED ; ON PAINT ( IIF( nArrayPos = 1 &#46;or&#46; nArrayPos = 6, W_GRAD( hDC, oWnd1 ), NIL ), ; // Gradient IIF( nArrayPos = 2 &#46;or&#46; nArrayPos = 7, W_COLOR( oWnd1 ), NIL ), ; // Color IIF( nArrayPos = 4 &#46;or&#46; nArrayPos = 9, W_BRUSH( oWnd1 ), NIL ), ; // Brush IIF( nArrayPos = 5 &#46;or&#46; nArrayPos = 10, WL_IMAGE( hDC, oWnd1 ), NIL ), ; // Image IIF( nArrayPos > 5 &#46;and&#46; nArrayPos < 11, W_ALPHA( hDC, oWnd1 ), NIL ) ) RETURN NIL // ---------- DIALOG - PREVIEW ------------------------------------- FUNCTION DIALOG(oFont) LOCAL oDlg5, oButton, oImage1, oBmp1 oProgFont1 &#58;= TFont()&#58;New("Arial", ,-14,&#46;F&#46;,&#46;F&#46; , , , ,&#46;F&#46; ) DEFINE DIALOG oDlg5 FROM 5, 5 TO 600, 800 TITLE "Dialog-Test" PIXEL ; FONT oProgFont1 @ 250, 320 BUTTONBMP oButton ; SIZE 60, 25 ; ACTION oDlg5&#58;End() OF oDlg5 ; FONT oFont PIXEL ; BITMAP "Quit&#46;bmp" ; PROMPT " Exit" TEXTRIGHT // Color // ------- IF nArrayPos = 12 &#46;or&#46; nArrayPos = 17 W_COLOR( oDlg5 ) ENDIF // ImageBrush // ---------------- IF nArrayPos = 13 &#46;or&#46; nArrayPos = 18 WB_IMAGE( oDlg5 ) ENDIF // Style-Brush IF nArrayPos = 14 &#46;or&#46; nArrayPos = 19 W_BRUSH( oDlg5 ) ENDIF ACTIVATE DIALOG oDlg5 CENTERED ; ON PAINT ( IIF( nArrayPos = 11 &#46;or&#46; nArrayPos = 16, W_GRAD( hDC, oDlg5 ), NIL ), ; // Gradient IIF( nArrayPos = 15 &#46;or&#46; nArrayPos = 20, WL_IMAGE( hDC, oDlg5 ), NIL ), ; // Image IIF( nArrayPos > 15, W_ALPHA( hDC, oDlg5 ), NIL ) ) oProgFont1&#58;End() RETURN( NIL ) // --------- GRADIENT -------------------------------------- STATIC FUNCTION W_GRAD( hDC, oWnd ) local oNewbrush // Gradient Blue / White // ---------------------------- local aGrad &#58;= { { 0&#46;50, 8388608, 16777215 }, ; { 0&#46;50, 16777215, 8388608 } } IF S_FWHVERS < 7&#46;09 DegradeW ( hDC, oWnd ) ENDIF IF S_FWHVERS >= 7&#46;09 &#46;and&#46; S_FWHVERS < 8&#46;07 Gradient( hDC, { 0, 0, oWnd&#58;nHeight, oWnd&#58;nWidth }, 8388608, 16777215, &#46;T&#46; ) ENDIF IF S_FWHVERS >= 8&#46;07 GradientFill( hDC, 0, 0, oWnd&#58;nHeight, oWnd&#58;nWidth, aGrad, &#46;T&#46; ) ENDIF RETURN NIL // --------- COLORS -------------------------------------- STATIC FUNCTION W_COLOR( oWnd ) local oNewbrush DEFINE BRUSH oNewBrush COLOR 8388608 // Blue SET BRUSH OF oWnd TO oNewBrush RELEASE BRUSH oNewbrush RETURN NIL //--------- IMAGE - LOGO ------------------------ STATIC FUNCTION WL_IMAGE( hDC, oWnd ) LOCAL oImage1 LOCAL nWidth &#58;= oWnd&#58;nWidth() LOCAL nHeight &#58;= oWnd&#58;nHeight() // Selected Image // -------------------- DEFINE IMAGE oImage1 FILENAME "FANTASY&#46;jpg" PalBmpDraw( hDC, 0, 0, oImage1&#58;hBitmap, , nWIDTH, nHEIGHT, , &#46;T&#46; ) RETURN NIL //--------- IMAGE - BRUSH ------------------------ STATIC FUNCTION WB_IMAGE( oWnd ) LOCAL oImage1 DEFINE BRUSH oImage1 FILE "FLOPPY&#46;bmp" SET BRUSH OF oWnd TO oImage1 RELEASE BRUSH oImage1 RETURN NIL //-------- STYLE- BRUSH ------------------------- STATIC FUNCTION W_BRUSH( oWnd ) LOCAL oNewbrush DEFINE BRUSH oNewBrush STYLE "BRICKS" SET BRUSH OF oWnd TO oNewBrush RELEASE BRUSH oNewbrush RETURN NIL // --------- ALPHA-BMP -------------------------------------- STATIC FUNCTION W_ALPHA( hDC, oWnd ) LOCAL oBmp1 DEFINE BITMAP oBmp1 FILENAME "A_LOGO&#46;BMP" ABPaint( hDC, 50, 50, oBmp1&#58;hBitmap, 220 ) RETURN NIL // ------------------------------------ STATIC FUNCTION DegradeW ( hDC, oWnd ) LOCAL nStep , nStepY LOCAL oBrush LOCAL i, r,g,b LOCAL r0,g0,b0 LOCAL r1, g1, b1 LOCAL rD, gD, bD LOCAL aRect &#58;= GETCLIENTRECT( oWnd&#58;hWnd ) nStep &#58;= ( aRect&#91; 3 &#93; - aRect&#91; 1 &#93; ) nStepY &#58;= ( aRect&#91; 3 &#93; - aRect&#91; 1 &#93; ) / nStep aRect&#91; 3 &#93; = aRect&#91; 1 &#93; + nStepY r0 &#58;= nRGBRed (8388608) // Blue g0 &#58;= nRGBGreen (8388608) b0 &#58;= nRGBBlue (8388608) r1 &#58;= nRGBRed (16777215) // White g1 &#58;= nRGBGreen (16777215) b1 &#58;= nRGBBlue (16777215) rD &#58;= r1-r0 gD &#58;= g1-g0 bD &#58;= b1-b0 r &#58;= 256*rD/Max(nStep,1) g &#58;= 256*gD/Max(nStep,1) b &#58;= 256*bD/Max(nStep,1) r0*=256 g0*=256 b0*=256 FOR i = 0 TO nStep-1 STEP nStepY r0 += r g0 += g b0 += b DEFINE BRUSH oBrush COLOR nRGB( r0/256, g0/256, b0/256 ) FILLRECT( hDC, aRect, oBrush&#58;hBrush ) RELEASE BRUSH oBrush aRect&#91; 1 &#93; += nStepY aRect&#91; 3 &#93; += nStepY NEXT RETURN (nil) [/code:cuyxdzpn] Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Background Color
Good morning guys, Saturday morning here and I curled up with a background color. How do I change this color to the same color of blue ribbon? NOTE: I use RIBBONBAR [img:1bmpdeu8]http&#58;//img812&#46;imageshack&#46;us/img812/1358/8pp5&#46;png[/img:1bmpdeu8]
Background Color
Up
Background Color
Arthur, Look for this code in tribbon.prg: [code=fw:19kj8v3p]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #00C800;">IF</span> l2013<br />&nbsp; &nbsp; &nbsp; nTopMargin &nbsp; &nbsp;:= <span style="color: #000000;">25</span><br />&nbsp; &nbsp; &nbsp; nClrPaneRB &nbsp; &nbsp;:= RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nClrBoxOut &nbsp; &nbsp;:= RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nClrBoxIn &nbsp; &nbsp; := RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nClrBoxSelOut := RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nClrBoxSelIn &nbsp;:= RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aGrad &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; aGradFld &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>| nOpt | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nOpt == ::<span style="color: #000000;">nStart</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">43</span>, <span style="color: #000000;">87</span>, <span style="color: #000000;">154</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">43</span>, <span style="color: #000000;">87</span>, <span style="color: #000000;">154</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; aGradHigh &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; aGradOver &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span></div>[/code:19kj8v3p] With the above colors for aGradFld it should be ok. Also you need to change this line in tribbon.prg line 813: aGradFld = Eval( ::aGradFld, nPrompt )
Background Color
thank you antonio, got it. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Background Processor
My update system runs every 3 hours. In Windows, I use this to control the intervals without a lot of CPU demand: DEFINE TIMER oTmr INTERVAL 900000 OF oWnd ; ACTION IF( ElapTime( cStart, Time()) >= "03:00:00", RunUpdater(), ) ACTIVATE TIMER oTmr Defining a timer requires a Window, so I simply replace it with a DO WHILE .t. loop. However, I only want it to process ElapTime( ) after the interval has passed. I was looking for the equivalent of the INTERVAL 900000 used in defining the timer, but don't exactly see one. The routine is built in xHarbour ( commercial ) and I am doing it as a non-GUI app. Any suggestions for a timer that won't constantly eat away at the CPU ? I thought about Seconds( ) but that is a pretty constant call. Trying to remember back to the old DOS days ... Thanks for your input. Tim
Background Processor
how about HB_idleSleep( <nTime> )
Background Processor
Is it specific to the application or generic to the os ?
Background Processor
[url:6q8cngcb]http&#58;//www&#46;harbourdoc&#46;com&#46;br/show&#46;asp?seek=t&key=hb_idleSleep()[/url:6q8cngcb]
Background Processor
You are satisfied with the functionality of Timer but the only objection to use is that it requires a Window to be activated. Probably because you want this in a program which does not do any screen i/o, eg: Service or a Scheduled Task. You can still use a window but activate it hidden, DEFINE WINDOW oWnd <other code> ACTIVATE WINDOW oWnd HIDDEN
Background Processor
OK ... so I built the .exe and it will execute. However, when I try to activate it as a service I get the error: [i:2ej9429r]Error 1053 Service did not respond in a timely fashion[/i:2ej9429r] So ... this brings us back to the request for a sample of code on how to build a program that acts as a service. What do I need to add to get past the error above ? Thanks.
Background checkboxes on xBrowse!? (Solved!)
Dear Antonio, When I use a column with the method setCheck, the image of the "checkbox" and the cursor of xBrowse are the same color! The background of the image of "checkbox" used must be always white. In version 8.04, I managed to fix that! In this version (8.10), I do can't! How do I fix it? [img:12eq9g8i]http&#58;//lh6&#46;ggpht&#46;com/_sT5-i02vGTY/SW-GNVbthWI/AAAAAAAAATU/D9SDr9p16tE/s800/imagem&#46;JPG[/img:12eq9g8i]
Background checkboxes on xBrowse!? (Solved!)
Dear friends! Nobody can help me?
Background checkboxes on xBrowse!? (Solved!)
Better explanation: Every time when I use checkboxes bitmaps, the fund (background area) them are the color of the cursor xBrowse and not white! The fund is the area inside the contour of the square to "draw" the checkbox If the color of cursor into my xbrowse is blue... the fund (background area) of my checkboxes bitmaps stay blue too.
Background checkboxes on xBrowse!? (Solved!)
Special thanks to Daniel Garcia!! Solved with this: This method: [code:27bb1yuh] METHOD PaintData( nRow, nCol, nHeight, lHighLite, lSelected, nOrder, nPaintRow ) CLASS TXBrwColumn &#46;&#46;&#46; if nBmpNo > 0 &#46;and&#46; nBmpNo <= Len( &#58;&#58;aBitmaps ) &#46;&#46;&#46; if lStretch nOldColor &#58;= SetBkColor( hDC, nRGB( 255, 255, 255 ) ) TransBmp( aBitmap&#91; BITMAP_HANDLE &#93;, aBitmap&#91; BITMAP_WIDTH &#93;, aBitmap&#91; BITMAP_HEIGHT &#93;,; aBitmap&#91; BITMAP_ZEROCLR &#93;, hDC, nRectCol, nRow, Min( nRectWidth,&#58;&#58;oBrw&#58;BrwWidth() - nRectCol - 4 ), ; nRectHeight - nRow ) SetBkColor( hDC, nOldcolor ) /* elseif ( lTransparent &#46;or&#46; lBrush ) &#46;and&#46; ! lHighLite nOldColor &#58;= SetBkColor( hDC, nRGB( 255, 255, 255 ) ) TransBmp( aBitmap&#91; BITMAP_HANDLE &#93;, aBitmap&#91; BITMAP_WIDTH &#93;, aBitmap&#91; BITMAP_HEIGHT &#93;,; aBitmap&#91; BITMAP_ZEROCLR &#93;, hDC, nBmpCol, nBmpRow, aBitmap&#91; BITMAP_WIDTH &#93;, ; aBitmap&#91; BITMAP_HEIGHT &#93; ) SetBkColor( hDC, nOldColor ) */ else PalBmpDraw( hDC, nBmpRow, nBmpCol,; aBitmap&#91; BITMAP_HANDLE &#93;,; aBitmap&#91; BITMAP_PALETTE &#93;,; aBitmap&#91; BITMAP_WIDTH &#93;,; aBitmap&#91; BITMAP_HEIGHT &#93;; ,, &#46;F&#46;, aColors&#91; 2 &#93; ) // changed the parameter lTransparent to &#46;F&#46; endif endif return nil [/code:27bb1yuh] The result: [img:27bb1yuh]http&#58;//lh6&#46;ggpht&#46;com/_sT5-i02vGTY/SXDq51_e8gI/AAAAAAAAAT0/c--v_DT7LpI/s800/image&#46;PNG[/img:27bb1yuh]
Background color of TSay
I noticed, that the background color of a say not to change!?
Background color of TSay
Günther, my test @ 22, 20 SAY oCSay[1] PROMPT "Window" SIZE 28,12 FONT oFontSys PIXEL oCSay[1]:SetColor( 0, 255 ) // original @ 20, 50 GET oCGet[1] VAR cGet[1] SIZE 80, 18 OF oDlg2 COLOR 0, nWColorB UPDATE ; BITMAP c_Path1 + "Help.bmp" PIXEL ; ACTION ( nWColorB := ChooseColor( nWColorB ), oCGet[1]:SetColor( , nWColorB ), ; oCSay[1]:SetColor( 0, nWColorB ), oCSay[1]:Refresh() ) // modified [img:sbqlci52]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Saytest1&#46;jpg[/img:sbqlci52] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Background color of TSay
Uwe, i have used [code=fw:25mm75j8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"xyz"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">255</span></div>[/code:25mm75j8] but no background-color of the SAY.
Background color of TSay
Günther, if the dialog is defined < transparent > the background-color of the say will be ignored if You need a mixture of color [b:1pdq524h]and[/b:1pdq524h] transparent use a normal dialog [quote:1pdq524h]REDEFINE SAY PROMPT "xyz" ID 100 OF oDlg COLOR 0,255[/quote:1pdq524h] REDEFINE SAY [color=#0000FF:1pdq524h][b:1pdq524h]oSay1[/b:1pdq524h][/color:1pdq524h] PROMPT "xyz" ID 100 OF oDlg oSay1:SetColor( 0, 255 ) // color or oSay1:lTransparent := .T. // transparent regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Background color of TSay
Thanks Uwe. I use [code=fw:fxpj5s40]<div class="fw" id="{CB}" style="font-family: monospace;">GRADIENT <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,color1, color2<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span></div>[/code:fxpj5s40] for the dialog. This seems also switch to transparent. Now i use a readonly-get without border.
Background color of TSay
[code=fw:2nc5s6oi]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg GRADIENT aGrad<br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lTransparent</span> := .f.<br />&nbsp;</div>[/code:2nc5s6oi]
Background color of the GET
Hi I need to change the background color of the GET field when hovering the mouse cursor. Is it possible to do this ?
Background color of the GET
Example? Regards, saludos.
Background color of the GET
Please try this: SetGetColorFocus( CLR_RED ) oGet:bMMoved := { || oGet:SetFocus() }
Background color of the GET
Thanks, it works!
Backgroundcolor header listbox
Hello,How can I define the backgroundcolor of the header in a listbox ?Thanks.Regards.
Backgroundcolor header listbox
oBrw:nClrBackHead := nColor