nTop = 0 nLeft = 0 nSpace = 10 nTotalWidth = ThisForm.SBc.Width CHDIR GETDIR() n=ADIR(pict) With ThisForm.SBc.clientarea FOR x = 1 TO 30 z = ALLTRIM(pict[x,1]) ext = UPPER(RIGHT(z,LEN(z)-RAT('.',z))) IF ext = "BMP" OR ext = "JPG" lcObjName = "image" + Transform(x) .AddObject(m.lcObjName,'olecontrol','ThumbCtl.ThumbCtl.2') loLabel = evaluate("."+m.lcObjName) WITH lolabel .height = 80 .width = 100 .displayfile(SYS(5)+CURDIR()+z) .visible = .T. .top = nTop .left = nLeft IF nTotalWidth - nleft- .width - nSpace >= .width nLeft = nLeft + .width + nSpace ELSE nTop = nTop+.height + nSpace nleft = 0 ENDIF ENDWITH ENDIF ENDFOR ENDWITH ThisForm.SBC.CalcAutoRange Thisform.SBC.Move(Thisform.SBC.left, Thisform.SBC.top, Thisform.SBC.width+1, Thisform.SBC.height+1)Everything is fine, except the scrollbar could not scroll up and down; the thumbnail displayed correctly...