Off the top of my head.
Add the following Props/Methods to the form:
Properties:GridOrigTop
GridOrigLeft
GridOrigHeight
GridOrigWidth
GridMaxed
Method:ZoomGrid
with thisform
if .GridMaxed
.MyGrid.Top = .GridOrigTop
.MyGrid.Left = .GridOrigLeft
.MyGrid.Height = .GridOrigHeight
.MyGrid.Width = .GridOrigWidth
else
.MyGrid.Top = 0
.MyGrid.Left = 0
.MyGrid.Height = .Height
.MyGrid.Width = .Width
endif
.GridMaxed = not .GridMaxed
endwith
Now just call Thisform.ZoomGrid in the click event of the button.
Note: You may want to subtract a couples pixels from the form height and width and add a couple to the Top and left to make it look right.
hth
>Hi. VFP 7 user. How would I grow a grid to full-form size (by the user clicking on a button) and then shrink it back down to normal size (the same way).
>
>Thanks, Randy
Roi
'MCP' Visual FoxPro
In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!