>Hi there,
>
>In my application I often add an image-control to forms to set a background-picture. I now tried this
>with the pages pf the pageframe-control by using the following code:
>
>
>FOR i = 1 TO thisform.pf.Pagecount
> thisform.pf.Pages[i].addobject("img_back","image")
> WITH thisform.pf.Pages[i].img_back
> .ZOrder(1)
> .left = 0
> .top = 0
> .Height = Thisform.pf.Height
> .Width = Thisform.pf.Width
> .Anchor = 15
> .picture = "D:\foxprogs\foxbib\images\blueform.png"
> Endwith
>Next
>
>
>But this does not work. The image is added but when it comes to the next-statement width and height are "reset" to a value
>of 1. Can someone tell me what I am doing wrong or missing?
Just to add to what others said, anything you .addobject(), createobject() etc initially has .visible=.f., with a good reason - so you can set it up the way you want before actually showing it, so it stays invisible and doesn't dance and flicker around while you do it. But when you're done, you should set .visible=.t.