0
我一直在MONO C#編寫應用程序,我需要幫助,我的問題是我的應用程序必須從我的服務器上運行Windows XP和我需要知道我如何寫照片的路徑。我的意思是說windows是這樣的。如何從UBUNTU運行單聲道應用程序的Win XP加載圖片
即時通訊使用的IO類加載如流,並接近inmediately釋放文件
的代碼是這樣的(這是VB在C#中幾乎是一樣的我只想ilustrate我的麻煩):
Public Sub FotoProducto(ByRef whichPicturebox As PictureBox)
Dim fsPicture As System.IO.FileStream
Dim sPath As String
'In windows I use this one and works fine
"\\MyServer\PhotoFolder\picture.jpg"
'in linux I supossed it would be:
sPath = "smb://MyServer/PhotoFolder/picture.jpg"
'I tried with local files and this code worked
sPath = "/home/user/images/sample.jpg"
'I don't know how to acces to files from others machines wich run WinXP
'using the console, That's the reson why I think I'm writing wrong the path,
'I've been looking in a lot of forums with no luck.
Try
fsPicture = New System.IO.FileStream(sPath , FileMode.Open, FileAccess.Read)
Adonde.Image = Image.FromStream(fsPicture)
fsPicture.Close()
fsPicture.Dispose()
Catch ex As Exception
whichPicturebox.Image = My.Resources.Defaultt
End Try
End Sub
我真的thak你提前
謝謝,讓我檢查我如何做到這一點,然後我會告訴你發生了什麼。 謝謝:) – diego 2009-10-10 16:13:26
它的工作原理,我所要做的就是在系統啓動時掛載該文件夾,但有很多關於該文件夾的論壇。 非常感謝你,像你這樣的人更容易改變Linux – diego 2009-10-10 16:49:44