The size of a formular  
Author Message
Nigel36





PostPosted: Visual FoxPro General, The size of a formular Top

Please tell me, how can I know everytime, the size (widht and height) of the formular (Sizable)

Thank you.



Visual FoxPro2  
 
 
AndyKr





PostPosted: Visual FoxPro General, The size of a formular Top

What do you mean by "Formular"

IF you mean the VFP Desktop, check the SYSMETRIC() function in the Help File, but if you mean a "form" then just read it's height and width properties directly.

If neither of these, then I am sorry, but you must edxplain what you want in a little more detail.



 
 
Nigel36





PostPosted: Visual FoxPro General, The size of a formular Top

I want that an image to stay all the time in center of the formular, regardles of what size have that formular (resizable).


 
 
AndyKr





PostPosted: Visual FoxPro General, The size of a formular Top

In Version 9.0 you can use the ANCHOR property of the Image control. If you are using earlier version of FoxPro, then you will have to add code to the Form's RESIZE() event to ensure that the image stays centered.



 
 
Nigel36





PostPosted: Visual FoxPro General, The size of a formular Top

Yes, I work in VFP9. But when I change the size of the formular (with mouse, drag one of corners of the window formular), the image don't realign in center.


 
 
AndyKr





PostPosted: Visual FoxPro General, The size of a formular Top

[1] You must have an IMAGE control on the form which displays the picture

[2] Image.Stretch property must be set to either 1 (Isometric) or 2 (Stretch)

[3] Image.Anchor property must be set to 15

Then it will resize as you adjust the size of the form.

If you do not have these three things done, it will not work.