CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2014
    Posts
    2

    I need you help Talents .. Please

    Hello every one
    I need your help please talents
    I have ms vb 2012

    Lets say i need to make a simple project that i need to update data in a text file

    lets say in the project i have
    textfiled 1
    testfiled 2
    textfiled 3
    and a botton called update

    when i push text in the textfiles and press update , i need the external textfile.txt to be updated with the new values each value in a separate line
    but also i need the data to be like this way
    for example for textfiled 1 to write data to the textfile like this (fixed text like " &t1=" ) then the text written in the textfiled 1
    so the final data that will be updated in the text file will be like this way :
    &t1=text from textfiled 1


    thanks a lot

    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: I need you help Talents .. Please

    So, what's the problem? Write some code and see what happens.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: I need you help Talents .. Please

    In a case such as this ( you using VB 2012 ) it is extremely important to let us know for which platform you are making this app for. is it for the Window Store, or a Desktop application? There is a major difference in file handling between the two.

  4. #4
    Join Date
    Feb 2014
    Posts
    2

    Re: I need you help Talents .. Please

    THANKS ALL
    i`m building this application for windows 7 desktop as an exe file , not for mobile or other , windows 7 for desktop computer as exe file, sorry i`m new to vb , if you please to send me a sample project to download . .


    regards

  5. #5
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: I need you help Talents .. Please

    We will not do everything for you, because that is not how it works around here. What have you done so far?

  6. #6
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: I need you help Talents .. Please

    Well first off you do not update a text file of this sort. You write it, then you overwrite it to make a change, always writing the entire file even if only one line has changed.

    I would suggest that you look at the system.io.streamwriter class and the WriteLine method within that class then see how far you can get.
    Always use [code][/code] tags when posting code.

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

Featured