Dim form2 As New Form
Dim PB As New PictureBox
Dim x As String = [COLOR=Red][B]FILELOCATION[/B][/COLOR]
form2.Show()
With PB
PB.Image = PB.Image.FromFile(x)
PB.Height = PB.Image.Height
PB.Width = PB.Image.Width
PB.Left = 0
PB.Top = 0
End With
form2.Height = PB.Image.Height
form2.Width = PB.Image.Width
form2.Controls.Add(PB)
Dim frm As New PBForm
frm.PBimage = Image.FromFile(filepath)
frm.Show()
[SIZE=2][COLOR=#0000ff]Public [/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Property[/COLOR][/SIZE][SIZE=2] PBimage() [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Image
[/SIZE][SIZE=2][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff] Return[/COLOR][/SIZE][SIZE=2] PictureBox1.Image
[/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Get
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Set[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] Value [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Image)
PictureBox1.Image = Value
[/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Set
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Property
[/COLOR][/SIZE]