Does anyone know how to assign a picture a a picture box programatically?
ie
VB Code:
Dim icon as picturebox icon = new picturebox icon.image = "?"
Cheers
Printable View
Does anyone know how to assign a picture a a picture box programatically?
ie
VB Code:
Dim icon as picturebox icon = new picturebox icon.image = "?"
Cheers
I am using the .NET Compact framework and the method from file isn't supported.
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load Dim images As PictureBox = New PictureBox images.Location = New Point(20, 20) images.Height = 200 images.Width = 200 images.Image = System.Drawing.Image("name.jpg") Me.Controls.Add(images) End Sub
am working along these lines at the moment bu the System.Drawing.image results in an error!