Link to home
Start Free TrialLog in
Avatar of jbas
jbas

asked on

how can i let the Tedit transparent?

hi,experts:
  i need a transparent edit,who can help me?thanks!
Avatar of jbas
jbas

ASKER

this is my code,but when i keydown it ,it not transparent.
i try to head off the wm_paint,WM_ERASEBKGND message but it not well either,help me!
thanks!
unit TransEdit;

interface

uses
  Windows, Messages, SysUtils, Classes, Controls, StdCtrls;

type
  TTransEdit = class(TEdit)
  private
    { Private declarations }
  protected
    { Protected declarations }
  procedure createparams(Var Params:TCreateParams);override;
  public
    { Public declarations }
  published
    { Published declarations }
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Samples', [TTransEdit]);
end;

{ TTransEdit }

procedure TTransEdit.createparams(var Params: TCreateParams);
begin
  inherited createparams(Params);
  params.ExStyle:=params.ExStyle or  WS_EX_TRANSPARENT;
  invalidate;
end;

end.
ASKER CERTIFIED SOLUTION
Avatar of Cesario Lababidi
Cesario Lababidi
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jbas

ASKER

Cesario:
 thanks,i try the vcl,it's ok but it have some small problem,i will change it.can you tell me other vcl?
 thanks!
Avatar of jbas

ASKER

how can i let the form transparent,but not let the edit transparent,the edit on the form!thanks!
Avatar of jbas

ASKER

Cesario ,
 hi,very happy to see you answer!
sorry,my english is poor.
  i want let the form transparent(this is finished), and not let the edit transparent where the edit on the form!
     
  form:transparent,but on the form's edit not transparent,how can i do?
 my email:jbas@163.com

       thanks!
Avatar of jbas

ASKER

thanks to Cesario !
    if your have some advice about my problem please let me know,my email:jbas@163.com
    thanks!