VB->Saving & Loading A File

  • Thread starter Thread starter Hareth
  • Start date Start date
H

Hareth

i want to make my app save certain things..so i can reload them after I
reopen my app..

ex.( save text1.text = "hi" .. to file.so i can to load it to my app later)

how can i do that?

i need examples...b/c im amatuer like a motha...

so i need a save & load sample. for multiple text & labels

anyone, feel free to respond please!!!
Thanx
 
Hi Hareth
You need to add an application configuration file to your program . this is
an xml file that you can load values from at runtime .
In that xml under the tag called application setting you can add a key
value pairs , then you can use the key within your application to get the
value. So if you have something like this in your config file
<appSettings>
<!-- connection -->
<add key="connS" value="uid=EDSCUser;password=123456789;data
source=server;persist security info=False;initial catalog=ESCEMEPu34 ? />
<!-- from mail address -->
<add key="greating" value="Hi" />
</appSettings>
You can later in your code get the value this way
String mygreating = ConfigurationSettings.AppSettings.Get("greating")
You can read more on this link
http://blogs.msdn.com/suzcook/archive/2004/05/14/132022.aspx
hope this helps
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top