Suhas-
>I want to display a window through define window.
>If i put these codes in the click on the button it appears fine but if in the init of the form it displays different. Why and where should i place it?
While it's true that the form doesn't ordinarily become visible until the Activate() as David says, you
can set it yourself. So you might try adding
ThisForm.Visible = .T.
before your ObjToClient code.