You probably need to see what is there in DoModal() - If you have overridden it or if you have something in the class which you have missed to initialize.