Advertisement
5_2007-2008 Files/ File Controls/ Input/ Output #178793

Read / Load contents of a textfile into a listbox

Reads / Loads contents of a textfile into a listbox

AI

एआई सारांश: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

सोर्स कोड
original-source
Public Sub File2ListBox(sFile As String, oList As ListBox)
Dim fnum As Integer
Dim sTemp As String
 fnum = FreeFile()
 oList.Clear
 Open sFile For Input As fnum
  While Not EOF(fnum)
   Line Input #fnum, sTemp
   oList.AddItem sTemp
  Wend
 Close fnum
End Sub
मूल टिप्पणियाँ (3)
Wayback Machine से पुनर्प्राप्त