⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 findform.pas

📁 Delphi高级开发指南是开发程序的好帮手
💻 PAS
字号:
unit FindForm;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    ListBox1: TListBox;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

uses
  FindGlob, DsgnIntf;

procedure TForm1.Button1Click(Sender: TObject);
var
  I: Integer;
  Comp: TComponent;
  List: TComponentList;
begin
  ListBox1.Items.Clear;
  List := TComponentList.Create;
  try
    if not FindGlobalComp (Edit1.Text, List) then
      ListBox1.Items.Add ('No components found')
    else
      for I := 0 to List.Count - 1 do
      begin
        Comp := List.Items[I] as TComponent;
        ListBox1.Items.Add (Format (
          '%s (%s): %s (%s)',
          [Comp.Name, Comp.ClassName,
          Comp.Owner.Name, Comp.Owner.ClassName]));
      end;
  finally
    List.Free;
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -