unit InfoForm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Spin, ComCtrls, ExtCtrls, Mask, Buttons, StdCtrls;
type
TForm1 = class(TForm)
ListBox1: TListBox;
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Label3: TLabel;
Shape1: TShape;
Label4: TLabel;
Edit2: TEdit;
Memo1: TMemo;
Button1: TButton;
CheckBox1: TCheckBox;
RadioButton1: TRadioButton;
ListBox2: TListBox;
ComboBox1: TComboBox;
ScrollBar1: TScrollBar;
GroupBox1: TGroupBox;
RadioGroup1: TRadioGroup;
Panel1: TPanel;
BitBtn1: TBitBtn;
MaskEdit1: TMaskEdit;
Image1: TImage;
Shape2: TShape;
ScrollBox1: TScrollBox;
TrackBar1: TTrackBar;
HeaderControl1: THeaderControl;
SpinEdit1: TSpinEdit;
procedure Shape1DragDrop(Sender, Source: TObject; X, Y: Integer);
procedure Shape1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Shape1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept := True;
end;
procedure TForm1.Shape1DragDrop(Sender, Source: TObject; X, Y: Integer);
var
MyClass: TClass;
begin
Edit1.Text := Format ('Name: %s - Size: %d bytes',
[Source.ClassName, Source.InstanceSize]);
MyClass := Source.ClassType;
with Listbox1.Items do
begin
Clear;
while MyClass.ClassParent <> nil do
begin
MyClass := MyClass.ClassParent;
Add (MyClass.ClassName);
end;
end;
end;
end.
|