suhashegde,
The form doesn't actually become visible until it's first Activate. Try this and see if it helps.
if ( this.lFirstActivation )
this.lFirstActivation = .f.
endif
>Thanx for the advise.
>I put the codes into the click of the button and sloved it for now
>but incase if i need it to run soon after the init is over where should i place it?
>I mean it would run or atleast check for the presence of the window if placed in the click.
>
>I know click is the wrong place for it but dont know where to place it