I load 800 X 600 wallpaper by _screen.picture = "01.jpg" command in my
application for background image. but when screen's resulution is more
than 800x600, the image streched, i want to set it in center in this
case. Any idea please...

Thanks

Re: picture position in _screen variable by Stefan

Stefan
Sat Apr 26 05:38:17 CDT 2008


"intel4" <intel_inside_4@hotmail.com> wrote in message
news:4318390d-01a8-4f2b-80a6-5aac42399b36@n1g2000prb.googlegroups.com...
>I load 800 X 600 wallpaper by _screen.picture = "01.jpg" command in my
> application for background image. but when screen's resulution is more
> than 800x600, the image streched, i want to set it in center in this
> case. Any idea please...

You can use BindEvent() to hook your custom code to
_screen.Resize().


hth
-Stefan




--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


Re: picture position in _screen variable by Stefan

Stefan
Sat Apr 26 05:48:21 CDT 2008


"Stefan Wuebbe" <stefan.wuebbe@gmx.de> wrote in message
news:%23wpQgm4pIHA.3428@TK2MSFTNGP02.phx.gbl...
>
> "intel4" <intel_inside_4@hotmail.com> wrote in message
> news:4318390d-01a8-4f2b-80a6-5aac42399b36@n1g2000prb.googlegroups.com...
>>I load 800 X 600 wallpaper by _screen.picture = "01.jpg" command in my
>> application for background image. but when screen's resulution is more
>> than 800x600, the image streched, i want to set it in center in this
>> case. Any idea please...
>
> You can use BindEvent() to hook your custom code to
> _screen.Resize().

And _screen.Image.Anchor = 768 seems to work, too.



hth
-Stefan




--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


Re: picture position in _screen variable by intel4

intel4
Sun Apr 27 04:13:48 CDT 2008

can't understand, sorry, any example please

Re: picture position in _screen variable by Stefan

Stefan
Sun Apr 27 04:32:10 CDT 2008


"intel4" <intel_inside_4@hotmail.com> wrote in message
news:6e8a48d8-f4c7-4257-bd69-9f29ac362776@k10g2000prm.googlegroups.com...
> can't understand, sorry, any example please

You're welcome. Instead of _screen.Picture, you can use an Image
control and then .Anchor it to make it centered, e.g.:

_screen.AddObject('Image1','Image')
_screen.image1.Picture = ADDBS(HOME())+'fox.bmp'
With _screen
.image1.Move(.Width/2 - .image1.Width/2, .Height/2 - .image1.Height/2)
EndWith
_screen.image1.Anchor = 768 && centered, no resize
_screen.image1.Visible = .T.



hth
-Stefan




--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


Re: picture position in _screen variable by OlivierH

OlivierH
Tue Apr 29 02:38:42 CDT 2008

intel,,

The stefan's solution, it's the best way to resize a background Picture.

Olivier;



Stefan Wuebbe a écrit :
>
> "intel4" <intel_inside_4@hotmail.com> wrote in message
> news:6e8a48d8-f4c7-4257-bd69-9f29ac362776@k10g2000prm.googlegroups.com...
>> can't understand, sorry, any example please
>
> You're welcome. Instead of _screen.Picture, you can use an Image
> control and then .Anchor it to make it centered, e.g.:
>
> _screen.AddObject('Image1','Image')
> _screen.image1.Picture = ADDBS(HOME())+'fox.bmp'
> With _screen
> .image1.Move(.Width/2 - .image1.Width/2, .Height/2 -
> .image1.Height/2)
> EndWith
> _screen.image1.Anchor = 768 && centered, no resize
> _screen.image1.Visible = .T.
>
>
>
> hth
> -Stefan
>
>
>
>

Re: picture position in _screen variable by intel4

intel4
Wed Apr 30 03:34:34 CDT 2008

thanks friends
thanks a lot Stefan Wuebbe , you are genius. Hope you will always help
me.