Alessio,
>I want to do that at runtime David
Kevin showed you how to create a page class and add it at runtime, is that what you need? This does require that at development time you can fully define your page and the code you want on it. Otherwise depending on the version of VFP you have there are other ways to build and compile the page class at runtime.