F
FlyIdeas
Unregistered / Unconfirmed
GUEST, unregistred user!
我的类代码如下:
unit iDateTimePicker;
interface
uses Classes, Controls, Windows;
type
TiMonthCanlendar=class(TCustomControl)
private
protected
procedure CreateParams(var Params: TCreateParams); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
end;
implementation
{ TiMonthCanlendar code beginning }
procedure TiMonthCanlendar.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
begin
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
end;
procedure TiMonthCanlendar.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style := WS_BORDER;
ExStyle := WS_EX_TOOLWINDOW;
AddBiDiModeExStyle(ExStyle);
WindowClass.Style := CS_SAVEBITS;
end;
end;
constructor TiMonthCanlendar.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Left := 1;
Top := 1;
Width := 100;
Height := 100;
end;
destructor TiMonthCanlendar.Destroy;
begin
inherited Destroy;
end;
{ TiMonthCanlendar code ending }
end.
为什么我在窗体上创建它的实例,连个影子都没有呢?
高手和我讲讲为什么?分可以多给的!
unit iDateTimePicker;
interface
uses Classes, Controls, Windows;
type
TiMonthCanlendar=class(TCustomControl)
private
protected
procedure CreateParams(var Params: TCreateParams); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
end;
implementation
{ TiMonthCanlendar code beginning }
procedure TiMonthCanlendar.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
begin
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
end;
procedure TiMonthCanlendar.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style := WS_BORDER;
ExStyle := WS_EX_TOOLWINDOW;
AddBiDiModeExStyle(ExStyle);
WindowClass.Style := CS_SAVEBITS;
end;
end;
constructor TiMonthCanlendar.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Left := 1;
Top := 1;
Width := 100;
Height := 100;
end;
destructor TiMonthCanlendar.Destroy;
begin
inherited Destroy;
end;
{ TiMonthCanlendar code ending }
end.
为什么我在窗体上创建它的实例,连个影子都没有呢?
高手和我讲讲为什么?分可以多给的!