Thanks but it doesn't work.
The main form launch a second form with the command TheView.OpenDoc but when the main form need to close the second form with the command TheView.close the main form closed itself. I think because it launch the close command. I think i need an object variable to handle the second form.