Results 1 to 3 of 3

Thread: textboxes

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Orange County
    Posts
    68

    Post

    I just want to load a text file *.txt to a textbox in my program any help is welcomed thanks

  2. #2
    Lively Member
    Join Date
    Nov 1999
    Posts
    65

    Post

    'Heres a simple code that will import the 'first line.
    Dim Line1 As String

    Open "c:\project1.txt" For Input As #1
    Input #1, Line1

    Text1.Text = Line1

    'to get more than one line under Input #1, Line1 put Input #1, Line2 and that will get the second one and Input #1, Line3 under that to get the third line and then just adjust ther text1.text to somthing like text1.text = line1 + line 2 + Line 3 and so on.

  3. #3
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242

    Post

    Hello!

    Try this:

    open "file.txt" for input as #1
    text1.text=input(lof(1),#1)
    close #1

    this function loads whole text file to textbox, but beware... text files mustn't be larger than 64 Kb

    ------------------


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width