-2

i create form multi language in vb. now i do want last language changed save in ini file.

and again open application show last language.

  • 1
    Don't use tags (vb.net, vb6) in this way. What language you are using? What have you done so far? Please go to the Help Center and read all stuff e.g. at http://stackoverflow.com/help/how-to-ask – help-info.de Oct 28 '16 at 06:12
  • If your question is about VB6 it is a duplicate of [this question](http://stackoverflow.com/q/165796/15639) and you should read [this answer](http://stackoverflow.com/a/165801/15639) possibly including my comment underneath it. – MarkJ Oct 28 '16 at 11:17
  • If your question is about VB.Net you should probably save the last language in a settings file as shown [in this question](http://stackoverflow.com/q/5229445/15639) – MarkJ Oct 28 '16 at 11:19

1 Answers1

0

I would prefer preserving the data to xml file or DB rather than in ini file.

Anyway for ini file, You need to use the Win32 API WritePrivateProfileString and GetPrivateProfileString. Refer the link1 or link2. You can place the code in module or read it in Form Load event and save it on Form Unload/close event.

Mukul Varshney
  • 3,131
  • 1
  • 12
  • 19
  • `ini.AddSection("TEST_SECTION").AddKey("Key1").Value = "Value1";` can more help about this. example: my language fr-FR i want set on this saved on ini file – Javad Rajabzade Oct 28 '16 at 04:29
  • INI versus XML for VB6 is discussed on this question http://stackoverflow.com/q/547730/15639 – MarkJ Oct 28 '16 at 11:18
  • Suggestion for XML is because of extensibility. same piece of code can be reused in multiple projects, or webservices, etc. Its not just vb6 it's also vb.net as mentioned in tags. Many utilities available for XML. – Mukul Varshney Oct 28 '16 at 11:36