请各位高手指导!这是我用.net编写的一个小程序我检查了几遍没有发现什么错误,可以运行但是无法查看图片

请各位高手帮忙看看那里出现了问题.谢谢这个是代码:PrivateSubbutton_Click(ByValsenderAsSystem.Object,ByValeAsSy... 请各位高手帮忙看看那里出现了问题.谢谢 这个是代码: Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button.Click

'浏览文件夹
private sud Button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles button1.click
Me.ListBox1.Items.Clear()
Dim mydlg As New FolderBrowserDialog()
If (mydlg.ShowDialog() = System.Windows.Forms.DialogResult.OK) Then
Me.TextBox1.Text = mydlg.SelectedPath
Dim i As Integer = 0
Dim myfilter As String = ""
myfilter = "*.jgp"
For i = 0 To System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter).Length - 1 Step 1
Me.ListBox1.Items.Add(System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter)(i))
Next
myfilter = "*.bmp"
For i = 0 To System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter).Length - 1 Step 1
Me.ListBox1.Items.Add(System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter)(i))
Next
myfilter = "*.tif"
For i = 0 To System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter).Length - 1 Step 1
Me.ListBox1.Items.Add(System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter)(i))

Next
myfilter = "*.png"
For i = 0 To System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter).Length - 1 Step 1
Me.ListBox1.Items.Add(System.IO.Directory.GetFiles(mydlg.SelectedPath, myfilter)(i))
Next
End If
End Sub

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
'显示图像
End Sub

Private Sub listbox1_selectedindexchanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim myfilename As String = Me.listbox1.selecteditem.tostring()
Me.picturebox1.image = System.drawing.bitmap.fromfile(myfilename)
End Sub

Private Function picturebox1() As Object
Throw New NotImplementedException
End Function

End Class
展开
 我来答
qinghechaoge
2011-12-31 · 超过23用户采纳过TA的回答
知道答主
回答量:133
采纳率:0%
帮助的人:72万
展开全部
你运行完是不是在图像上面有个X啊,如果是的话,你在那个X上右击看图像的路径,你看看路径是不是你想要的,通常都是路径问题
大白的丢丢
2012-01-05 · TA获得超过274个赞
知道小有建树答主
回答量:238
采纳率:0%
帮助的人:195万
展开全部
没有开发工具在 看代码太头疼了
"*.jgp"
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式