Tutorials Navigation
[VB.NET] How to make and save settings
Tutorial Name: [VB.NET] How to make and save settings
Category: PC Tutorials
Submitted By: Maj
Date Added:
Comments: 2
Views: 4,263
Related Forum: PC Building Forum
Share:
Ever wanted to be able to save certain elements of you're application? Let's say you wanted to save what that textbox said last, well here's how it's done:
Step 1.) Create you're application as you normally would, for me it's very simple with 1 textbox and 1 label
[ Register or Signin to view external links. ]
Step 2.) Now on the right toolbar right click your project name and select "Properties"
[ Register or Signin to view external links. ]
Step 3.) Now Select "Settings"
[ Register or Signin to view external links. ]
Step 4.) Now in the left hand column give your setting a name. The right hand side is the default value, leave this blank as it's needed for our use.
[ Register or Signin to view external links. ]
Step 5.) Go back & add this into your app. For me I want it to save the label text.
Step 6.) Add a timer with an interval of 1000. Add the following code to the timer:
[ Register or Signin to view external links. ]
Step 7.) Add the following code to the Form1_Load event:
[ Register or Signin to view external links. ]
Now I have a form that will automatically save the label text every second. However, for the text that has been saved to be displayed we need to make a new button and add the following code:
[ Register or Signin to view external links. ]
All done! Just like that we've made a setting which automatically saves! Amazing right?
Step 1.) Create you're application as you normally would, for me it's very simple with 1 textbox and 1 label
[ Register or Signin to view external links. ]
Step 2.) Now on the right toolbar right click your project name and select "Properties"
[ Register or Signin to view external links. ]
Step 3.) Now Select "Settings"
[ Register or Signin to view external links. ]
Step 4.) Now in the left hand column give your setting a name. The right hand side is the default value, leave this blank as it's needed for our use.
[ Register or Signin to view external links. ]
Step 5.) Go back & add this into your app. For me I want it to save the label text.
Step 6.) Add a timer with an interval of 1000. Add the following code to the timer:
My.Settings.Example1 = Label1.Text
My.Settings.Save()
[ Register or Signin to view external links. ]
Step 7.) Add the following code to the Form1_Load event:
[ Register or Signin to view external links. ]
Timer1.Start
Now I have a form that will automatically save the label text every second. However, for the text that has been saved to be displayed we need to make a new button and add the following code:
[ Register or Signin to view external links. ]
Label1.Text = My.Settings.Example1
All done! Just like that we've made a setting which automatically saves! Amazing right?
Ratings
Comments
Related Tutorials
- 01. Emulating Xbox 360 on PC for Running COD4 With Mods(3,522)
- 02. How to: Matrix Numbers | Batch File(1,910)
- 03. How to Password Protect Files on Windows(859)
- 04. How to play Socom 2/3/ and Combined Assault on PC(6,741)
- 05. Modern Warfare 2 Vac Ban Bypass Tutorial(6,161)
- 06. How to embed an image on TheTechGame(3,102)
- 07. [PC] NIOH 2 OTHER USER SAVE RESIGN(13,010)
- 08. Host bot lobbies! Full Tutorial!(11,338)
- 09. Unban yourself [Plutonium BO2](14,256)
- 10. Fall Guys - How to Change Your Name Color on Fall Guys(8,393)
- 11. Best Crosshair Settings for Valorant(6,532)
- 12. Othercide The Surgeon Boss Guide(2,546)
- 13. Othercide Remembrances Unlock Guide(4,473)
- 14. Othercide Beginners Tips and Tricks(2,715)
- 15. How to Fix Grounded Crashes, Loading Time, Low FPS and Other(4,852)
"[VB.NET] How to make and save settings" :: Login/Create an Account :: 2 comments