set procedure to pis3
THISFORM.ADDOBJECT('newbt2','newbt')
THISFORM.newbt2.CAPTION='newbt'
THISFORM.newbt2.TOP=100
THISFORM.newbt2.LEFT=100
THISFORM.newbt2.HEIGHT=25
thisform.newbt2.visible=.t.
在pis3.prg文件中
DEFINE CLASS newbt AS CommandButton
PROCEDURE Click
= MESSAGEBOX('MyForm has been clicked!')
ENDPROC