Dim fm As WinForm.Form = forms(args(0)) '窗口名
Dim PName As String = args(1) 'picturebox名
Dim pa As WinForm.PictureBox= fm.Controls(PName)
Dim pbx As WinForm.PictureBox
For Each p As String In ps
pbx = fm.CreateControl(p, ControlTypeEnum.PictureBox)
pa.AddControl(pbx)
pbx.ToolTip = p
pbx.Width = 53
pbx.Height = 39
pbx.Left = x
pbx.Top = y
If p <> "" Then
pbx.ImageFile = p & ".png"
Else
pbx.ImageFile = "问号.png"
End If
pbx.SizeMode = ImageSizeMode.Zoom
x = x + 60
If x+60 > pa.Width Then
x = 2
y = y + 42
End If
Next