发布网友 发布时间:2022-04-20 04:49
共3个回答
热心网友 时间:2023-06-30 13:02
这个有些东西是要在设计界面上操作的,说起来比较麻烦。
留个qq,我传给你。
设计界面:
设计时,先放一个picture1,然后复制它,再粘贴到窗体上,这时出现对话框,选“确定”。
代码如下:
Private Sub Command1_Click()
Dim 行 As Integer
Dim 列 As Integer
For I = 0 To 219
If I > 1 Then Load Picture1(I)
Picture1(I).Visible = True
行 = I \ 22
列 = I Mod 22
Picture1(I).Move 列 * 300, 行 * 300 + 800, 285, 285
Next I
End Sub
热心网友 时间:2023-06-30 13:02
先建一个Picture(0),设置Index=0, Visible=False然后拷贝以下代码
Private Sub Command1_Click()
Dim I As Integer
Dim p As Control, pp As Control
Set p = Picture1(0)
p.Width = 500: p.Height = 500
For I = 1 To 22
For j = 1 To 10
Load Picture1((I - 1) * 22 + j)
Set pp = Picture1((I - 1) * 22 + j)
pp.Visible = True
pp.BackColor = vbRed
pp.Move p.Left + (I - 1) * p.Width, p.Top + (j - 1) * p.Height
Next
Next
End Sub
热心网友 时间:2023-06-30 13:03
用数组比想象中的简单
Private Sub Command1_Click()
For j = 0 To 9
For i = 0 To 21
Set p = Controls.Add("Vb.picturebox", "dd" & j & i)
p.Move 285 * i, 285 * j, 285, 285
p.Visible = True
Next
Next
End Sub