Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[Code(s)] Save Data Into The .exe!

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.Text
Code
Textbox1.Text = My.Settings.theone

So 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!
FR1908
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)
Yes sorry used the wrong name.. Updated
FR1908
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.
(Sep 21, 2009 10:39 PM)6e756c6c 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
You're nothing but a whiskey Delta
This topic is old?
I don't think it's possible to save actually user data into the .exe?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by aktmxj723Jul 4, 2020 06:40 PM 7 214 Jul 4, 2020 06:40 PM
Last Post: Roses
[Python] by Red-LeonardOct 23, 2019 09:46 PM 4 150 Oct 23, 2019 09:46 PM
Last Post: Red-Leonard
[Shell] by MαximFeb 20, 2017 11:10 AM 5 278 Feb 20, 2017 11:10 AM
Last Post: Mαxim