Results 1 to 8 of 8

Thread: save form in run time ??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2006
    Posts
    131

    save form in run time ??

    Hello

    i need to know how can i save a form in run time

    to explain why (the form contains a textbox with some words and user have to modify this text its similer to MSword formating)

    i need to let the user save the form if he didn't finish his work and he want to continue later

    how can i do this?

  2. #2
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: save form in run time ??

    mm no, you can't save a form, you can save data, then you have to load your Form and load that data into it. You can save/load from file, database, registry.. which will be?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2006
    Posts
    131

    Re: save form in run time ??

    from a text file

  4. #4

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2006
    Posts
    131

    Re: save form in run time ??

    RichTextBox

  6. #6
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: save form in run time ??

    The easiest way would be to use a CommonDialog control (ToolBox, right click, Components... Microsoft Common Dialog Control). Then use this:

    VB Code:
    1. 'to open
    2. CommonDialog1.Filter = "Text files (*.txt)|*.txt"
    3. CommonDialog1.ShowOpen
    4.     RichTextBox1.LoadFile CommonDialog1.FileName
    5.    
    6. 'to save
    7. CommonDialog1.Filter = "Text files (*.txt)|*.txt"
    8. CommonDialog1.ShowSave
    9.     RichTextBox1.SaveFile CommonDialog1.FileName

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jul 2006
    Posts
    131

    Re: save form in run time ??

    it didn't work after saveing i opend the file

    it contains some words with no meaning

  8. #8
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: save form in run time ??

    Maybe the problem is that .TXT extension won't save all that formating, you should use .RTF extension for that.

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