my problem is i want to show the picture from folder to image box but it need to find what picture depends on text box,

        If Right(filStudent.Path, 1) = "\Picture\" Then
        imgS = filStudent.Path + txtFind
        Else
        imgS = filStudent.Path + "\Picture\" + txtFind
        End If
        imgStudent.Picture = LoadPicture(imgS)

but the error always appear at line 6

Use & instead of + and the general code snippet is:

Dim strFileName As String
strFileName = File1.Path
If Right$(strFileName, 1) <> "\" Then strFileName = strFileName & "\"
strFileName = strFileName & File1.FileName
Main.Show
Main.Image.Picture = LoadPicture(strFileName)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.