5 Replies - 890 Views - Last Post: 06 February 2013 - 09:18 AM Rate Topic: -----

#1 scdogas321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 06-February 13

How to save selected combobox index after closing program?

Posted 06 February 2013 - 12:29 AM

How can I save combobox selected index after closing program? In my form I wrote:

ComboBox1.SelectedIndex = 0


My Problem example I have language combobox. When I change the language from English to Spanish its changing well, but when I close program and run it again my program language is English not Spanish.

How can I save my selected index (Language) after closing the program?
I've searched everywhere and I didn't find any helpful information.

Is This A Good Question/Topic? 0
  • +

Replies To: How to save selected combobox index after closing program?

#2 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: How to save selected combobox index after closing program?

Posted 06 February 2013 - 04:57 AM

[*]Q: ... save data, save properties, save environmental variables, serialize my data/class?
A:
Was This Post Helpful? 0
  • +
  • -

#3 scdogas321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 06-February 13

Re: How to save selected combobox index after closing program?

Posted 06 February 2013 - 05:26 AM

Can you just explain? Because I didn't get it
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: How to save selected combobox index after closing program?

Posted 06 February 2013 - 06:17 AM

You need to save your settings.
You can do that as a text file, serialize your Preferences object to XML, save in the application settings... There are many ways you can save data. You need to decide what works best for your needs and application design.

Quote

Because I didn't get it

There is no way you did any of those tutorials in the time between when I posted the link and you said you don't get it.

You don't get it because you couldn't be bothered with making an effort to learn something new. Nobody is going to take you by the hand and explain it all to you special like you're a unique little snow flake. Read the tutorials. Make an effort. Put in some work. Just like everyone else. Or find a different career path. Because coding is not for people too lazy to make an effort and hope to just have the guy in the cubical next to them explain it slowly in small words.

Posted Image
Was This Post Helpful? 0
  • +
  • -

#5 scdogas321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 06-February 13

Re: How to save selected combobox index after closing program?

Posted 06 February 2013 - 09:09 AM

I've pressed all of your links and i wrode everything when you posted it.
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: How to save selected combobox index after closing program?

Posted 06 February 2013 - 09:18 AM

View Postscdogas321, on 06 February 2013 - 10:09 AM, said:

I've pressed all of your links and i wrode read everything when you posted it.


You might have skimmed through reading the articles. But you certainly didn't *do* the tutorials. Meaning you didn't actually build the example programs and *work* through the tutorials to learn something. Simply couldn't have in the 1 hour 9 minutes between postings.

For example: Did you work through how to write and read a text file?
Because in its simplest form you could just write textfile with the one value you want to persist when you relaunch the application.

Or what about the last link for Application settings? Did you work through that one? Did you try to add an application setting for the one value you want?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1