Dear All,
Few days ago, I have written a question on how to add a thumbnail image in a form... it is quite simple by using Thumbnail Control in OLE container. However, I find that the scrollbox container cannot scroll up & down the thumbnail controls I added programmatically... so I create a custom container to hold the thumbnail controls, the scrollbox can scroll up & down the controls...
It works fine in local machine, when I try to use it from other machine, in that the thumbnail image cannot be displayed?!
Basically, the path is something like "\\computer1\photo\"
With ThisForm.pf1.photo.SBC.viewFrame.clientarea
FOR x = 1 TO n
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,'Thumblabel')
loLabel = evaluate("."+m.lcObjName)
WITH lolabel
.tag = SET('default')+CURDIR()+z
.label1.caption = z
.height = 100
.width = 100
.thumb1.displayfile(.tag)
.top = nTop
.left = nLeft
.visible = .T.
IF nTotalWidth - nleft- .width - nSpace >= .width
nLeft = nLeft + .width + nSpace
ELSE
nTop = nTop+.height + nSpace
nleft = 10
ENDIF
ENDWITH
ENDIF
ENDFOR
ENDWITH
It seems to me that the thumbnail controls could not wait until downloading from the target path...
Any help is greatly appreciated
Best regards,
Aaron Chu
********************************************************
Working with Visual FoxPro is a lot of FUN!
********************************************************