with thisform.pageframe *:the image is wider and taller than the pageframe if (.page1.image1.width > .Width) AND (.page1.image1.height > .Height) then .ScrollBars = 3 && Both vertical and Horizontal endif *:the image is just wider if (.page1.image1.width > .Width) AND (.page1.image1.height <= .Height) then .ScrollBars = 1 && Just Horizontal endif *:the image is just taller if (.page1.image1.width <= .Width) AND (.page1.image1.height > .Height) then .ScrollBars = 2 && Just Vertical endif *:Resizing the pageframe if necessary if (.page1.image1.width > .Width) .Width = .page1.image1.width + 10 endif *:Resizing the pageframe if necessary if (.page1.image1.Height > .Height) .Height = .page1.image1.Height + 10 endif endwithhope this makes sense
DO WHILE .T. ME.Work() ENDDO