求助:delphi2010编译出错

zhangting241 2010-06-09 04:03:58
unit PI_MonitorFormdes;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
dsgnintf,{DesignIntf,DesignEditors,} typinfo, menus;

type
TForm2000 = class(
TInterfacedObject, IFormDesigner)
private
{ Private declarations }
f_index, F_level : integer;
public
procedure GetPropEdit(Prop: TPropertyEditor);
procedure Modified;
function IsDesignMsg(Sender: TControl; var Message: TMessage): Boolean;
procedure Notification(AnObject: TPersistent; Operation: TOperation);
procedure PaintGrid;
procedure ValidateRename(AComponent: TComponent;
const CurName, NewName: string);
procedure GetSelections(const List: IDesignerSelections);
function MethodExists(const Name: string): Boolean;
procedure RenameMethod(const CurName, NewName: string);
procedure SelectComponent(Instance: TPersistent);

function CreateMethod(const Name: string; TypeData: PTypeData): TMethod;
function GetMethodName(const Method: TMethod): string;
procedure GetMethods(TypeData: PTypeData; Proc: TGetStrProc);
function GetPrivateDirectory: string;

procedure SetSelections(const List: IDesignerSelections);
procedure ShowMethod(const Name: string);
function UniqueName(const BaseName: string): string;
procedure GetComponentNames(TypeData: PTypeData; Proc: TGetStrProc);
function GetComponent(const Name: string): TComponent;
function GetComponentName(Component: TComponent): string;
function GetObject(const Name: string): TPersistent;
function GetObjectName(Instance: TPersistent): string;
procedure GetObjectNames(TypeData: PTypeData; Proc: TGetStrProc);

function MethodFromAncestor(const Method: TMethod): Boolean;
function CreateComponent(ComponentClass: TComponentClass; Parent: TComponent;
Left, Top, Width, Height: Integer): TComponent;
function IsComponentLinkable(Component: TComponent): Boolean;
procedure MakeComponentLinkable(Component: TComponent);
function GetRoot: TComponent;
procedure Revert(Instance: TPersistent; PropInfo: PPropInfo);
function GetIsDormant: Boolean;
function HasInterface: Boolean;
function HasInterfaceMember(const Name: string): Boolean;
procedure AddInterfaceMember(const MemberText: string);
procedure AddToInterface(InvKind: Integer; const Name: string; VT: Word; const TypeInfo: string);
procedure GetProjectModules(Proc: TGetModuleProc);
function GetAncestorDesigner: IFormDesigner;
function GetCustomForm: TCustomForm;
procedure SetCustomForm(Value: TCustomForm);
function GetIsControl:boolean;
procedure SetIsControl(value:boolean);
procedure test;
property insertindex : integer read F_index write F_index;
property insertlevel : integer read F_level write F_level;
{ Public declarations }
end;

var
Form2000: TForm2000;

implementation

uses PI_ObjInsp, eng2chn, PI_Monitor;

{R *.DFM}

procedure TForm2000.GetPropEdit(Prop: TPropertyEditor);
var i : integer;
str : string;
begin
with PI_ObjInspForm.PGrid do
begin
enabled := true;
if cells[0, RowCount - 1] = '' then visible := true
else RowCount := RowCount + 1;
for i := RowCount - 1 downto insertindex + 1 do
begin
cells[0, i] := cells[0, i - 1];
cells[1, i] := cells[1, i - 1];
objects[0, i] := objects[0, i - 1];
end;
str := format('%*s', [insertlevel, '']);

if (paSubProperties in Prop.GetAttributes) and
not(paValueList in Prop.GetAttributes) then
Cells[0, insertindex] := str + '+' + eng_chn(prop.getname)
else
Cells[0, insertindex] := str + ' ' + eng_chn(prop.getname);
Cells [1, insertindex] := Prop.GetValue ;
Objects[0, insertindex] := Prop;
insertindex := insertindex + 1;
PI_ObjInspForm.FormResize(PI_ObjInspForm);
end;
end;

function TForm2000.CreateMethod(const Name: string; TypeData: PTypeData): TMethod;
begin test end;
function TForm2000.GetMethodName(const Method: TMethod): string;
begin test end;
procedure TForm2000.GetMethods(TypeData: PTypeData; Proc: TGetStrProc);
begin test end;
function TForm2000.GetPrivateDirectory: string;
begin test end;

procedure TForm2000.GetSelections(const List: IDesignerSelections);
begin test end;

function TForm2000.MethodExists(const Name: string): Boolean;
begin test; result:=True;end;
procedure TForm2000.RenameMethod(const CurName, NewName: string);
begin test end;
procedure TForm2000.SelectComponent(Instance: TPersistent);
begin test end;
procedure TForm2000.SetSelections(const List: IDesignerSelections);
begin test end;
procedure TForm2000.ShowMethod(const Name: string);
begin test end;
function TForm2000.UniqueName(const BaseName: string): string;
begin test end;
procedure TForm2000.GetComponentNames(TypeData: PTypeData; Proc: TGetStrProc);
begin test end;
function TForm2000.GetComponentName(Component: TComponent): string;
begin test end;
function TForm2000.GetObjectName(Instance: TPersistent): string;
begin test end;

function TForm2000.GetComponent(const Name: string): TComponent;
begin test end;

function TForm2000.GetObject(const Name: string): TPersistent;
begin test end;
function TForm2000.CreateComponent(ComponentClass: TComponentClass; Parent: TComponent;
Left, Top, Width, Height: Integer): TComponent;
begin test end;
function TForm2000.GetRoot: TComponent;
begin test end;
function TForm2000.GetCustomForm: TCustomForm;
begin test;end;

procedure TForm2000.GetObjectNames(TypeData: PTypeData; Proc: TGetStrProc);
begin test end;
function TForm2000.MethodFromAncestor(const Method: TMethod): Boolean;
begin test; result:=True; end;
function TForm2000.IsComponentLinkable(Component: TComponent): Boolean;
begin test; result:=True; end;
procedure TForm2000.MakeComponentLinkable(Component: TComponent);
begin test end;
procedure TForm2000.Revert(Instance: TPersistent; PropInfo: PPropInfo);
begin test end;
function TForm2000.GetIsDormant: Boolean;
begin test; result:=True; end;
function TForm2000.HasInterface: Boolean;
begin test; Result:=True; end;
function TForm2000.HasInterfaceMember(const Name: string): Boolean;
begin test; Result:=True; end;
procedure TForm2000.AddInterfaceMember(const MemberText: string);
begin test end;
function TForm2000.IsDesignMsg(Sender: TControl; var Message: TMessage): Boolean;
begin test; Result:=True; end;
procedure TForm2000.Notification(AnObject: TPersistent; Operation: TOperation);
begin test end;
procedure TForm2000.PaintGrid;
begin test end;
procedure TForm2000.ValidateRename(AComponent: TComponent;
const CurName, NewName: string);
begin test end;

procedure TForm2000.Modified;
begin test end;

procedure TForm2000.AddToInterface(InvKind: Integer; const Name: string; VT: Word; const TypeInfo: string);
begin test end;
procedure TForm2000.GetProjectModules(Proc: TGetModuleProc);
begin test end;
procedure TForm2000.SetCustomForm(Value: TCustomForm);
begin test end;

function TForm2000.GetAncestorDesigner: IFormDesigner;
begin test end;
function TForm2000.GetIsControl:boolean;
begin test; Result:=True; end;
procedure TForm2000.SetIsControl(value:boolean);
begin test end;

procedure TForm2000.test;
begin
end;

initialization
Form2000:= TForm2000.create;
form2000._addref;

finalization
form2000._release;

end.






TForm2000 = class( 这一行报错:E2003 Undeclared identifier:'PaintmMenu'
PaintmMenu是Forms中的一个过程,在uses中已经包含了Forms,不知如何解决,请教各位,谢谢啦


...全文
129 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jekhn 2010-06-09
  • 打赏
  • 举报
回复
那应该就是D6转到D2010不兼容的问题了,既然没用就去掉呗
zhangting241 2010-06-09
  • 打赏
  • 举报
回复
PaintmMenu在unit PI_MonitorFormdes 都没使用,PaintmMenu是Forms中的,这个程序是用delphi6编的,现在在delphi2010上编译就报这个错
bdmh 2010-06-09
  • 打赏
  • 举报
回复
PaintmMenu来自哪里,是否引用了PaintmMenu所在的单元
2010哪有PaintmMenu方法

16,748

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧