Results 1 to 3 of 3

Thread: VS 2008 Code to save some settings

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2009
    Location
    VietNam
    Posts
    81

    VS 2008 Code to save some settings

    I created a form and a checkbox with default name in visual basic 2008

    as i move mouse wheel, i can choose a picture for background image

    i can also change the checkbox's forecolor when i press any key on the keyboard

    and my first problem is i want to save the new background image which i has already chosen
    as i close my form and so does the checkbox's forecolor but i don't how


    another difficulty i had is that i really want to move the checkbox to wherever i like
    and save this setting but i found no solution due to the fact that i've just learned VB.NET on my own for a few weeks.

    SO can anyone do me a favour? can you write some detail code with some explainations for my problems please?

    my project is attached below
    Attached Files Attached Files
    • File Type: rar 1.rar (59.7 KB, 36 views)

  2. #2
    Lively Member
    Join Date
    Feb 2010
    Posts
    120

    Re: VS 2008 Code to save some settings

    You could do something like
    Code:
    TextBox1.Text = CheckBox1.Location.X
    TextBox2.Text = CheckBox1.Location.Y
    on the form closing property or in any save settings button
    and then form loading property
    load those to your checkbox1.location

  3. #3
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: VS 2008 Code to save some settings

    Quote Originally Posted by rocker123 View Post
    I created a form and a checkbox with default name in visual basic 2008

    as i move mouse wheel, i can choose a picture for background image

    i can also change the checkbox's forecolor when i press any key on the keyboard

    and my first problem is i want to save the new background image which i has already chosen
    as i close my form and so does the checkbox's forecolor but i don't how


    another difficulty i had is that i really want to move the checkbox to wherever i like
    and save this setting but i found no solution due to the fact that i've just learned VB.NET on my own for a few weeks.

    SO can anyone do me a favour? can you write some detail code with some explainations for my problems please?

    my project is attached below
    Whoa did you deliberately make that post hard to read? You're unlikely to get anyone writing you detailed code because this isn't rent-a-coder.com but you will get good advice that will help you on the way if you make your posts readable.

    You need to investigate My.Settings if you are talking about persisting values between one session and the next. There's an article here about it - I havent read it but it ought to cover what you need based on its title, if not do a google search and you'll find plenty of articles.

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