Results 1 to 5 of 5

Thread: How To Read TXT File And Place In Special Labelxyz.Caption?

  1. #1

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    How To Read TXT File And Place In Special Labelxyz.Caption?

    I need to know how to extract a exact line from the text file, and then place it into an exact Labelxyz.Caption control.

    The line of text in the text file, will be the same all the time. Also the control that is linked to that particular line, will also be the same for every text file that is made by the Client App of this project, that I am making with VB6 Pro.
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How To Read TXT File And Place In Special Labelxyz.Caption?

    Not sure exactly what you are talking about but is this what you want?
    Code:
    Dim TextData As String
    
    Open TextFile For Binary As #1
    TextData = String(LOF(1), 0)
    Get #1, 1, TextData
    Close #1
    
    q = Instr(TextData, ExactLineOfText)
    
    If q > 0 Then
      Labelxyz.Caption = Mid(TextData, q, Len(ExactLineOfText))
    End if

  3. #3
    Hyperactive Member
    Join Date
    May 2006
    Posts
    389

    Re: How To Read TXT File And Place In Special Labelxyz.Caption?

    I would recommend to use the FSO Com Object...
    Visual Basic Rules!!!!!

  4. #4

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: How To Read TXT File And Place In Special Labelxyz.Caption?

    jmsrickland, could you please check the code that you had sent to me; I had found many errors in the code.
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  5. #5
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: How To Read TXT File And Place In Special Labelxyz.Caption?

    In his post there are certain things that you need to replace like TextFile, etc... Those are just descriptions to give you a hint on what to place in those values...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

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