with thisform.pageframe *:the image is wider and taller than the pageframe if (.page1.image1.width > .Width) AND (.page1.image1.height > .Height) then Thisform.ScrollBars = 3 && Both vertical and Horizontal endif *:the image is just wider if (.page1.image1.width > .Width) AND (.page1.image1.height <= .Height) then Thisform.ScrollBars = 1 && Just Horizontal endif *:the image is just taller if (.page1.image1.width <= .Width) AND (.page1.image1.height > .Height) then Thisform.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 *:Resizing the form if necessary if (.width > Thisform.Width) Thisform.Width = .width + 10 endif *:Resizing the form if necessary if (.Height > Thisform.Height) Thisform.Height = .Height + 10 endif endwiththere it is
DO WHILE .T. ME.Work() ENDDO