I want to create a code where if i put If TextBox2.Text = "change background image" Then Me.BackgroundImage = System.Drawing.Image.FromFile("C:Users... enter your image file"). However I want like a open file dialog where it shows the different images to choose from to change the background image of the app
One person told me this
Using ofd As New OpenFileDialog
.Filter = "Images|*.bmp;*.jpg;*.jpeg;*.png"
.Multiselect = False
.Title = "Select Image"
If ofd.ShowDialog = DialogResult.OK Then
TextBox2.Text = ofd.FileName
However it gives me errors saying using must end with end using which i both put but please help me please be specific
Below is a link to a picture of the code with the issue