Questionimport background thing help

Posts 1–4 of 4 · Page 1 of 1
import background thing help
hi ppl i was adding a feature to my injector when i got stuck.

ok so i made a button and if i click it , it shows a browse thing to browse for a picture (jpg or png) which sets that picture for the form background.
this is my code wtill now.
Code:
OpenFileDialog1.Filter = "JPG (*.jpg) |PNG (*.png)"
        OpenFileDialog1.ShowDialog()
        Dim FileName As String
        FileName = OpenFileDialog1.FileName.Substring(OpenFileDialog1.FileName.LastIndexOf("\"))
        Dim DllFileName As String = FileName.Replace("\", "")
        Me.BackgroundImage =
so can any finish this code of
did you c&p that?
i coppied and pasted it from my full code
It's not really "Your Code", but no matter.

Code:
  OpenFileDialog1.Filter = "JPG Files|*.jpg|Bitmap Files|*.bmp"
        If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then

            Me.BackgroundImage = System.Drawing.Image.FromFile(OpenFileDialog1.FileName)


Use this code, It's cleaner, and not copied and pasted from the rest of "Your Code"
There are lines of code that don't need to be there .
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?