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,254
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,391)
- 02. How to: Matrix Numbers | Batch File(1,879)
- 03. How to Password Protect Files on Windows(850)
- 04. How to play Socom 2/3/ and Combined Assault on PC(6,618)
- 05. Modern Warfare 2 Vac Ban Bypass Tutorial(6,030)
- 06. How to embed an image on TheTechGame(3,051)
- 07. [PC] NIOH 2 OTHER USER SAVE RESIGN(12,928)
- 08. Host bot lobbies! Full Tutorial!(10,905)
- 09. Unban yourself [Plutonium BO2](14,200)
- 10. Fall Guys - How to Change Your Name Color on Fall Guys(8,366)
- 11. Best Crosshair Settings for Valorant(6,506)
- 12. Othercide The Surgeon Boss Guide(2,509)
- 13. Othercide Remembrances Unlock Guide(4,431)
- 14. Othercide Beginners Tips and Tricks(2,687)
- 15. How to Fix Grounded Crashes, Loading Time, Low FPS and Other(4,804)
"[VB.NET] How to make and save settings" :: Login/Create an Account :: 2 comments