Page 1 of 1

PostPosted: Wed Feb 15, 2006 6:09 pm
by ralph
intento crear el ejecutable, pero el dialogo no acepta la clausula TRANSPARENT. Parece que falta que subas el DIALOG.CH modificado

Ralph

PostPosted: Thu Feb 16, 2006 3:15 am
by Taiwan
Hello Vikthor,

Your solution work fine with Dialog.
But I test if your Dialog use TSRadio class,
you will get error message.

>>Error description: Error BASE/1083 Argument error: *
>>Called from TSRADIO:DRAWLINE(427)
>>Called from TSRADIO:PAINT(700)
>>Called from (b)TSRADIO(61)
>>Called from TSRADIO:DISPLAY(0)
>>Called from TSRADIO:HANDLEEVENT(1242)

Regards,

Richard

PostPosted: Thu Feb 16, 2006 2:38 pm
by Vikthor
Richard :

TSradio isn't native control , right ?

Please send me that class at my email.

Regards.

PostPosted: Thu Feb 16, 2006 2:50 pm
by Patricio Avalos Aguirre
BUEN TRABAJO

Otra cosa, en win98 sale error user32.dll

saludos
Patricio

PostPosted: Thu Feb 16, 2006 3:30 pm
by Vikthor
Efectivamente, en Win98 se obtiene ese error, y se debe al API de Windows.

La forma de solucionarlo es revisando el SO instalado en la PC y dependiendo del SO activar la propiedad de la transparencia.

PostPosted: Thu Feb 16, 2006 8:30 pm
by RuFer
Alguna ayuda de como hacer el dialogo
transparente con este codigo?



DEFINE FONT oFont NAME "Arial" SIZE 0,-12 bold

DEFINE BRUSH oBrush RESOURCE "fondox"
// Fondox tiene el bmp de _


DEFINE DIALOG oDlg RESOURCE "Test" BRUSH oBrush TRANSPARENT


REDEFINE CHECKBOX oCbx1 VAR lOk1 ID 110 OF oDlg

REDEFINE GET oGet Var cNombre ID 120 Of oDlg

REDEFINE BUTTON oBoton1 ID 330 PROMPT "Salir" ;
OF oDlg CANCEL ACTION (oDlg:End() )

ACTIVATE DIALOG oDlg CENTERED
oBrush:End()
oFont:End()

return nil

Muchas gracias.

Ruben Fernandez

PostPosted: Thu Feb 16, 2006 8:48 pm
by RuFer
Se me olvidaba

Uso Harbour y FWH 2.7 Febrero


Gracias nuevamente.

Ruben Fernandez

PostPosted: Thu Feb 16, 2006 11:39 pm
by RuFer
_ has sido muy amable...

pero tengo problemas en compilar esta funcion

FUNCTION TranspColor( oWnd, nRGB )

La linea que sigue no9 m,e compila
SetWindowLong( oWnd:hWnd, GWL_EXSTYLE, GetWindowLong(
oWnd:hWnd, GWL_EXSTYLE ) | WS_EX_LAYERED )
me da error Parse error at "|" ---Es la barrita

SetLayeredWindowAttributes( oWnd:hWnd, nRgb, 0, LWA_COLORKEY )
RETURN NIL

Uso Harbour y FWH 2.7 Febrero

Saludos y gracias nuevamente.

Ruben Fernandez.
La verdad I M P O N E N T E.

PostPosted: Fri Feb 17, 2006 12:34 am
by RuFer
Para Harbour deben usar esta funcion...

Gracias a _ por toda su atencion...


FUNCTION TranspColor( oWnd, nRGB )
SetWindowLong( oWnd:hWnd, GWL_EXSTYLE, nOr( GetWindowLong( oWnd:hWnd, GWL_EXSTYLE ), WS_EX_LAYERED ) )
SetLayeredWindowAttributes( oWnd:hWnd, nRgb, 0, LWA_COLORKEY )
RETURN NIL


Saludos
Ruben Fernandez
Gracias _.

PostPosted: Sun Feb 19, 2006 2:51 pm
by goosfancito
Hola,

Viktor podrĂ­as decirme donde tengo que poner esas lineas que decis para que todos los controles esten transparentes?

Luego, tengo que recompilar la lib?

Code: Select all  Expand view
METHOD Initiate( hWndFocus, hWnd ) CLASS TDialog

   local lFocus := .t., lResult, hCtrl, lEnd := .f., aRect

   if hWnd != nil
      ::hWnd = hWnd
   endif

      SetWindowLong( ::hWnd, GWL_EXSTYLE,;
         WS_BORDER )

      SetWindowLong( ::hWnd, GWL_EXSTYLE ,;
         WS_EX_LAYERED    ) //|                 ;
*         WS_EX_TOOLWINDOW |                 ;
*         WS_EX_NOACTIVATE |                 ;
*         WS_EX_TOPMOST    |                 ;
*         WS_EX_APPWINDOW )

      SetLayeredWindowAttributes( ::hWnd, 0  , ( 255 * 90 ) / 100, LWA_ALPHA )

PostPosted: Sun Feb 19, 2006 4:05 pm
by RuFer
Goosfancito:

Tienes que buscar el Dialog.prg, y en el metodo
initiate que muestra Viktor comentas las lineas como
el lo hizo y agregas la linea
SetLayeredWindowAttributes...

Saludos

Ruben Fernandez

PostPosted: Tue Feb 21, 2006 11:38 am
by goosfancito
amigos,

Gracias por su contestacion, ahora bien, pregunto ya para las futuras modificaciones que tenga que hacer... una vez que tengo modificada la clase tdialog, y quiero volver a generar la lib, lo puedo hacer tranquilamente? o tengo que tener ciertos cuidados?

PostPosted: Thu Sep 28, 2006 1:44 pm
by gibaf
I am needing to make TREE (TTreeView) trasnparente, will be that nao has as to use one of the resources commented in this topico?

Thanks !

PostPosted: Wed Oct 04, 2006 1:24 pm
by Rochinha
Amiguinho

Try this:

FUNCTION TranspColor( oWnd, nRGB )
SetWindowLong( oWnd:hWnd, GWL_EXSTYLE, WS_BORDER )
SetWindowLong( oWnd:hWnd, GWL_EXSTYLE, WS_EX_LAYERED )
SetLayeredWindowAttributes( oWnd:hWnd, nRgb, 0, LWA_COLORKEY )
RETURN NIL