0

我想要一个小的基本程序,可以连续显示多个图像而不会重叠。但由于并非所有图像文件都相同,因此很难做到这一点。

dir = Program.Directory
imagedir = dir + "\images\"
GraphicsWindow.BrushColor = "White"
For i = 1 To 27
  i_name= File.ReadLine(imagedir+"\imagedata.txt",b) 'imagedata contains the names of all the images in the directory so I don't have to list all the names in the program.
  image[i] = ImageList.LoadImage(imagedir+i_name+".png")
  imagewidth[i] = ImageList.GetWidthOfImage(image[i])
  GraphicsWindow.DrawImage(block[i],(i-1)*imagewidth[i-1],0) 'This is where the trouble lies.
EndFor
4

1 回答 1

0

我认为您需要另一个变量来存储 x 坐标。每次绘制图像时,都应该将变量增加其宽度和边距。然后,当您绘制下一张图像时,将其绘制在变量指示的位置。

于 2017-11-08T08:38:08.497 回答