Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form and Controls resize
Message
 
To
19/07/2006 15:33:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01137804
Message ID:
01138200
Views:
14
>I don't remember if I dreamt this or I actually did it, but I remember something about a way to have a form with controls and resize them as dragging the form’s handle.
>
>This is the problem: I have a form with pageframe, grids, buttons....
>I need to be able to resize the form to fill the screen according to user's monitor resolution OR, just have the user drag to reside the form (still don’t know which one they’ll want)
>
>Can anybody point me on the right direction please?
>
>thanks

In this sample, the "p" is a name for a "PageFrame". One of the pages (Page 1) has an editbox.
PROCEDURE frmViews_Resize(oform)
oform.p.Width=oform.Width
oform.p.Height=oform.height
Views_Editsize(oform.P.Page1.edit1)
FOR nPage=2 TO oform.p.PageCount
oPage=oform.p.Pages(nPage)
Views_Gridsize(oPage.Grid1)
ENDFOR
oform.p.Pages(oform.p.ActivePage).refresh
ENDPROC &&Views_Resize(oform)

PROCEDURE Views_Gridsize(oGrid)
oGrid.width=oGrid.parent.parent.width
ogrid.height=ogrid.parent.parent.height-28 &&-ogrid.headerheight-SYSMETRIC(15)
ENDPROC &&Views_Gridsize(oGrid)

PROCEDURE Views_Editsize(oEdit)
oEdit.width=oEdit.parent.parent.width
oEdit.height=oEdit.parent.parent.height-28
ENDPROC &&Views_Editsize(oEdit)
HTH
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform