intento crear el ejecutable, pero el dialogo no acepta la clausula TRANSPARENT. Parece que falta que subas el DIALOG.CH modificado
Ralph
Lima PERU
Fwh 24.07, xHb123_10193, MySQL 8.x, BCC 7.3
intento crear el ejecutable, pero el dialogo no acepta la clausula TRANSPARENT. Parece que falta que subas el DIALOG.CH modificado
Ralph
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
Richard :
TSradio isn't native control , right ?
Please send me that class at my email.
Regards.
BUEN TRABAJO
Otra cosa, en win98 sale error user32.dll
saludos
Patricio
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.
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
Se me olvidaba
Uso Harbour y FWH 2.7 Febrero
Gracias nuevamente.
Ruben Fernandez
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.
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.
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 )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
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?
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 !
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