2017-02-09 100 views
0

我設計了一個使用OpenFileDialoge在PictureBox中打開圖片的vb.net應用程序。
我的機器是windows 7 32位,這是我的代碼:空OpenFileDialoge打開圖像時

Dim directoryName As String = Path.GetDirectoryName(Application.ExecutablePath) 
    Try 
     Dim dialog As New OpenFileDialog 
     directoryName = "" 
     dialog.InitialDirectory = directoryName 
     dialog.Filter = "Pictures|*.jpg|All files (*.*)|*.*" 
     dialog.FilterIndex = 1 
     dialog.RestoreDirectory = True 
     If dialog.ShowDialog = DialogResult.OK Then 
      TextBox8.Text = dialog.FileName 
      PictureBox1.Image = Image.FromFile(TextBox8.Text) 
     End If 
    Catch ex As Exception 
     MessageBox.Show(ex.Message.ToString) 
    End Try 

一切都是我的機器上很好,但在客戶機誰擁有64位Windows 7,當他試圖打開的圖像上,他得到了像這樣的畫面:

enter image description here

而且,我試圖改變淨framwork不同版本,但沒有動靜,人有一個想法嗎?

回答

0

我經過五天的搜索和一次又一次的嘗試才解決了我的問題。
我的MS Acess 2010數據庫與我的程序作爲後端,解決方案是將其轉換爲MS Acess 2003.
我不知道這是什麼關係,但它已經解決了。