试试这样可否:
****** test.prg ******
DECLARE LONG SystemParametersInfo IN User32 LONG, LONG, STRING@, LONG
of = CREATEOBJECT('Form1')
of.show(1)
RETURN
DEFINE CLASS form1 as form
ADD OBJECT cmd1 as commandbutton WITH top=10,left=10,caption="最大化"
PROCEDURE cmd1.Click
st = REPLICATE(0h00, 16)
SystemParametersInfo(0x0030, 0, @st, 0)
thisform.Left = CTOBIN(SUBSTR(st,1,4), "4RS")
thisform.Top = CTOBIN(SUBSTR(st,5,4), "4RS")
thisform.Width = CTOBIN(SUBSTR(st,9,4), "4RS")
thisform.Height = CTOBIN(SUBSTR(st,13,4), "4RS")
ENDPROC
ENDDEFINE