Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedValue IsNot Nothing Then
PictureBox1.Image = Image.FromFile("C:\Users\goodisam000\Desktop\Goodin Coding\Stuff\Pokemon Sprites\X and Y\xyani\" & (ComboBox1.SelectedItem.ToString.ToLower) & ".gif")
End If
End Sub
我想让图片框根据所选的组合框选项更改图像。所以说我在组合框中选择Abra,然后我希望表格在选择Abra时将Abra的图像加载到图片框中。
答案 0 :(得分:0)
如何将图像添加到资源然后从资源位置链接?
然后你可以把图像作为" resources \\ imageblabla"而不是" C:\ Users \ goodisam000 \ Desktop \ Goodin Coding \ Stuff \ Pokemon Sprites \ X和Y \ xyani \"