hi guys, i'm new here, i just tryin to create a simple form which i use it to view picture in a picture.. but i seem to have some prob with the coding for the displaying of image.. can someone help me pls.
Code:
Imports System.Drawing
Public Class Form2
Inherits System.Windows.Forms.Form
Friend WithEvents btnClose As System.Windows.Forms.Button
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
Dim firstform As New Form1
Dim secondform As New Form2
firstform = New Form1
firstform.Show()
Me.Close()
End Sub
Private Sub PictureBox1_ParentChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.ParentChanged
Me.PictureBox1.Image = New Bitmap("C:\MyImage.bmp")
End Sub
End Class