已经试了这两种方法,但是不行:
1.修改bdmode为bdrighttoleft
2.使用
procedure TForm1.FormCreate(Sender: TObject);
begin
SetWindowLong(Edit1.Handle, GWL_STYLE, GetWindowLong(Edit1.Handle, GWL_STYLE) or ES_RIGHT);
Edit1.Invalidate;
end;dephiedit
1.修改bdmode为bdrighttoleft
2.使用
procedure TForm1.FormCreate(Sender: TObject);
begin
SetWindowLong(Edit1.Handle, GWL_STYLE, GetWindowLong(Edit1.Handle, GWL_STYLE) or ES_RIGHT);
Edit1.Invalidate;
end;dephiedit
var
chargerstyle:integer;
begin
chargerstyle:=GetWindowLong(Edit1.Handle,GWL_STYLE);
chargerstyle:=chargerstyle and(not ES_LEFT)and(not ES_CENTER)or ES_RIGHT;
SetWindowLong(Edit1.Handle,GWL_STYLE,chargerstyle);
end;