Displaying image from folder/file in vb.net

一笑奈何 提交于 2019-12-04 04:37:07

i want to display image from folder, for example, student with an id number of 22137471, the picture with the name of 22137471 will be display on my picture box

Try something like...

    Dim id As String = "22137471"
    Dim folder As String = "c:\some path\folder"
    Dim filename As String = System.IO.Path.Combine(folder, id & ".png")
    PictureBox1.Image = Image.FromFile(filename)
Med.ZAIRI

You can try this:

PictureBox1.Image = Image.FromFile("c:\some path\folder\myImage.jpg")
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!