Duplicated component is invisible

I have tried ‘StaticDuplicateObjectEx()’, ‘StaticDuplicateObject()’ and ‘DuplicateObject()’ functions and all these functions give same results.