| View previous topic :: View next topic |
| Author |
Message |
Micah Grandmaster Cheater
Reputation: 1
Joined: 30 Mar 2007 Posts: 833
|
Posted: Tue Mar 17, 2009 7:29 pm Post subject: Saving information in VB2008 |
|
|
Ok, I have a program where you input your stats. I want to know how I
can add a button that will save your stats, so you can load them next time.
I'm not sure what kind of file I would use to save it as.
Can anyone help me with the saving the information part?
Thanks, you guys always are a lot of help. |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Mar 17, 2009 7:34 pm Post subject: |
|
|
| you can save it as any type of file. just create it with CreateFile then read/write to it with ReadFile, WriteFile. not sure where your problem lies.. the file 'type'/extension does not matter at all |
|
| Back to top |
|
 |
Micah Grandmaster Cheater
Reputation: 1
Joined: 30 Mar 2007 Posts: 833
|
Posted: Tue Mar 17, 2009 7:42 pm Post subject: |
|
|
| Okay, thanks, I just needed an idea on what code would be used. Thanks. |
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Tue Mar 17, 2009 7:46 pm Post subject: |
|
|
Imports System.IO.FileStream _________________
|
|
| Back to top |
|
 |
FullyAwesome I post too much
Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
|
| Back to top |
|
 |
Jorg hi I post too much
Reputation: 7
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
|
Posted: Wed Mar 18, 2009 9:23 am Post subject: |
|
|
Save it to a file or registry? _________________
CEF will always stay alive. |
|
| Back to top |
|
 |
mStorm Expert Cheater
Reputation: 0
Joined: 21 Feb 2009 Posts: 107
|
Posted: Wed Mar 18, 2009 11:39 am Post subject: |
|
|
Use registry... It makes more sense than going oldschool and creating a .dat type file (unless you want to make these settings portable with program)
| Code: |
'Get Value
Value= My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\ProgramName", "KeyName", "")
'Set Value
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\ProgramName", "KeyName", "Value")
|
|
|
| Back to top |
|
 |
|