【vfp开源代码栏目提醒】:网学会员在vfp开源代码频道为大家收集整理了程序26.prg提供大家参考,希望对大家有所帮助!
form1=Createobject('myform')
form1.Height=300
form1.Width=500
form1.Show(1)
Read Events
Define Class myform As Form
Visible=.T.
BackColor=Rgb(128,255,0)
Caption='我的表单'
Left=20
Top=10
Height=255
Width=255
Add Object Com1 As CommandButton;
WITH Caption="确定",;
left=150,;
top=50,;
height=25,;
width=60
Add Object Com2 As CommandButton;
WITH Caption='取消',;
left=260,;
top=50,;
height=25,;
width=60
Procedure Click
=Messagebox('我的表单')
Endproc
Procedure Com1.Click
=Messagebox('Welcome')
Endproc
Procedure Com2.Click
=Messagebox('关闭')
Thisform.Release
Clear Events
Endproc
Enddefine