VS 2008 Saving Control Settings?
Aug 22, 2009
I have a form with 31 checkboxs which i want saved when the user exits the form and two other buttons, One 'OK' and another 'Cancel'How do i save the checkbox settings when the user clicks the 'OK' button and not have them saved automaticly when the user exits the form?
I have setup the controls in the Settings of the application properties, i just need to have the checkbox checkstate saved only when the user clicks the 'OK' button and not saved automaticly by my application.Below is some code with the OK button that saves the settings and the Cancel button.
[Code]...
View 6 Replies
ADVERTISEMENT
Dec 27, 2009
What is the correct way to handle saving user control settings on form close. I have a tabcontrol that a user can add tabpages during runtime. The user control has a few controls (listbox,combobox,textbox) How can I save the created tabpages and the data in each control in the usercontrol? Below is how I am calling my usercontrol
Code
Public Class TabPageEx
Inherits System.Windows.Forms.TabPage
[code]....
I seem to be a little lost as most documentation seems to suggest that I can not save usercontrol settings in the app.config. I have played around with the solution expl. settings tab without much success. But, then again I may be going about it all wrong. So, I am looking for a little direction on the best way to handle this on form close.
View 4 Replies
Sep 23, 2010
I'm writing a search tool. Setting the search parameters requires adjusting the values of over 70 different controls on my form.I want to make a list of saved searches. Is there an easy way to do so? Does VB have any built in features to save and load the current values of every control on the form?I could code it by hand. But this would be tedious, especially up to 15 listboxes, where I would need to save each item in the list and note whether they are checked or not. I really hope VB has a way of saving the entire form at once.
View 4 Replies
Apr 5, 2009
I'm trying to save a setting I've defined under Project -> Settings -> FirstRun, type boolean, scope Application, default value, false,But it doesn't seem to work, this is my(the text box does not stop, every time I open the program it shows)
Private Sub Form1_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
If Not My.Settings.FirstRun Then
[code]....
View 8 Replies
Jun 12, 2011
how do I save settings of a form like its background color, fonstyle, sontsize etc. I cannot save them as string or text into my access database.
View 4 Replies
Oct 14, 2009
I have the creating INI file down, but how would I get it to read the text and then, based on the text there, make things checked/unchecked
Dim SaveFile As New StreamWriter("Settings.ini")
View 7 Replies
Sep 12, 2011
My question is , i have just made a project for my appointments like, Name,Date,Time and Notes and all viewed in a listview grid but how would i save the entrys ?Like to save 1 line i can easly use my.settings but how about mutliple lines ?Here is a screenshot:It would be best to save it into the program like my.settings or something
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim lSingleItem As ListViewItem
[code].....
View 26 Replies
Dec 12, 2009
Okay so i have a problem with saving the users settings. Okay i have about 50 check boxes on my frm1.So for example if the user clicks on check boxes 1 and 2 the next time when the user starts the program i want check box 1 and 2 to be checked
[Code]...
View 15 Replies
Oct 3, 2009
How do I save my programs settings in a document? Like total sessions used, Total accounts created. Also, How do I make a text file save and load every time the program is opened or closed? The saved accounts should be like this in the text file.
Account: Account name E-Mail: E-Mail used Password: Password used
Account name, Password, E-Mail will will all be in a textbox or combobox so if you can make it save from there. I have an total accounts created combobox. How would I make that load into a combobox and then when session is closed they all save. So loaded into a combobox then saved into a text file.
View 3 Replies
Dec 21, 2010
When I save settings for an application using My.Settings.Save it saves it in %AppData%LocalCompanyname. Because I don't want my app to be installed and I want it to be a just .exe file, and it leaves some files on that computer. I like it to be in my apps location. Can I change that default location?
View 4 Replies
Mar 17, 2012
I would like to create a program that user can save his settings in the program and not on the computer .I want to make something like icon changer ιnstead it will work for strings not icons String Changer?
View 4 Replies
Feb 16, 2010
I need to save some string settings at runtime and read them back. They will need to be changed at anytime during runtime also. The examples I have found says they are obsolete for vs2008. how to save and read some string settings? I found alot for the application settings that to me are ones you set once for the app like in an asp.net site. I need to change these anytime like you would in a registry.
View 10 Replies
Mar 17, 2009
ok, I have a "sum" for ading the total prices in list view. The prices are in the sub items. After they are added up ( they display as total: �{0}) how would I save them to add up later amongs other things I have saved in my.settings???
View 3 Replies
Jul 15, 2009
I'm having trouble getting the objects of the PageSetupDialog and the PrintDialog to persist in my.settings Is there an example of this anywhere? Seems like it should be something there is a boiler plate for so I can see where I have gone wrong.Added a System.Drawing.Printing.PageSettings and System.Drawing.Printing.PrinterSettings entries in my.settings but even trying to save these form the results of the dialogs they show as nothing with out a error.
View 6 Replies
Mar 7, 2010
I am working with that app.config for the first time and am having a bit of trouble getting it to work. I was able to get the most recent opened files added but can't seem to get it saved.
Here is the load event
Private Sub frmPrefsDialog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If My.Settings.RecentOpen Is Nothing Then
[Code]....
View 1 Replies
Jan 13, 2012
I am looking for the best way for settings within settings. Example would be an IRC network list. Which will be displayed as desired writing. If i clicked edit on that network it would bring up another form with that networks setting. Take xchat for example. what would you say would be best suited? XML seems more suited.
View 12 Replies
Jul 9, 2009
I've a project called G.S.S. There's a 2 forms in the G.S.S and a checkbox on the form2. I added these codes:[code]Then I created an another example project to try these on, added 2 forms, a checkbox on form2 and wrote same codes. I wondered when I run the app because it's running perfect. It saves the settings.So what's wrong with my G.S.S project?
View 5 Replies
Aug 7, 2009
Unfortunately my settings do not get saved.[code]...
View 3 Replies
Apr 21, 2011
I have been trying to get this to work for the past hour, I have an arraylist that contains string() items inside of it, I want to be able to save it and retrieve it.. When I try to save something to it and then close my application and turn it back on, everything I saved is gone.
View 3 Replies
Nov 3, 2010
I need to have my application to prompt the user to see if he wants to save the settings or not before the application exits.I got this to work this way: I added an event handler to My.Application.Shutdown. This event handler does prompt the user and save the settings if the user answers "Yes".But in order to stop the application to save the settings anyway via its regular way, I have to set My.Application.SaveMySettingsOnExit to falseAs I said, it works, but it just look like a bad logic to set SaveMySettingsOnExit to false to have it to save the settings saved on exit with a prompt.
My question is: is there a way to get it work like this:
-SaveMySettingsOnExit =true -- PromptBeforeSave =True ( Save and Prompt)
-SaveMySettingsOnExit =true -- PromptBeforeSave =false ( Save and no Prompt)
[code]......
View 2 Replies
Jul 14, 2009
I'm working on a project that users can add new tabs, buttons, textboxes, Excel forms(existing or new) or sth. else to the application. How could it be possible to save these changes?
P.S. : I started to learn SQL usage, and planning to use SQL in my project to save additional inforamtion that users have added.(for example informations about team members)
View 2 Replies
May 21, 2009
I would like to save my connectionstring in my.settings but this property is only readonly.When i would save it as a String, then I can't find it with the wizard for building a report. [code] is there also another way to build a connectionstring? this works, but the type of My.Settings. Data base String is a string and not a ConnectionString.
View 1 Replies
Jun 15, 2009
Okay, i have this program that gives the user some settings that need to be saved and loaded when the program runs. Can anyone help me with this?
View 15 Replies
Dec 13, 2010
Im studying vb coding at the moment and im designing a reasonably small text based game using the windows console and so far i have a nice working game but the main problem is that the game restarts when you end the console, obvious i know. Been trawling through pages looking at different ways to save multiple variables for multiple uses such as a save/load feature and most pages have confused me, people asking for help with commands im not common with. So far i've tried using my settings to save the variables in a test program but can't get it to work?I have in settings a variable called gold with a scope of user as an integer and i have this code to try and utilise it
Module Module1
Sub Main()
Dim answer As String
[code]....
View 2 Replies
Aug 2, 2009
I recently noticed that exceptions were not getting caught by Visual Studio (I'm using VS 2008 Standard) - e.g I could do this and run the program[code]...
and the debugger would not kick in and tell me something had gone wrong, the program would just continue running as normal.I remembered someone on here helping me fix this a while ago by pressing Ctrl + Alt + E to bring up the exception handling settings, so I did that again and ticked the Common Runtime Language exceptions box (Throw) and then all worked fine again.The problem is, this setting does not seem to be getting saved - each time I restart VS I have to set it again, which is annoying to say the least... especially when I forget and then get confused when my program isnt working properly.
View 2 Replies
Dec 28, 2011
VB 2010 Express, Windows 7 The settings on the main form save properly. My problem is that I have a usercontrol that is changed to a tabpage that I use to 'clone' tabs. Is there a way to save the cloned tabs along with there settings?
Multiple people use the program and the number of tabs and settings are different for each person.
View 4 Replies
Jun 30, 2011
I have two different 2-dimensional arrays. I assume the setting i need to save them to is a string setting, as is the cast with regular integer arrays. The first 2-d array I need to save is an integer, the second a decimal.
Let's say the settings are called my.settings.2darray1 and my.settings.2darray2
Let's also say the arrays are:
vb
dim 2darray1(50, 99) as integer dim 2darray2(50, 99) as decimal
What would the code be to load each array and save each array?
View 4 Replies
Sep 12, 2008
i need to save time.forecolor's color setting and form1.backcolor's color setting eighter to a registry key or to a application setting any ideas how i can do this? [code]
View 5 Replies
Dec 9, 2011
I'm trying to save my application settings at run time, but im not noticing any change in the application settings window. Basically, whenever a change is made to the price of a room, i want to save it to the settings so it can recalled later on in run time and when the program is started up again at a later day. Heres the code im using;
[Code]...
View 5 Replies
Apr 25, 2010
I have two counters set up, one for dealers games won and the second one for players games won which both add up the results and displays them in a text box. I have another form made to display Statistics, for both 'This Session' and 'Overall', but how do I save the Overall score?? How can I keep a score saved after the game is closed?Is it something to do with the game setting?? Is there a my.settings option that I should be using?
View 5 Replies