【vfp开源代码栏目提醒】:网学会员为广大网友收集整理了,表单运行时的属性设置.prg,希望对大家有所帮助!
PUBLIC oMyForm
oMyForm=NEWOBJECT("form1")
oMyForm.Show
DEFINE CLASS form1 AS Form
ADD OBJECT Command1 AS CommandButton WITH ;
Name="Command1"
PROCEDURE Init
This.Command1.Top=(This.Height-This.Command1.Height)/2
This.Command1.Left=(This.Width-This.Command1.Width)/2
ENDPROC
PROCEDURE Resize &&在表单大小改变时重新计算按钮的位置
This.Command1.Top=(This.Height-This.Command1.Height)/2
This.Command1.Left=(This.Width-This.Command1.Width)/2
ENDPROC
ENDDEFINE