begin
{ make sure the classes are registered so that GetClass will work -- }
{ Usually, this goes in the initialization section where it is only executed once }
RegisterClasses([TIcon, TBitmap, TJPEGImage, TMetafile]);
Edit1.Text := GraphicExtension(TGraphicClass(GetClass(Edit2.Text)));
end;
----------------