寫入檔案並附加在原本內容後面

Public Function log_fun(ByVal msg As String) As Integer


  Dim fileName As String = "A" + ImgTest.cmb_algo.Text + "_C" + ImgTest.txt_clusterNum.Text + "_I" + ImgTest.txt_iter.Text + ImgTest.txt_threshold.Text + "_V" + ImgTest.txt_velocity.Text + ".txt" '這是我自己記錄每次執行的檔名,方便歸類

 
  Dim file As New System.IO.StreamWriter(fileName, True) 'True就是 append,false是 overwrite


  file.Write(msg + Chr(13) + Chr(10)) '+ Chr(13) + Chr(10)是換行


  file.Flush() '沒研究~


file.Close()


End Function

 

http://jaric.myweb.hinet.net/vb/vb/important/vbImportant4-2.htm

http://msdn.microsoft.com/zh-tw/library/f7s023d2(VS.80).aspx

http://tw.myblog.yahoo.com/jw!tDAJ3PqaBEMNwRdF89Q-/article?mid=1057&prev=1204&next=1041&l=f&fid=77

http://yes.nctu.edu.tw/vb/

http://process.dll-free-download.org/i/ijl20.dll-vso-software-sarl.html

http://www.dll-download-system.com/dlls-i-/ijl15.dll.html


arrow
arrow
    全站熱搜

    lver76 發表在 痞客邦 留言(0) 人氣()