if Boolean(GetClassName(hWnd, aName, 256)) then Label2.Caption := 'ClassName : ' + string(aName) else Label2.Caption := 'ClassName : not found';