我有一个图片框,在其中使用OpenFileDialog在运行时加载图像,然后将路径/文件名保存到数据库中。我不知道如何获取图像的路径/文件名?
我尝试了类似的东西
VB代码:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
openFD.ShowDialog()
If openFD.FileName > "" Then
PictureBox1.ImageLocation = openFD.FileName
PictureBox1.Imagelocation = label1.text
End If
End Sub
最佳答案
label1.text = PictureBox1.ImageLocation
或者您可以尝试msgbox(PictureBox1.ImageLocation)
关于mysql - 如何知道图片盒中图片的路径文件?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33028472/