Thumbs upSolvedPlz help

Posts 1–11 of 11 · Page 1 of 1
Plz help
So.i have a promblem with my backround changer.
image:

Plz i need help fast
Quote Originally Posted by Coper View Post
Plz i need help fast
Add the file extension ?

.png | .jpg / .jpeg
What he said ^

File path doesn't return an image.
Backgroundimage property has to be an image.
it is an image
Quote Originally Posted by Coper View Post
it is an image
And yet you have to add the file extension
Quote Originally Posted by Jorndel View Post


And yet you have to add the file extension
what do u mean?
Quote Originally Posted by Coper View Post
it is an image
mm.. check the properties of the file. The string you wrote would return a folder, not an image simply because the string does not end with an extension.
Why do you think image file formats consist a variety of formats.. .png, .gif, .bmp.. The string you wrote does not return any.. so resulting in an error.. multiple actually.

One.. The string does not return an image.
Two.. to be able to change a property properly.. , you'll need to match iamge with image.. although some ases there are exception, but in this case theres not.

Hope you understand.
Quote Originally Posted by DawgiiStylz View Post

mm.. check the properties of the file. The string you wrote would return a folder, not an image simply because the string does not end with an extension.
Why do you think image file formats consist a variety of formats.. .png, .gif, .bmp.. The string you wrote does not return any.. so resulting in an error.. multiple actually.

One.. The string does not return an image.
Two.. to be able to change a property properly.. , you'll need to match iamge with image.. although some ases there are exception, but in this case theres not.

Hope you understand.
<3
ty man
Quote Originally Posted by Coper View Post
<3
ty man
Rich click the image, click properties..



Put 2 and 2 together and you'll get the filepath.

File location:
C:\Users\Aaron\Pictures

File Name: dawgi

File Extension: .png

File Path = C:\Users\Aaron\Pictures\dawgi.png | Thus, returning an image.

Simple
Suppose it's solved then?

Well, made a Function for you just in case tho
 
Function +Example
Code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Me.BackgroundImage = GetImage("C:\Users\Jorndel\Desktop\LoL BattleCon", "Annie_E")
    End Sub

    Function GetImage(ByVal Path As String, ByVal FileName As String) As Image
        For Each Fi As String In System****.Directory.GetFiles(Path)
            If Fi.Contains(FileName) Then
                Return Image.FromFile(Fi)
            End If
        Next
    End Function
now Guys Its time for my new update in 2 minutes look in this visual basic programming section:P
Coper stone is coming!!
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?