Pregunta: | 1754 - FORMULARIO TRANSPARENTE |
Autor: | Jaime Ramirez |
Ncesito insertar un componente ActiveX en una pagina WEB. Mi pregunta es: ¿ como hago para que el formalario sea transparente y solo me aprezca el boton? |
Respuesta: | edwin colon |
ahi te mando todo el codigo de poner el formulario transparente
************************************************************************************** var frmRegion, tempRegion: HRGN; i: Integer; Arect: TRect; begin frmRegion := 0; for I:= 0 to ControlCount - 1 do begin aRect := Controls[i].BoundsRect; OffsetRect( aRect, clientorigin.x - left, clientorigin.y - top ); tempRegion := CreateRectRgnIndirect( aRect ); if frmRegion = 0 then frmRegion := tempRegion else begin CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR ); DeleteObject( tempRegion ); end; end; tempregion := CreateRectRgn( 0, 0, Width, GetSystemMetrics( SM_CYCAPTION )+ GetSystemMetrics( SM_CYSIZEFRAME )+ GetSystemMetrics( SM_CYMENU ) * Ord(Menu <> Nil)); CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR ); DeleteObject( tempRegion ); SetWindowRgn( handle, frmRegion, true ); end; *************************************************************************** espero te funcione este codigo, creeme es sumamente efectivo. |
Respuesta: | Kiem |
te dare lo fundamental ok.
Pon tu Form estas propiedades: Color := clLime; TransparenColor := True; TransparenColor := clLime; Modifica estas propiedes y ejecuta y veras... Nota: Me avisas si Pincha Saludos Kiem |
Respuesta: | Mariano |
Una forma rapida es no barrar el background atrapando el mensaje con una funcion del tipo Procedure WMEraseBkgnd (Var Msg:TWMEraseBkGnd); Message WM_eraseBkGnd; Procedure TForm1.WMEraseBkgnd (Var Msg:TWMEraseBkGnd); begin Msg.Result := 1; end; |