http://expert.csdn.net/Expert/topic/1337/1337709.xml?temp=.6562311
这个贴子怎么就没人给点有价值的意见哪!就会up!up!也不知道up在这当什么讲!
这个贴子怎么就没人给点有价值的意见哪!就会up!up!也不知道up在这当什么讲!
解决方案 »
- delphi 调用自己写的dll还有什么方式?除了load..和external
- 怎么拖动dbgrideh到treeview中
- xp显示正常.2000下变大(附图说明)
- 图片显示问题:怎样将从sql2000中读出的图片按照界面image的控件同样大小尺寸显示出来?
- 谁有调试动态数组invalid pointer错误的经验啊?,大家进来帮忙看看啊
- 请教一个关于动态库返回值得问题?
- 急,解决了就给分
- 如何改变Label Disabled时的字体颜色?
- 打印问题。。。。急急急
- 怎样在delphi程序中显示word格式文件
- 在客户端运行出错!请高手帮忙啊!快哦!100分相送!
- 请问怎么得到别人机器的注册表中的信息?
URL http://www.hktk.com:8080/cgi-bin/dl.pl?url=ftp://ftp.cq.hktk.com/soft/soft_con_image/PICSHOW25.ZIP引用页 http://software.chinese.com/soft/soft_con_image/picshow_2.html
好心人去下一个研究研究!
// Updates controls by PicShow properties
Style.MaxValue := High(TShowStyle);
Style.Value := PicShow.Style;
Threaded.Checked := PicShow.Threaded;
Step.Value := PicShow.Step;
Delay.Value := PicShow.Delay;
ManualStyle.Checked := PicShow.Manual;PicShow 类没有实例可以这样用吗 ? var
k : TPicShow ; K := TPicShow.Create ;楼主写得挺好的,别的还没有看到
type
TGetPropEditProc = procedure (Editor: TPropertyEditor) of object;
type
TGetPropEditProc = procedure (Editor: TPropertyEditor) of object;
可以通过但是到了
GetComponentProperties(List, [tkClass], Designer, Proc);这个函数就又会有相同的问题了!
Windows, Classes, {$IFDEF DELPHI6_UP} DesignIntf, DesignEditors {$ELSE} DsgnIntf {$ENDIF};type {$IFDEF DELPHI6_UP}
TGetPropEditProc = procedure(const Prop: IProperty) of object;
{$ENDIF}{ TPicShowComponentEditor } TPicShowComponentEditor = class(TComponentEditor)
protected
procedure CallPropertyEditor(Proc: TGetPropEditProc);
{$IFDEF DELPHI6_UP}
procedure PictureEditor(const Prop: IProperty);
procedure BackgroundEditor(const Prop: IProperty);
{$ELSE}
procedure PictureEditor(Prop: TPropertyEditor);
procedure BackgroundEditor(Prop: TPropertyEditor);
{$ENDIF}
public
function GetVerbCount: Integer; override;
function GetVerb(Index: Integer): string; override;
procedure ExecuteVerb(Index: Integer); override;
procedure Edit; override;
end;{ TStyleNamePropertyEditor } TStyleNamePropertyEditor = class(TEnumProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValues(Proc: TGetStrProc); override;
function GetValue: string; override;
procedure SetValue(const Value: string); override;
end;{ TAboutPropertyEditor } TAboutPropertyEditor = class(TStringProperty)
public
procedure Edit; override;
function GetValue: string; override;
function GetAttributes: TPropertyAttributes; override;
end;procedure Register;implementationuses
PicShow, TypInfo, Dialogs;procedure ShowAboutBox(const ClassName: String);
const
AboutStr = ' v2.812' + #10#13
+ 'Copyright(C) 1999-2002 Kambiz R. Khojasteh' + #10#13
+ 'All rights reserved.' + #10#13
+ #10#13
+ '[email protected]' + #10#13
+ 'http://www.delphiarea.com';
begin
MessageDlg(ClassName + AboutStr, mtInformation, [mbOK], 0);
end;{ TPicShowComponentEditor }function TPicShowComponentEditor.GetVerbCount: Integer;
begin
Result := 7;
end;function TPicShowComponentEditor.GetVerb(Index: Integer): string;
begin
case Index of
0: Result := 'About ' + Component.ClassName + '...';
1: Result := '-';
2: Result := 'Picture Editor...';
3: Result := 'Background Editor...';
4: Result := '-';
5: if TCustomPicShow(Component).Busy then
Result := 'Stop Transition'
else
Result := 'Start Transition';
6: if TCustomPicShow(Component).Busy then
Result := 'Can''t Clear Screen'
else
Result := 'Clear Screen';
else
Result := '';
end;
end;procedure TPicShowComponentEditor.ExecuteVerb(Index: Integer);
begin
case Index of
0: ShowAboutBox(Component.ClassName);
1: {Nothing to do};
2: CallPropertyEditor(PictureEditor);
3: CallPropertyEditor(BackgroundEditor);
4: {Nothing to do};
5: if TCustomPicShow(Component).Busy then
TCustomPicShow(Component).Stop
else
TCustomPicShow(Component).Execute;
6: if not TCustomPicShow(Component).Busy then
TCustomPicShow(Component).Clear;
else
inherited ExecuteVerb(Index);
end;
end;procedure TPicShowComponentEditor.Edit;
begin
ExecuteVerb(2);
end;procedure TPicShowComponentEditor.CallPropertyEditor(Proc: TGetPropEditProc);
var
{$IFDEF DELPHI6_UP}
List: IDesignerSelections;
{$ELSE}
{$IFDEF DELPHI5_UP}
List: TDesignerSelectionList;
{$ELSE}
List: TComponentList;
{$ENDIF}
{$ENDIF}
begin
{$IFDEF DELPHI6_UP}
List := TDesignerSelections.Create;
{$ELSE}
{$IFDEF DELPHI5_UP}
List := TDesignerSelectionList.Create;
{$ELSE}
List := TComponentList.Create;
{$ENDIF}
{$ENDIF}
try
List.Add(Component);
GetComponentProperties(List, [tkClass], Designer, Proc);
finally
{$IFNDEF DELPHI6_UP}
List.Free;
{$ENDIF}
end;
end;{$IFDEF DELPHI6_UP}
procedure TPicShowComponentEditor.PictureEditor(const Prop: IProperty);
{$ELSE}
procedure TPicShowComponentEditor.PictureEditor(Prop: TPropertyEditor);
{$ENDIF}
begin
if Prop.GetName = 'Picture' then
Prop.Edit;
end;{$IFDEF DELPHI6_UP}
procedure TPicShowComponentEditor.BackgroundEditor(const Prop: IProperty);
{$ELSE}
procedure TPicShowComponentEditor.BackgroundEditor(Prop: TPropertyEditor);
{$ENDIF}
begin
if Prop.GetName = 'BgPicture' then
Prop.Edit;
end;{ TStyleNamePropertyEditor }function TStyleNamePropertyEditor.GetAttributes: TPropertyAttributes;
begin
Result := [paMultiSelect, paValueList, paSortList, paRevertable];
end;procedure TStyleNamePropertyEditor.GetValues(Proc: TGetStrProc);
var
Style: TShowStyle;
begin
for Style := Low(TShowStyle) to High(TShowStyle) do
Proc(PSTransitionNames[Style]);
end;function TStyleNamePropertyEditor.GetValue: string;
begin
Result := GetStrValue;
end;procedure TStyleNamePropertyEditor.SetValue(const Value: string);
begin
SetStrValue(Value);
end;{ TAboutPropertyEditor }function TAboutPropertyEditor.GetAttributes: TPropertyAttributes;
begin
Result := [paDialog, paReadOnly, paMultiSelect];
end;function TAboutPropertyEditor.GetValue: string;
begin
Result := '(About)'
end;procedure TAboutPropertyEditor.Edit;
begin
ShowAboutBox(GetComponent(0).ClassName);
end;procedure Register;
begin
RegisterComponents('Delphi Area', [TPicShow, TDBPicShow]);
RegisterComponentEditor(TPicShow, TPicShowComponentEditor);
RegisterPropertyEditor(TypeInfo(String), TCustomPicShow, 'StyleName', TStyleNamePropertyEditor);
RegisterPropertyEditor(TypeInfo(TAbout), TCustomPicShow, 'About', TAboutPropertyEditor);
end;end.