How can I create control eg a button on a form by pressing a button on another form?

I'm making a GUI editor for Powerbasic and the client form displays, and like in the VB IDE you click a botton and a button appears on that form, then I can click on the new button and drag it, resize it etc.

if I use Dim X as New CommandButton, how do I make it appear on form2 ???

Thanks