VS 2008 Save And Load Settings?
Dec 26, 2009i try to save sattings and load settings in runtime:to save settings
My.Settings.bodyTxtSize = numericupdown.Value
to load settings
txtBody.Font.Size = My.Settings.bodyTxtSize
[code]......
i try to save sattings and load settings in runtime:to save settings
My.Settings.bodyTxtSize = numericupdown.Value
to load settings
txtBody.Font.Size = My.Settings.bodyTxtSize
[code]......
i have created a user setting named 'setmeup' as string, scope = user, value = "magical meow meow!".in my code i access it and assign it a new value like this...my.settings.setmeup = "howdy cowboy!"my.settings.save()application.restart()when the application restarts, i expect the my.settings.setmeup = "howdy cowboy!" but when i check its contents its still "magical meow meow!".but when i use application.exit() instead of application.restart() and manually restart the program, my.settings.setmeup = "howdy cowboy!" which is correct.what must i do? i want to use application.restart() because i don't want the users to double-click the icon again to start the program. i want the program to restart automatically.
View 2 RepliesI wanna save and load my color selected by ColorPicker like this[code]...
View 9 RepliesI am trying to save the last used font, font color, and background color. Then when starting myapp up again, read the data and use the last used settings.[code....
View 3 RepliesI found this thread [URL]on saving and loading printer settings It worked fine in XP Virtual Machine, but when I try it on my Windows 7 64 bit it errors on the P.Start Line()I changed from Rundll to PrintUI and it seems to work OK saving the file, but when I try to restore using the code below, it still fails on the P.Start line.What am I doing wrong?
Dim p As New Process
p.StartInfo.FileName = "PRINTUI.EXE"
p.StartInfo.Arguments = " /Sr /n """ & sPrinter & """ /a ""c:my11_17.dat"" 2 7 c u d"
p.Start()
How can I save my app's settings in my own format and load it?
View 6 RepliesI am trying to save the last used font, font color, and background color. Then when starting myapp up again, read the data and use the last used settings. Here is what I have so far: User pick new font &/or color
Code:
If FontDialog1.ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
MainText.Font = FontDialog1.Font
MainText.ForeColor = FontDialog1.Color
[Code].....
I've tried to implement this highscore saving feature, so that when my application closes, the highscore saves within the my.settings storage function, and when my program loads up again, the same highscore loads up from this file. atm, it works ONLY within the application (I can close forms and it's still there, but if i end the program it resets to 0 next time it's loaded).it's basically 2 lines of code..1 for saving and 1 for loading..is this the best way to save a highscore for a game? I was initially thinking of making a database and linking it to that, but apprantly it's easier with the My.settings. even thought of using stremawriter but it's more uneccessary work over my.settings.[code]
View 7 RepliesI set up some application settings for checkboxes on an app and then decided to remove them. When I set the Application Settings to (none) in the designer and restarted the app, the checkbox constantly checks and unchecks itself. I completely remade the app and removed the file that is used to store my.settings in the Local folder of the user's appdata profile. I also made sure to uncheck the "save my.settings" on shutdown.
View 6 RepliesI have the following structure:OLD: frmMain (WinForm)uscStat (UserControl with Grid) In frmMain I'm able to make some settings and load the result of the settings via LinQ into the Grid of the uscStat.
[Code]...
I created a form and a checkbox with default name in visual basic 2008 as i move mouse wheel, i can choose a picture for background image i can also change the checkbox's forecolor when i press any key on the keyboard and my first problem is i want to save the new background image which i has already chosen as i close my form and so does the checkbox's forecolor,move the checkbox to wherever i like and save this setting?
View 2 Replieshow to save specific settings (IE: splitter bar.distance inside of a split container, listview column widths and positions)
View 5 RepliesIsit possible to save a listbox in my.settings?
View 3 RepliesE.g. default setting for serial port after start up is COM1. If user sets COM2 and restarts program, is it possible to store port setting, COM2, other than still start from COM1?
View 5 RepliesI've tried my.settings examples and the arn't working such as:
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
[code].....
I have combobox I need settings saved when user clicks save settings button and I have add by number box I need settings saved on basicly its set on 50 but some users can change value up to 500 so I want it so that can also save settings and thats it
I was thinking adding this but I know it will be wrong
me.combobox1.SaveSettings()
or
me.nudResultsToShow.Settings.Save()
I just wondered if you can or can't save arrays using the settings system object. There seems to be no way of entering it at designtime. It seems implied you cannot create new user settings.subobjects at runtime. I'm looking to find the easiest way to save a populated array of PictureBox's. If the only way is a self/custom made/managed .ini file then I need to know so i can start on that but I was hoping to use some of all this phaff in the new frameworks usefully.
View 3 RepliesI'm working with an Treeview and i'm new at it and i have 2 questions.
1. How can i save the treeview items, to settings (my.settings.history)
2. How can i save the treeview items as an TXT or XML file or another exception.
how I can go about having a ini type file so my.settings don't get over written when I load newer versions of my application?
View 3 Repliestrying to save the settings in a settings form but every time m setting the settings (when the form is running) then exiting it and then reopening itare the settings that i setted not there Ex : I open form2 by clicking on a button thought form1 and change the settings for example i uncheck a checkbox then do i close form2 and then open it again. And the settings should be saved so the unchecked checkbox should still be unchecked.BUT when i close form1 should the settings be unsaved and go back to normal :)
View 3 Repliesi've been busy with a program and it has worked out quite well. The only thing I still want is that it is possible to customize things and save that in a text file. Normally if i want an other background for one day, i need to change it in VB or make a checkbox to do that. if i then restart the program all the settings are lost and i have to set it again. so i was wondering if the program can make a text file and put codes like 1 for theme 1 and 2 for theme 2 etc. in it, then save it and load that file when it starts up again. and is this also possible for a login form? if yes, i can also add a "Create Account" button for my program instead of adding codes in VB.
View 6 RepliesI'm trying to save a setting that keeps what background image I'm currently using.If it's an external file, there is no problem, i can just get the .location and set it in a String setting to store it.
But, if I want to store an image resource as a setting, how do i do it?I know i can store rawdata, like bitmap information, but then i can't set that type of data to the my.background.
I don't know if the question should be: "how do i reference resources", but the my.resources.resource.methodsList doesnt contain anything that seems to be of use.
I'm making a program and in which the user can select a background image from their computer, but I have not found a way to save the picture to my.settings or my.resources
View 3 RepliesI have a set of labels that contain number values that need to be saved into a txt file and recalled from a text file by a button click event.
Ive been searching these fourms for days trying to find the answer to the save / load data problem. From what I understand, XML should be used to do this. But no matter how much I read I cant make sense out of how to solve this issue. I just need a simple and quick fix that dosen't have to use XML[code]...
I have a set of labels that contain number values that need to be saved into a txt file and or recalled from a text file by a button click event.assume the value of label1 label2 and label3 must be stored in a text file on the users computer and then later loaded back into the program from that text file.How can this be done without using XML ?
View 1 RepliesHow do i save a listview along with the CheckState and then load it back ?
View 3 RepliesI have a contextmenustrip with 10 options on it. Each option calls an image from my resources and changes the background image of my form. When i select an option how do i save it and make sure thats the image that loads next time i run my application ?
View 30 Replieshow i can save user settings in vb.net
i have a project with different buttons when a user clicks a button the image of PictureBox1 will change.
i want to save this image that the user has chosen after he closes the application, so it will be displayed in PictureBox1 when loaded.
i am using Microsoft Visual Basic 2010 Express
the languge is VB
One form of my program is Item Development it has simple questions like Physical propertys of item, name, roll in story,etc.. I want to save this form (Form1 and all of the external anwsers that are written in the textbox and the radiobuttons that are selected! Next question is to load that.... The code
[Code]....
I been have some research to this forum about the layout setting save & load...one of the method I found is store it to XML...but it only allow to store textbox value, other like textbox location, size is not work.... it can store every control like textbox, button, label, listview and etc in my form include size and layout and allow to load it?
View 3 Replies