[VB.NET]初始化PictureBox数组怎么操作

前端之家收集整理的这篇文章主要介绍了[VB.NET]初始化PictureBox数组怎么操作前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
初始化PictureBox数组怎么操作 Dim pics() As PictureBox '' '' '' '' '' '' '' '' '' '' '' '' '' ''显示牌 For i = 0 To strs1_len Dim ss As String = strs1nums(i) Dim pic As New PictureBox pic.ImageLocation = "buke/ " & ss & ".png " pic.Name = ss pic.Location = New System.Drawing.Point(x - i * 30,y) pic.Width = 94 pic.Height = 125 AddHandler pic.Click,AddressOf pic_Click AddHandler pic.MouseDown,AddressOf pic_leftMouse AddHandler pic.DoubleClick,AddressOf pic_DoubleClick pics(i) = pic '' '' '' '' '' ''这个地方地址错了的,按照提示用new 也还是错了的,请问这个那我要怎么传递给这个数组呢? panel.Controls.Add(pic) Next __________________________________________________________________________ pic没有初始化? __________________________________________________________________________ 最后那个panel.controls.addrange(pics)比较好. __________________________________________________________________________ Dim pic As New PictureBox pic.ImageLocation = "buke/ " & ss & ".png " pic.Name = ss pic.Location = New System.Drawing.Point(x - i * 30,AddressOf pic_DoubleClick 这个应该是对pic的初始化吧? 最后那个panel.controls.addrange(pics)比较好. 这里的pics我是定义成了一个PictureBox数组了 之后想把pic 给传递到数组里 __________________________________________________________________________ 想知道答案下,怕掉下去,自己在会个贴=_= __________________________________________________________________________

猜你在找的VB相关文章