Ventanas Transparentes

Postby ralph » Wed Feb 15, 2006 6:09 pm

intento crear el ejecutable, pero el dialogo no acepta la clausula TRANSPARENT. Parece que falta que subas el DIALOG.CH modificado

Ralph
User avatar
ralph
 
Posts: 70
Joined: Fri Nov 18, 2005 11:15 pm
Location: Lima - PERU

Postby Taiwan » Thu Feb 16, 2006 3:15 am

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
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Vikthor » Thu Feb 16, 2006 2:38 pm

Richard :

TSradio isn't native control , right ?

Please send me that class at my email.

Regards.
Vikthor
User avatar
Vikthor
 
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Postby Patricio Avalos Aguirre » Thu Feb 16, 2006 2:50 pm

BUEN TRABAJO

Otra cosa, en win98 sale error user32.dll

saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Vikthor » Thu Feb 16, 2006 3:30 pm

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.
Vikthor
User avatar
Vikthor
 
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Postby RuFer » Thu Feb 16, 2006 8:30 pm

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
User avatar
RuFer
 
Posts: 140
Joined: Sat Oct 08, 2005 5:16 pm
Location: Uruguay

Postby RuFer » Thu Feb 16, 2006 8:48 pm

Se me olvidaba

Uso Harbour y FWH 2.7 Febrero


Gracias nuevamente.

Ruben Fernandez
User avatar
RuFer
 
Posts: 140
Joined: Sat Oct 08, 2005 5:16 pm
Location: Uruguay

Postby RuFer » Thu Feb 16, 2006 11:39 pm

_ 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.
User avatar
RuFer
 
Posts: 140
Joined: Sat Oct 08, 2005 5:16 pm
Location: Uruguay

Postby RuFer » Fri Feb 17, 2006 12:34 am

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 _.
User avatar
RuFer
 
Posts: 140
Joined: Sat Oct 08, 2005 5:16 pm
Location: Uruguay

Postby goosfancito » Sun Feb 19, 2006 2:51 pm

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 )
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Postby RuFer » Sun Feb 19, 2006 4:05 pm

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
User avatar
RuFer
 
Posts: 140
Joined: Sat Oct 08, 2005 5:16 pm
Location: Uruguay

Postby goosfancito » Tue Feb 21, 2006 11:38 am

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?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Postby gibaf » Thu Sep 28, 2006 1:44 pm

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 !
gibaf
 
Posts: 15
Joined: Thu Sep 21, 2006 2:04 pm
Location: Brasil - Toledo - PR

Postby Rochinha » Wed Oct 04, 2006 1:24 pm

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
Rochinha
 
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 55 guests