16,554
社区成员
发帖
与我相关
我的任务
分享
Dim thise As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
''获取所有资源文件的全名称
Dim strNames() As String = thise.GetManifestResourceNames()
Dim filename As String = ""
''假设是把本地的1.jpg设为资源文件,
For Each name As String In strNames
If name.ToLower.IndexOf("1.jpg") > -1 Then
filename = name
Exit For
End If
Next
If String.IsNullOrEmpty(filename) = False Then
Dim sr As System.IO.Stream = thise.GetManifestResourceStream(filename)
Me.pictureBox1.Image = Image.FromStream(sr)
End If