![]() |
|
[.NET] [Code(s)] Save Data Into The .exe! - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [Code(s)] Save Data Into The .exe! (/showthread.php?tid=151533) |
[Code(s)] Save Data Into The .exe! - The-One - Sep 21, 2009 Hello HF Members, Akay, Lets Start! NOTE : YPN = YourProjectName! Project > "YPN" Properties - A New Tab Opens Click Settings Click Into The TextBox UNDER "Name" Enter Something Here Like "theone" Switch back to your form. Now the codes part : * I would use it into a button! Code My.Settings.theone = Textbox1.TextCode Textbox1.Text = My.Settings.theoneSo The First code will Save the TextBox1.Text into the "theone" value. The Second code will Load the "theone" value into TextBox1.Text Thanks for reading! Have fun! * - Feminist - Sep 21, 2009 ERROR: My.Settings.Save = Textbox1.text returns the error: Expression is a value and therefore cannot be the target of an assignment. Here is how you do it, without causing the above error. You have to make a string type in myproject. 1. Goto my project 2. Goto settings tab 3. Change the name of 'Setting' to text1 4. Make the 'type' 'string' 5. Make the 'scope' 'user' 6. Make the value 'Save' or shit, anything you want 7. On form1.load type this : My.Settings.text1 = TextBox1.Text (this saves) 8. On button1.click type this : TextBox1.Text = My.Settings.text1 (this saves) * - The-One - Sep 21, 2009 Yes sorry used the wrong name.. Updated * - 6e756c6c - Sep 21, 2009 Ummm, this topic name is misleading - My.Settings actually saves to files in the Settings folder... o_0 It doesn't directly inject any data into the executable. * - -=C0d3ak=- - Nov 17, 2009 (Sep 21, 2009 10:39 PM)Aeonhack Wrote: Ummm, this topic name is misleading - My.Settings actually saves to files in the Settings folder... o_0 It doesn't directly inject any data into the executable. I agree haha * - [Eprouvez] - Nov 18, 2009 This topic is old? I don't think it's possible to save actually user data into the .exe? |