Results 1 to 13 of 13

Thread: saving user values

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    saving user values

    Hi this is a little tricky to explain. What I want is a series of labels to be saved ( these labels make up 1 group)
    But, to make it a little more complex, I want the user to be able to save more than one group.
    These groups need to be saved in such a way that I can later call on a specific group.

    Thanks for any advice

    Dan

  2. #2
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    Re: saving user values

    2 things
    first, is that you want to save the label text
    second you want to save the groups to where , i mean in to a database ?
    how to differentiate the groups from one another ? is these are lies with in a group box ?
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    Yes I want to save the label text.
    I want to save the groups within the application (like using my.settings)
    as for differentiating the groups, I am not sure how I would do this. hence the question

  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: saving user values

    One of the Settings types is a String Collection. Use one for each group.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    The problem here is I need to save multiple times, I have no idea how many times in total, the user makes this choice by just saving whatever they like whenever they like. How would I do this?

  6. #6
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    Re: saving user values

    i think you go for a simple access database or simple xml files
    http://www.dotnetperls.com/xmlwriter-vbnet
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    Quote Originally Posted by make me rain View Post
    i think you go for a simple access database or simple xml files
    http://www.dotnetperls.com/xmlwriter-vbnet
    Ok, I just finished having a look at what you have suggested, seems like a good way to go. so saving the groups is pretty straight forward, the obvious point here is, for each group would I need a new file? or even benefit from it?

  8. #8
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: saving user values

    So you're happy to save a complete XML file every time there's a change, and even multiple files multiple times, but not Settings which meet your original brief of being self-contained?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    Quote Originally Posted by dunfiddlin View Post
    So you're happy to save a complete XML file every time there's a change, and even multiple files multiple times, but not Settings which meet your original brief of being self-contained?
    i'm not sure how to use string collections?

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    I'll tell you what, I will upload my project, so you can get an idea of what is going on and what is meant to happen

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    Here you go.
    Attached Files Attached Files

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    So, can anyone suggest methods that best suit my requirements and then if need be help me with the methods.

  13. #13

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2008
    Posts
    413

    Re: saving user values

    well, I tried this

    Code:
        Public Shared Sub Main()
    
            Dim mycol As New StringCollection()
            Dim base() As String = {My.Settings.calc1, My.Settings.calc2, My.Settings.calc3, My.Settings.calc4, My.Settings.calc5, My.Settings.calc6, My.Settings.calc7, My.Settings.calc8}
            mycol.AddRange(base)
    
        End Sub
    Values were added but never saved... any ideas?

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