Textdatei in Textbox einlesen
[Windows 95/98/NT/2000]

26.01.1999


  Um eine Textdatei in eine Textbox einzulesen,
     benötigen Sie folgenden Code:

ERFORDERLICHE OBJEKTE
1 Commandbutton (Command 1)
1 Textbox (Text1, Scrollbars=2, Multiline=True)

FORM-CODE

   Private Sub Command1_Click()
      Dim FileLength
      f = "c:\autoexec.bat"
      Open f For Input As #1
         FileLength = LOF(1)
         t = Input(FileLength, #1)
      Close #1
      Text1.Text = t
   End Sub
   Private Sub Form_Load()
      Text1.Text = ""
      Command1.Caption = "Einlesen..."
   End Sub


 

Download -  2 KB