Displaying contents of a text file in a text box

As the topic describes, I need to display the contents of a
text file in a text box. How would one go about doing this? Thanks
in advance.

// setting up the text format options
var FileFormat:TextFormat = new TextFormat ();
FileFormat.font = "Verdana";
FileFormat.size = 12;
FileFormat.align = "left";
FileFormat.color = 0xFFFFFF;
/// load in text from folder load_in , filename is text.txt
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function (success:Boolean):Void{
if (success){
textfield.text = this.txtVarLoaded;
textfield.setTextFormat ( FileFormat );
} else {
trace ("error");
my_lv.load ("load_in/text.txt"); // load in text.txt
peace ;o)

Similar Messages

  • Open and read from text file into a text box for Windows Store

    I wish to open and read from a text file into a text box in C# for the Windows Store using VS Express 2012 for Windows 8.
    Can anyone point me to sample code and tutorials specifically for Windows Store using C#.
    Is it possible to add a Text file in Windows Store. This option only seems to be available in Visual C#.
    Thanks
    Wendel

    This is a simple sample for Read/Load Text file from IsolateStorage and Read file from InstalledLocation (this folder only can be read)
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Windows.Storage;
    using System.IO;
    namespace TextFileDemo
    public class TextFileHelper
    async public static Task<bool> SaveTextFileToIsolateStorageAsync(string filename, string data)
    byte[] fileBytes = System.Text.Encoding.UTF8.GetBytes(data);
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting);
    try
    using (var s = await file.OpenStreamForWriteAsync())
    s.Write(fileBytes, 0, fileBytes.Length);
    return true;
    catch
    return false;
    async public static Task<string> LoadTextFileFormIsolateStorageAsync(string filename)
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    async public static Task<string> LoadTextFileFormInstalledLocationAsync(string filename)
    StorageFolder local = Windows.ApplicationModel.Package.Current.InstalledLocation;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    show how to use it as below
    async private void Button_Click(object sender, RoutedEventArgs e)
    string txt =await TextFileHelper.LoadTextFileFormInstalledLocationAsync("TextFile1.txt");
    Debug.WriteLine(txt);
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • Copy one text file to another text file and delete last line

    Hi all wonder if someone can help, i want to be able to copy one text file to another text file and remove the last line of the first text file. So currently i have this method:
    Writer output = null;
             File file = new File("playerData.xml");
             try {
                   output = new BufferedWriter(new FileWriter(file, true));
                   output.write("\t" + "<player>" + "\n");
                   output.write("\t" + "\t" + "<playerName>" + playerName + "</playerName>" + "\n");
                   output.write("\t" + "\t" + "<playerScore>" + pointCount + "</playerScore>" + "\n");
                   output.write("\t" + "\t" + "<playerTime>" + minutes + " minutes " + seconds + " seconds" + "</playerTime>" + "\n");
                   output.write("\t" + "</player>" + "\n");
                   output.write("</indianaTuxPlayer>" + "\n");
                  output.close();
                  System.out.println("Player data saved!");
             catch (IOException e) {
                   e.printStackTrace();
              }However each time the method is run i get the "</indianaTuxPlayer>" line repeated, now when i come to read this in as a java file i get errors becuase its not well formed. So my idea is to copy the original file, remove the last line of that file, so the </indianaTuxPlayer> line and then add this to a new file with the next data saved in it. So i would end up with something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <indianaTuxPlayers>
         <player>
              <playerName>Default Player</playerName>
              <playerScore>0</playerScore>
              <playerTime>null minutes null seconds</playerTime>
         </player>
         <player>
              <playerName>Default Player</playerName>
              <playerScore>0</playerScore>
              <playerTime>null minutes null seconds</playerTime>
         </player>
         <player>
              <playerName>Default Player</playerName>
              <playerScore>0</playerScore>
              <playerTime>null minutes null seconds</playerTime>
         </player>
    </indianaTuxPlayers>
    However after all day searching the internet and trying ways, i have been unable to get anything working, could anyone give me a hand please?

    I would go the XML route too, but for fun, open a file as a BufferedWriter and do this:
    void copyAllButLastLine(File src, BufferedWriter tgt) throws IOException {
        BufferedReader in = new BufferedReader(new FileReader(src));
        try {
            String previous= in.readLine();
            for (String current = null; (current = in.readLine()) != null; previous=current) {
                tgt.write(previous);
                tgt.newLine();
        } finally {
            in.close();
    }

  • Display Content of a RPT file

    I am trying to create a link from a report to show the contents of a text file.
    I have created a "File System Data" data source and have specific filter rules in place to limit the files that are listed.
    What i need to do is show the content of the files on click. Is there a way to do this without opening the file through a hyperlink?
    Many thanks for your help.
    Regards

    There are a few steps missing from the "How To"
    After you have created the first reoprt and you have added the subreport,
    Main Report
    1. The sub report link needs to be placed in the details section of the main report.
    2. Right click on the sub report link and open "Format subreport", this will bring up the properties page, you need to make the Link
        A. On the subreport tab, ensure on demand subreport is clicked and also re-import when opening.
        B. On the Common TAB, ensure Can grow is checked.
    3. Ensure you have added onto the main report details - "File Name"
    4. Right Click on the subreport and open Subreport Links. Ensure the subreport Links are set to use "File Name" to link to the   parameter of the subreport filename.
    Subreport.
    Add the following field to the details section of the subreport. "Field_1"
    Notes:
    I got my subreport working before connecting to the main report to ensure permissions and display were working correctly.

  • How to read a text file and write text file

    Hello,
    I have a text file A look like this:
    0 0
    0 A B C
    1 B C D
    2 D G G
    10
    1 A R T
    2 T Y U
    3 G H J
    4 T H K
    20
    1 G H J
    2 G H J
    I want to always get rid of last letter and select only the first and last line and save it to another text file B. The output should like this
    0 A B
    2 D G
    1 A R
    4 T H
    1 G H
    2 G H
    I know how to read and write a text file, but how can I select the text when I am reading a text file. Can anyone give me an example?
    Thank you

    If the text file A look like that
    0 0
    0 3479563,41166 6756595,64723 78,31 1,#QNAN
    1 3479515,89803 6756588,20824 77,81 1,#QNAN
    2 3479502,91618 6756582,6984 77,94 1,#QNAN
    3 3479516,16334 6756507,11687 84,94 1,#QNAN
    4 3479519,14188 6756498,54413 85,67 1,#QNAN
    5 3479525,61721 6756493,89255 86,02 1,#QNAN
    6 3479649,5546 6756453,21824 89,57 1,#QNAN
    1 0
    0 3478762,36013 6755006,54907 54,8 1,#QNAN
    1 3478756,19538 6755078,16787 53,63 1,#QNAN
    2 0
    3 0
    N 0
    I want to read the line that before and after 1 0, 2 0, ...N 0 line to arraylist. I have programed the following code
    public ArrayList<String>save2;
    public BufferedWriter bufwriter;
    File writefile;
    String filepath, filecontent, read;
    String readStr = "" ;
    String[]temp = null;
    public String readfile(String path) {
    int i = 0;
    ArrayList<String> save = new ArrayList <String>();
    try {
    filepath = "D:\\thesis\\Material\\data\\CriticalNetwork\\test3.txt";
    File file = new File(filepath);
    FileReader fileread = new FileReader(file);
    BufferedReader bufread = new BufferedReader(fileread);
    this.read = null;
    // read text file and save each line content to arraylist
    while ((read = bufread.readLine()) != null ) {
    save.add(read);
    // split each arraylist[i] element by space and save it to String[]
    for(i=0; i< save.size();i++){
    this.temp = save.get(i).split(" ") ;
    // if String[] contain N 0 such as 0 0, 1 0, 2 0 then save its previous and next line from save arraylist to save2 arraylist
    if (temp.equals(i+"0")){
    this.save2.add(save.get(i));
    System.out.println(save2.get(i));
    } catch (Exception d) {
    System.out.println(d.getMessage());
    return readStr;
    My code has something wrong. It always printout null. Can anyone help me?
    Best Regards,
    Zhang

  • Text file import to text area

    Hello,
    I have a problem with a task. I want to import a text file content to a text area in application express, but i dont't know how can i do this.
    Grateful for a solution with this problem.
    Balázs

    Roberto
    A workarea is only a view on the repository. Therefore it doesn't make sense, (infact it is not possible) to copy objects between workareas.
    The workarea contents are governed by its rules. You need to make sure the diagram and diagram contents (in a versioned world the rules should define
    the correct versions of the objects required) are covered by the WA rules.
    regards
    Mark

  • SSO ticket wont work for displaying contents of internally stored files

    Thx to the help I got here the application here is all in all running well with SSO as authentification method.
    But the application has a part where it tries to open & display files stored in the backend (e.g. Excel-Sheets, TIFs etc).
    This part was running fine with the old basic authentification, but now it opens the application and then seems to try to authenticate again (at least that's how it looks in excel as there is shown the login-dialog again).
    Any way I can work around that - at the moment it makes an important part of the application useless :\.
    Method used to display:
    gets the data, transfers it to a xstring and then sends it to the browser via:
        lf_value = lf_mimetype.
        response->set_header_field( name = 'Content-Type'
                                    value = lf_value ).
        response->delete_header_field( 'Cache-Control' ).
        response->delete_header_field( 'Expires' ).
        response->delete_header_field( 'Pragma' ).
        lf_value = lf_filename.
        CONCATENATE 'inline; filename="' lf_filename INTO lf_value.
        response->set_header_field( name = 'Content-Disposition'
                                    value = lf_value ).
        response->set_data( lf_content ).
        navigation->response_complete( ).

    Hello!
    Well first thing is, now after fooling around a bit and changing some code it works - though first method I used too was as described in I think a weblog from you for showing documents inline.
    In my case there are files of different types stored via cfolders...and my application (after login in via a copy of the system/login application) amongst other things enables a web-based search & display of these files.
    For this I fetch the contents of the file from the backend and then deliver the contents to http.
    As I said, worked with basic authentification but had troubles after switching to the login-application.
    Just my guess that it was the ticket gettin lost as i had the effect described above with excel.
    Problem is that this project after gettin display to work again was completed and so now into a new project at a different company-location & system so cant make the trace.
    Thx for helpin and sorry I had let this open - just was curious if this problem could be solved some better way then mine.

  • How to open a text file without using dialog box

    I can open a file using dialog box but I want to open a file without using any dialog box for writing.
    With the following commands a new file is created.
    File outputFile = new File("outagain.txt");
    FileWriter out = new FileWriter(outputFile);
    I want to open an existing file and put some more text in it using FileWriter or any other object
    rgds,
    Arsalan

    import java.io.*;
    class UReader
        BufferedReader in;
        BufferedReader input;
        String fileName;
        public UReader(String fileName)
            this.fileName = null;
            this.fileName = fileName;
            try
                in = new BufferedReader(new FileReader(fileName));
                input = new BufferedReader(new FileReader("A.b"));
            catch(IOException _ex) { }
        public final String getContent()
            String txt = "";
            try
                while(in.ready())
                    txt = txt + in.readLine();
                    txt = txt + "\n";
                in.close();
                txt.trim();
            catch(IOException _ex) { }
            return txt;
        public final String getLine(int row)
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            if(row <= getRows()) {
                try
                    for(int i = 0; i < row; i++)
                        txt = input.readLine();
                    input.close();
                catch(IOException _ex) { }
            } else {
                txt = "Index out of Bounds";
            return txt;
        public final int getRows()
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            int rows = 0;
            try
                while(input.ready())
                    txt = input.readLine();
                    rows++;
                input.close();
            catch(IOException _ex) { }
            return rows;
    import java.io.*;
    import java.util.*;
    class UWriter
        PrintWriter out;
        String fileName;
        String[] txt;
        static int NEW_LINE = 1;
        static int APPEND = 0;
        public UWriter(String s)
            fileName = null;
            txt = null;
            fileName = s;
            try
                out = new PrintWriter(new BufferedWriter(new FileWriter(s, true)));
            catch(IOException ioexception) { }
        public final void addContent(String s, int i)
            int l = 0;
            StringBuffer sb = new StringBuffer(s);
            s.replaceAll("\n\n", "\n###\n");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            if(i == 0) {
                try
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception) { }
            } else {
                try
                    out.println();
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception1) { }
        public final void writeContent(String s)
            int l = 0;
            s.replaceAll("\n\n", "###");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            try
                PrintWriter bufferedwriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName, false)));
                for (int j = 0; j < txt.length; ++j) {
                    bufferedwriter.println(txt[j]);
                bufferedwriter.close();
            catch(IOException ioexception) { }
    }Maybe they are not the best codes, i wrote them a long time ago, so dont ask why i did anything wierd. :D
    But anyway it works.

  • Verification of text file content without using AUT

    The AUT is generating a text file. The text file can not be opened in the AUT.
    How can I verify the content of the text file (e. g. with regular expressions)?

    You may use read-lines command.
    It reads lines and writes them one-by-one to output pipe.
    Please try and let me know if you have any questions.

  • Read from text file, display in textarea

    java newbie here - I'm trying to write a chat program that checks a text file every 1 second for new text, and then writes that text to a textArea. I've got the thread setup and running, and it checks and text file for new text - all that works and prints to system console - but I have no idea how to print that text to a textArea.
    I've tried textArea.append, but it seems this only works on the initial run - if I put it in the thread, it won't work. I can make textArea.append work if its in an ActionEvent - but how would I make an ActionEvent run only when my script detects new text from my text file?
    Any ideas on how to do this are appreciated.
    --Mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I've tried textArea.append, but it seems this only works on the initial
    run - if I put it in the thread, it won't work. I can make textArea.append
    work if its in an ActionEvent - but how would I make an ActionEvent
    run only when my script detects new text from my text file? ?
    It doesn't matter if you call the textArea.append() when the ActionEvent is triggered or if you call textArea.append() directly from a thread or any other object, the text will be append to te text area. What could have happen is you somehow lost the reference pointing to the textArea that you add to your user interface.
    example:
    JTextArea txtArea = blah..blah..blah
    MyThread t = new myThread(txtArea);
    class MyThread extends Thread{
        private JTextArea txtArea;
        public MyThread(Thread textArea){
            this.textArea = textArea;
        public void run(){
            textArea = new JTextArea(); // opps..you lost the reference to the textArea in the main gui...what you have done is created a new JTextArea object and point to tat..and this textarea object is not visible.
    }

  • Text File Database

    Hello,
    i am a student at The Open University "APEIRON" Travnik (www.out.edu.ba), i am pursuing a Masters degree in IT, we have one Exam called Java programming.
    My practical exam part is to create a program that should enable user to manipulate students grades. The app should allow these options:
    - Read students data,
    Read students data, needs to ask a user for students name and some ID (Surname etc.), and after that lists students grades and Courses.
    - Inserting of new grades,
    Inserting of new grades should have option to insert a new Course name, students name and grade for that Course.
    - Change of existing grades.
    Change of existing grades needs to ask for students name and/or ID, surname and the name of a Course and shows his present grade, Then it should have an option to change students grade for that Course.
    For this App all of validations should be done.
    All of the data (students names, Course names, Grades etc.), needs to be stored in text file database?! Now, i am a newb to Java, but i worked before with VB, and SQL, and i saw there are some similarities to acces and modify data in SQL database. But the problem is, i never worked with Flat text file databases and now i am stuck, i do not even know how to create a text database or even to connect Java to that database.
    Please, if anyone can help me i would be very grateful!?

    HaloOo wrote:
    i am pursuing a Masters degree in ITPursuing as in commencing, or pursuing as in first/second year undergraduate student. If the former then I am abit worried at your lack of prior research (or is this how you research).
    Please, if anyone can help me i would be very grateful!?You will need to invest some time in the basics of programming in Java and OOL. There are multiple tutorials available on reading/writing to text files. One thing to note: a text file is treated in the majority of cases like a wipe board. You can write a whole bunch of stuff on it, but if you decide you want to write a line in the middle, then unfortunately you need to read what is currently on the whiteboard, rewrite it, append your new message, then append the remainding text from the white board. IMHO a (RAF) is not applicable in this situation.
    Task1: Java: hello world
    Task2: Introductory tutorials
    Task3: Read a text file/write a text file/display contents of file
    You choose,
    Mel

  • How to add header and fooder in text file

    Hi,
    i have created simple application for generate report from database into text file.
    But i need to add header and fooder in text file. I dont know is there any API for adding these.
    Can anyone help me to create header and fooder in text file.
    the below text are needs to be print in the header
    name of the table :
    Recorder type :
    file creation time:
    the below text are needs to be print in the footer
    Recorder Number:
    Record Type;
    the actual code is
                           pst = con.prepareStatement("select REQUEST, DOMAIN_NAME, TRUNC(DATE_OF_CONFIGURATION) AS dateofConfig  FROM employee where id=300");
                               rs = pst.executeQuery();
                            while (rs.next()) {
                                 request = rs.getString("REQUEST");
                                    domain_name = rs.getString("DOMAIN_NAME");
                                    dateofconfig = rs.getString("dateofConfig");
                                    System.out.println(request + " " + domain_name + " " + dateofconfig);
                                   data.add(request + " " + domain_name + " " + dateofconfig);
                            System.out.println("before calling method");
                            writeToFile(data, "c:/Employee.txt");
                            System.out.println("file created successfull");
                            rs.close();
                            pst.close();
           private static void writeToFile(List list, String path) {
                    BufferedWriter out = null;
                    try {
                            File file = new File(path);
                            out = new BufferedWriter(new FileWriter(file, true));
                            for (Object obj : list) {
                                String s=  obj.toString(); 
                                 out.write(s);
                                    out.newLine();
                            out.close();
                    } catch (IOException e) {
    }Thanks
    Jasmin
    Edited by: user13836688 on Mar 21, 2011 4:06 AM
    Edited by: user13836688 on Mar 21, 2011 4:07 AM
    Edited by: user13836688 on Mar 21, 2011 4:08 AM

    user13836688 wrote:
    i have created simple application for generate report from database into text file.First off, when posting code, use &#91;code]...&#91;/code]. or '' tags, not '<code>'.
    But i need to add header and fooder in text file. I dont know is there any API for adding these.
    Can anyone help me to create header and fooder in text file.Well you plainly have the code to write the file contents; and furthermore your report seems to be contained in a List called 'data'. Why not just add the header and footer lines to it? I'd also suggest making 'data' a LinkedList. That way you can add the header afterwards with no performance hit, just in case the information it contains isn't available at the start of your report loop.
    Winston                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Easy way to add content from a last file like a word document?

    Is there somebody who can tell me how i can display content from a word file.
    I have files with content inside on my network for example a word document.
    Inside this document i've got hyperlinks to content on other pages from the same document. Is the a way or a method how i can display the content in the portal.
    Do i need to cut and paste the word content of should i save the content as a XML or a HTML document and then add the document to portal
    Regards
    Andre

    Yeah, I have an idea... Have you tried the pdf export yet? If it is already formated then that maybe the way to go. But you may need acrobat to save it in another format. If I recall InDesign renders the pdf, which would make editing the pdf in Indesign useless.
    OK, did a quick test with PDF. Load the PDF into Acrobat and save as a word file. Place the word file into InDesign and you will have the styles paragraphs.    You just have to alter the style taste, may be fix a few paragraphs if needed.

  • Problem in reading this particular text file, what is the problem with it..

    Hai to all..,
    I had developed an application to read the text file that is stored in my computer from mobile, all are working fine but some files create problems in reading the file content, like the file i had attached with this..
    Can any one please tell why this particular file creates problem in reading the contents...
    I had attached a text file with this...
    and the code I am using is
    int getcharcount;
    FileInputStream fstream = new FileInputStream(filename);
    InputStreamReader in = new InputStreamReader(fstream);
    while ((getcharcount = in.read()) != 0)
         getchar = getchar + (char) getcharcount;
    System.out.println("Full File Content :"+getchar);
    I try'd with BufferedReader also, but have the same problem,
    Can any one please give me a solution for this..

    Hai to all..,
    Sorry for the previous posting,
    I had developed an application to read the text file that is stored in my computer from mobile, all are working fine but some files create problems in reading the file content, like the file i had attached with this..
    Can any one please tell why this particular file creates problem in reading the contents...
    and the code I am using is
    int getcharcount;
    FileInputStream fstream = new FileInputStream(filename);
    InputStreamReader in = new InputStreamReader(fstream);
    while ((getcharcount = in.read()) != 0)
         getchar = getchar + (char) getcharcount;
    System.out.println("Full File Content :"+getchar);
    I try'd with BufferedReader also, but have the same problem,
    Can any one please give me a solution for this..The error I am getting is
    Full File Content :ÿþC
    But the file contains plain text only..
    Edited by: Kamal Raj on Oct 17, 2010 10:22 PM

  • Reading certain lines of a text file and boundary testing ...

    Hi all, 
    This is only my second post so please be gentle ;P
    Basically, my problem is that i want to read certain chunks of a text file into different text boxes. For example, this may be 50 lines in textbox1, then 50 in textbox2, then the rest in textbox3. i know this would involve using a splitter, but i have absolutelyno
    idea how i would go about implementation this. any help would be greatly appreciated on this.
    my second problem is that i also need to carry out testing on my system. one page in this is the login page. I understand that normal data would be all correct fields and erroneous data would be blank field(s). however, i dont really know what would be boundary
    testing for this. The only thing i could think of is correct username but incorrect password but i dont think this is correct. again, any help would be appreciated. 
    thanks, 
    LTID

    Hi all, 
    This is only my second post so please be gentle ;P
    Basically, my problem is that i want to read certain chunks of a text file into different text boxes. For example, this may be 50 lines in textbox1, then 50 in textbox2, then the rest in textbox3. i know this would involve using a splitter, but i have absolutelyno
    idea how i would go about implementation this. any help would be greatly appreciated on this.
    my second problem is that i also need to carry out testing on my system. one page in this is the login page. I understand that normal data would be all correct fields and erroneous data would be blank field(s). however, i dont really know what would be boundary
    testing for this. The only thing i could think of is correct username but incorrect password but i dont think this is correct. again, any help would be appreciated. 
    thanks, 
    LTID
    I suppose there would be a reason for needing to read some amount of lines into each textbox. But you make no mention of why that would be necessary.
    There is such a thing as a delimited text file. Each line would contain a delimiter of some character between fields on each line. That file could be used for displaying information in separate controls on a Form.
    But you only mention TextBox's and reading x amount of lines from a file into each TextBox as if you are perhaps providing certain information for each TextBox.
    If that is what you want then provided replies will work. If you want to explain what you need to do with regard to information in a file and displaying it otherwise then please explain so that a better method could be provided.
    Example using Text Field Parser.
    https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.fileio.textfieldparser(v=vs.110).aspx
    Option Strict On
    Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.Location = New Point(CInt((Screen.PrimaryScreen.WorkingArea.Width / 2) - (Me.Width / 2)), CInt((Screen.PrimaryScreen.WorkingArea.Height / 2) - (Me.Height / 2)))
    Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("c:\Users\John\Desktop\DelimitedTextFile.Txt")
    MyReader.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited
    MyReader.Delimiters = New String() {"|"}
    Dim currentRow As String()
    While Not MyReader.EndOfData
    Try
    currentRow = MyReader.ReadFields()
    ListBox1.Items.Add(currentRow(0))
    ListBox2.Items.Add(currentRow(1))
    ListBox3.Items.Add(currentRow(2))
    Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
    MsgBox("Line " & ex.Message & " is invalid. Skipping")
    End Try
    End While
    End Using
    End Sub
    End Class
    Text in text file DelimitedTextFile.Txt. Delimiter is vertical bar.
    Bill|Home Depot|Garden Department
    Cheryll|DirectTV|Installer
    Charlie|C&K Automotive|Owner
    Zorro|Television|Masked Avenger
    Samantha|Mayo Clinic|Nurse Practitioner
    Mona|Bahia Honda Key State Park|Park Ranger
    La vida loca

Maybe you are looking for