**************************************************
PUBLIC zoomobj
zoomobj = CREATEOBJECT("zoomobjclass")
zoomobj.Show
DEFINE CLASS zoomobjclass AS form
Top = 0
Left = 0
Height = 348
Width = 375
DoCreate = .T.
Caption = "Form1"
olastmaxed = .F.
olastmaxedname = .F.
olastmaxedtop = .F.
olastmaxedleft = .F.
olastmaxedheight = .F.
olastmaxedwidth = .F.
czoombutton = .F.
Name = "Form1"
ADD OBJECT edit1 AS editbox WITH ;
Height = 133, ;
Left = 72, ;
Top = 36, ;
Width = 217, ;
Name = "Edit1"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 14, ;
Left = 266, ;
Height = 23, ;
Width = 25, ;
Caption = "+", ;
Name = "Command1"
ADD OBJECT command2 AS commandbutton WITH ;
Top = 0, ;
Left = 350, ;
Height = 20, ;
Width = 24, ;
Caption = "-", ;
Visible = .F., ;
Name = "Command2"
PROCEDURE command1.Click
*...First, save off the old values
Thisform.oLastMaxedName = ThisForm.edit1.Name
Thisform.oLastMaxedTop = ThisForm.edit1.Top
Thisform.oLastMaxedLeft = ThisForm.edit1.Left
Thisform.oLastMaxedHeight = ThisForm.edit1.Height
Thisform.oLastMaxedWidth = ThisForm.edit1.Width
ThisForm.cZoomButton = This.Name
*... zoom
ThisForm.edit1.Top = ThisForm.Top + 20
ThisForm.edit1.Left = ThisForm.Left
ThisForm.edit1.Height = ThisForm.Height - 20
ThisForm.edit1.Width = ThisForm.Width - 10
This.Visible = .F.
ThisForm.command2.Visible = .T.
RETURN
ENDPROC
PROCEDURE command2.Click
*...Restore
STORE ThisForm.oLastMaxedName TO oCurObj
WITH ThisForm
.&oCurObj..Top = Thisform.oLastMaxedTop
.&oCurObj..Left = Thisform.oLastMaxedLeft
.&oCurObj..Height = Thisform.oLastMaxedHeight
.&oCurObj..Width = Thisform.oLastMaxedWidth
ENDWITH
STORE ThisForm.cZoomButton TO cLastButton
ThisForm.&cLastButton..Visible = .t.
This.Visible = .F.
RETURN
ENDPROC
ENDDEFINE
**************************************************