[.NET] 如果用VB2005寫一個能帶有歷史資訊的功能表
請輸入專案類型(網站專案或者應用程式專案):
各位:
如標題所示,如何能做一個含有歷史資訊的功能表
也就是出現已開過的檔案名稱在功能表中
我手頭上有vb6的範例,但已經轉很多天也只能
將他儲存的地方改寫成VB2005的語法而已,請各位指教
原程式片段
...
strfilename = App.Path & "\cdxx.ini"
file = FreeFile()
On Error Resume Next
Open strfilename For Input As #file
Do While Not EOF(file)
Line Input #file, mystring 'mystring前面已經定義成string
If mystring <> "" Then
max_index = max_index + 1
Load mnufilelist(max_index) 'mnufilelist是分格線的名字
mnufilelist(max_index).Caption = mystring
mnufilelist(max_index).Visible = True
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
目前我的程式
strfilename = My.Application.Info.DirectoryPath & "\cdxx.ini"
file = FreeFile()
On Error Resume Next
FileOpen(file, strfilename, OpenMode.Input)
Do While Not EOF(file)
mystring = LineInput(file)
If mystring <> "" Then
max_index = max_index + 1
下面不知如何接下去,因為VB2005好像沒有提供index的功能了!!
Thank you everyone
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 211.22.132.142