System.Drawing.Image类型的值无法转换为System.Drawing.Image的1维数组

时间:2013-04-23 11:26:32

标签: vb.net image tabcontrol

这是我的代码:

Dim mimage = Image.FromStream(stream)
Me.TabControl2.ImageList.Images.AddRange(mimage) -> Here
Me.TabControl2.SelectedTab.ImageIndex = 0
Me.TabControl2.ImageList.Images.RemoveAt(0)

它给了我那个错误(标题)。怎么了?

1 个答案:

答案 0 :(得分:0)

AddRange需要数组

Me.TabControl2.ImageList.Images.Add(mimage)
Me.TabControl2.ImageList.Images.AddRange({mimage})