CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: saving files

  1. #1
    Join Date
    May 2001
    Posts
    9

    saving files

    Hi,
    I have 2 questions:
    1)How can I save the text from textbox into a file but not as a .txt (can I specify the type of document). And,
    2)If that file already exists can i overwrite it automatically without having to confirm?
    thanks


  2. #2
    Join Date
    Nov 2000
    Location
    Tokyo and Memphis
    Posts
    238

    Re: saving files

    Yes
    and
    Yes

    OK?

    Phil



  3. #3
    Join Date
    May 2001
    Posts
    24

    Re: saving files

    1.)

    Open "C:\blah.hgh" for Append as #1
    print #1, Text1.Text
    Close #1



    2.)

    Kill "C:\blah.hgh"
    Open "C:\blah.hgh" for Append as #1
    print #1, Text1.Text
    Close #1





  4. #4
    Join Date
    Nov 2000
    Location
    Tokyo and Memphis
    Posts
    238

    Re: saving files

    Can't you just use "output" instead of "append" and then you would't need to "kill" the file?

    Phil



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