Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Saving information in VB2008

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Micah
Grandmaster Cheater
Reputation: 1

Joined: 30 Mar 2007
Posts: 833

PostPosted: Tue Mar 17, 2009 7:29 pm    Post subject: Saving information in VB2008 Reply with quote

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
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Mar 17, 2009 7:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Micah
Grandmaster Cheater
Reputation: 1

Joined: 30 Mar 2007
Posts: 833

PostPosted: Tue Mar 17, 2009 7:42 pm    Post subject: Reply with quote

Okay, thanks, I just needed an idea on what code would be used. Thanks.
Back to top
View user's profile Send private message MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Tue Mar 17, 2009 7:46 pm    Post subject: Reply with quote

Imports System.IO.FileStream
_________________
Back to top
View user's profile Send private message Send e-mail
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Tue Mar 17, 2009 11:34 pm    Post subject: Reply with quote

the inbuilt settings section in visual studio (in your project's settings) is 100 times easier.

here's some links that should help.

http://www.codeproject.com/KB/vb/appsettings2005.aspx

http://www.aboutmydot.net/index.php/application-settings-in-vbnet

_________________
Back to top
View user's profile Send private message MSN Messenger
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Wed Mar 18, 2009 9:23 am    Post subject: Reply with quote

Save it to a file or registry?
_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
mStorm
Expert Cheater
Reputation: 0

Joined: 21 Feb 2009
Posts: 107

PostPosted: Wed Mar 18, 2009 11:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites