* MYPROG.PRG PUBLIC X * for this test, we have to scope the *main* form * otherwise *it* would go away when you closed this PRG * you see that, right? * if not we will continue discussing this x = CREATEOBJECT("myform") x.show() && your main form DEFINE CLASS myform as Form ADD OBJECT mybutton as commandbutton PROCEDURE init WITH THIS.mybutton .top = 50 .left = 50 .caption = "Drink me" ENDWITH PROCEDURE MyButton.Click y = CREATEOBJECT("form") * doesn't matter what's in it: y.addobject("y1","label") y.caption = "my modal form" y.autocenter = .T. y.y1.caption = "something" y.y1.visible = .t. y.show(1) && modal ENDPROC ENDDEFINE