델파이

클래스명 string으로 해당 클래스 호출하기

newkie 2015. 9. 8. 13:47

var

fnm: String;

i: Integer;

tmpForm: TCommonCustomForm;

begin

tmpForm := nil;

for i :=0 to Screen.FormCount -1 do

begin

if Screen.Forms[i].Name = fnm then

begin

tmpForm := Screen.Forms[i];

break;

end;

end;

if tmpForm <> nil then

begin

tmpForm.Show;

end

else

begin

showMessage('No Class');

end;

end;