FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Ventanas Transparentes
Posts: 92
Joined: Fri Nov 18, 2005 11:15 PM
Ventanas Transparentes
Posted: Wed Feb 15, 2006 06:09 PM

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

Ralph

Ralph del Castillo

Lima PERU

Fwh 24.07, xHb123_10193, MySQL 8.x, BCC 7.3
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
Ventanas Transparentes
Posted: Thu Feb 16, 2006 03: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

Posts: 298
Joined: Fri Oct 07, 2005 05:20 AM
Ventanas Transparentes
Posted: Thu Feb 16, 2006 02:38 PM

Richard :

TSradio isn't native control , right ?

Please send me that class at my email.

Regards.

Vikthor
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Ventanas Transparentes
Posted: Thu Feb 16, 2006 02:50 PM

BUEN TRABAJO

Otra cosa, en win98 sale error user32.dll

saludos
Patricio

Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 298
Joined: Fri Oct 07, 2005 05:20 AM
Ventanas Transparentes
Posted: Thu Feb 16, 2006 03: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
Posts: 140
Joined: Sat Oct 08, 2005 05:16 PM
Ventanas Transparentes
Posted: Thu Feb 16, 2006 08: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 oskar

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

Rubén D. Fernández

Maldonado-Uruguay
Posts: 140
Joined: Sat Oct 08, 2005 05:16 PM
Ventanas Transparentes
Posted: Thu Feb 16, 2006 08:48 PM

Se me olvidaba

Uso Harbour y FWH 2.7 Febrero

Gracias nuevamente.

Ruben Fernandez

Rubén D. Fernández

Maldonado-Uruguay
Posts: 140
Joined: Sat Oct 08, 2005 05:16 PM
Ventanas Transparentes
Posted: Thu Feb 16, 2006 11:39 PM

oskar 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.

Rubén D. Fernández

Maldonado-Uruguay
Posts: 140
Joined: Sat Oct 08, 2005 05:16 PM
Ventanas Transparentes
Posted: Fri Feb 17, 2006 12:34 AM

Para Harbour deben usar esta funcion...

Gracias a Oskar 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 Oskar.

Rubén D. Fernández

Maldonado-Uruguay
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Ventanas Transparentes
Posted: Sun Feb 19, 2006 02: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?

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/
Posts: 140
Joined: Sat Oct 08, 2005 05:16 PM
Ventanas Transparentes
Posted: Sun Feb 19, 2006 04: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

Rubén D. Fernández

Maldonado-Uruguay
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Ventanas Transparentes
Posted: 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/
Posts: 15
Joined: Thu Sep 21, 2006 02:04 PM
Ventanas Transparentes
Posted: Thu Sep 28, 2006 01: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 !

Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
Ventanas Transparentes
Posted: Wed Oct 04, 2006 01: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

Continue the discussion