我有一个图片框,我在运行时使用 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 - 如何知道picturebox中图片的路径文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33028472/