VS 2008 My.Settings, Setting The Value At Run Time?
Mar 24, 2010
I have three settings Pleas,DocketSheets,AllTrays (strings). How to I set the value and save them for ever?
I've tried.
My.Settings.AllTrays = "Tray1;Tray2;Tray3;Tray4"
My.Settings.Save()
but it says that AllTrays is readOnly. Are the settings only retrievable and not settable or updatable?
View 17 Replies
ADVERTISEMENT
Dec 6, 2011
I am not sure what the heck I am doing wrong. I would like if when the user selects no, then the app setting is nothing. By nothing I mean nothing, I am using "Nothing" to test but its not working it returns whatever is in the richtextbox
This is in my formclosing event
Dim msg As String = "Do you want to save your comments?"
MessageBox.Show(msg, "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If DialogResult = Windows.Forms.DialogResult.Yes Then
[CODE]...
View 2 Replies
Mar 20, 2011
I am developing an application, and i need to store some configuration settings, with time, i will need to add some more configuration settings. Am thinking of three alternative to implement that will me easy to access without much coding and efficient sqlite, xml, and application configuration file..But am concerned about security, because some personal data will be saved together.
View 2 Replies
Apr 22, 2012
I have this code in one button:
For Each x In ListBox1.Items
Label1.Text = "Status: Loading IMDB page..."
Dim str As String = x
Dim MOVIESNAME = str.Substring(str.IndexOf(""c) + 8)
[Code] .....
Is there an option to set a time interval between each check? Because it will load the page (it's not google, it's my personal website with some information needed) and it need to be fully loaded till it gets the information then it would do another check for another listbox1 item. Like.. maybe 5 to 10 seconds is enough..
Webbrowser1
Dim strCDRack() As String
Dim cdList As String
'Dim i As Integer
cdList = WebBrowser1.DocumentText.ToString
[Code] .....
View 5 Replies
Dec 16, 2010
I am using My.Settings to store the path of my crystal reports. Now I wish to place my crystal reports within local execute path. So how do I set within My.Settings to detect the local run path?I tried putting application.localuserappdatapath in application settings which return back as a string.
View 2 Replies
Oct 4, 2010
Basically for a while now if i wanted to set a chks setting i would do this..
[Code]...
View 6 Replies
Apr 24, 2012
I have a label printer with the driver loaded with the settings in the driver set I can print the exact label that I want, I have the problem that I need to set the default settings in the driver when the software starts. there are 6 of these printers and the only problem we have found is that different operators like to change the settings.
What I need to do is to set the following commands in the driver so each time the system is started (daily) it loads the settings and works properly.
I need to set
Custom Commands Text, Start, Parsed Text
In the Advanced Setup, turn on use printer settings
Other settings would be usfull but as I cannot set these I do not think I will be able to set others.
I can currently set some of the commands eg,
DefaultPageSettings.PrinterSettings.Copies=2
View 3 Replies
Aug 5, 2009
I am rewritting my application to conform to ms standards. We used to save all settings to registry for user settings, servername, size and locations.so we are now saving them into My.Settings app.config the only problem is that each time there is an update clickonce will isntall the newupdate but now all settings are loist and user has to save everything all over again..
I am trying to follow the book here but it seems i keep getting stuck somewhere. registry has worked fine for years but i understand we must move on, but if stuff like this happens then i just wasted a long time converting all code to conform for it to not work..
View 1 Replies
Oct 30, 2009
I have created a settings-file for my plug-in-based app. When the mainApp writes the settings to the file, the pluginApp should read the settings from the settings-file (when opening or at runtime even better), but somehow it reads the settings from the app.config-file. This means that the pluginApp never will read the settings according the values of the file.
View 4 Replies
Aug 5, 2009
I saw that you can also use a "Settings File" (Add new Item)to add your settings instead of the application settings. But I can't seem to write any values to the file. Someone with experience with the "Settings1.settings"?
View 2 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
Nov 8, 2010
What I am trying to do is allow for my objects to know when their data has changed on the database (so they are able to raise an event to let the user of the object know about the change).After following several tutorials on how to get SqlDependency working, I have finally managed to get it to let me know when something changes (although it also appears to let me know when I make the initial connection to it too, but that isn't a problem as I can work around that).The function that I have which sets up the SqlDependency is;
Public Function getMembers() As List(Of User)
Dim conn As New SqlConnection(_connectionString)
Dim sql As String = "SELECT UserGroupUserID, UserID, GroupID FROM dbo.xtblUserGroupUsers
[code].....
View 9 Replies
Dec 1, 2011
I want to prevent a form from loading if the systems regional datetime settings format for the date is not in the form of dd/MM/yyyy.
View 1 Replies
Oct 23, 2008
I found that there was the Settings.Properties collection as well as the Settings.PropertyValues collection, and hopefully i'm not doing extra work here, but i'm creating both, and then assigning a value to the Settings(PropName).
Defaultly, in my "static" settings (through the IDE designer window and such) I have 9 settings/properties, and at run time when I'm processing, the Settings.Properties.Count doeos indeed equal 9.
Now, in the process of my application I generate some "saved" control properties myself, and actively "add" them to the Settings:
For Each prop As String In Me.Keys
Try
name = Layout & "." & _control.Name & "." & prop
[Code]....
This seems to work fine, and after the repetitive code (cycling through a collection) is finished, the Setting.Properties.Count does indeed equal 79, for the 70 new properties added.
I not only execute a My.Settings.Save() when the application exits, but I know I also have the SaveMySettingsOnExit set to true, but the next time i load up the app, my settings.properties.count is back to 9.
View 5 Replies
Feb 3, 2011
Basically, my app has the main form and a windows form "splash". Let me explain, this "Splash" is a WINDOWS FORM, not a splash form; its just named splash because I want to use it for that reason.In my project settings, my main form is my startup, and the splash form is my splash. This splash form has been coded on a timer for 10 seconds, but when I set the splash form as the splash setting, the form shows up for 1 second and goes to the main form.What I need is to edit the splash setting time from 1 second to x# seconds (preferebly 10)
View 2 Replies
May 18, 2012
I am using Visual Basic 2010 for a project.My project requires to place a TRANSPARENT button on top of an image (placed inside a picturebox). for that to work, i need to set the button's parent to the picturebox. Is there a way to do that in design time? I cannot find anything on the property tab. The reason i want to set it on design time is because my project will have a motherload of buttons and it will a pain to code the parent change....
View 3 Replies
Sep 25, 2011
In VB6 I would simply retrieve the user font setting from the .ini file, load into variables and then apply to the appropriate control.
text1.fontbold = userfontbold
text1.fontitalic = userfontitalic
text1.fontunderline = userfontunderline
etc.
I'm struggling to understand how to do this vb.net The following code works, but sets all three at one time
Text1.Font = New Font("Courier", 10, FontStyle.Bold Or FontStyle.Italic Or FontStyle.Underline)Since the user can have many different combinations of settings, I would like to be able to add just one of these properties at a time, but can't seem to figure out how to do it.
View 7 Replies
Oct 10, 2011
I'm using LINQ to Entities to generate typed result sets in VB.Net. I've got a generic Report class as follows:
Public Class Report
Public Property Name As String
Public Property SQL As String
Public Property Type As String
End Class
Then in the calling scope I want to have code that does something like:
' create my data context
Dim context As New MyAppEntities
' get a report object out of a dropdown list
[Code]....
So far I'm finding that .Net won't let me set the type in the (Of Type) clause on the fly at runtime.
Does anyone know how to do this?
I've tried changing the Type property of the Report class to an object of type Type, but that doesn't work either.
BTW, I know there are alternative ways to accomplish the same thing, but I'm working with external constraints that make this what I've got to work with right now.
View 2 Replies
May 7, 2009
If you can set the height of a panel at run time
Me.Panel1.Height = 3 What is the correct syntax for setting maximum size (height)? Tried this several ways and been searching. I know this is simple.
Me.Panel1.MaximumSize.Height = 512
View 2 Replies
Jan 12, 2012
I want to make a wake up timer using a combobox to select the time.I also want to make a label that display's how many minutes are remaining.
If
ComboBox1.Text = ("00:00"
Or
[code].....
View 2 Replies
Jul 18, 2009
My typical application has a couple of textboxes, checkbuttons, radiobuttons, and so. I always want to load the settings the user used the last time when the program starts, and also want to save the settings as the users clicks "Save settings" or closes the application. When the user attempts to save the settings, I'll have to check each of the controls for input errors (sometimes they have to have a max length, other times only caps, other times other things, there isn't a rule for them all, everytime it'll be different), and only if everything OK i'll let him save the options. If there is something wrong, no option is saved and my error-control provider will pop up a description of the input type info that should be put in that control.
I've been designing this from scratch for all my projects, but it's being a pain to do it. So I'd thought maybe now was the time to do some library to help me. I thought initially that maybe it'd be a good idea to have all the controls on my form that are going to be part of this save/load process to have an attribute associated with them, something like this [Code]
View 2 Replies
Nov 18, 2009
I expected this to work[code]...
The date gets formatted according to local settings, but not the time.
I seen API examples but, dangit, this should be easy and built into the framework.
Why is it working for the date but not the time?
For example, check out my regional settings for displaying time [url]...
View 6 Replies
Jul 12, 2009
How do I reset My.Settings at run time to the initial default values. I want to do this after the app has been running and the user may have save changed settings. The intention is to reset evering to 'factory defaults' as opposed to the last saved value as done by 'settings.reload'.For example in the property below , I want to restore to the value to '90' as given in the default value. I want to do this for all settings.[code]...
View 4 Replies
Jun 29, 2009
I'm saving my settings like this...
[Code]....
View 9 Replies
Mar 4, 2010
How can I edit the time on my form. I have a one tabpage Schedule on which I want to set time according to user's choice. (I know how to display current time). If current time is 5.50.55 PM then user can set anything for eg. 6.45.12 AM according to he want to schedule.
View 2 Replies
Nov 5, 2009
I�m converting some Crystal reporting functions from VB 6.0 to VB .Net 2008, have reports up and running, and I�m not quite sure how to approach one aspect. The issue I have is most of the Crystal reports connect to a database and run a stored procedure. The connection properties are set up in the report usually pointing at the development region. At run time I need to be pointing to either development, user acceptance, or production. I know what environment I�m in from a configuration file but don�t know how to go about telling Crystal what environment and stored procedure to point at. In VB 6.0 it was:
CR1.Connect = "DSN=" & A.ReportServer & ";<<Use Integrated Security>>;DSQ=" & A.ReportManhattanDB
Where A.ReportServer and A.ReportManhattanDB contain the connection poperties. The stored procedure is passed via:
[Code]....
View 3 Replies
Aug 13, 2011
I'm using .net 2008 Trying to create a small graphic component, I have a problem setting background both at design time and then runtime. I derived a panel like this
[code]...
But it isn't working! If I don't Overrides Property BackColor, this is working as expected but I really need to group in my custom tab.
View 6 Replies
Dec 1, 2011
I'm developing a revised version of a system I have been using for years, but with all the advantages of .NET features that were not around when I first made this. It's proving a steep learning curve! So, when a user logs in through my Login.aspx page which simply compares username/password to Database record, the system creates a session variable containing the user's Username and various other things. There are two type of variable which will be common to all elements of this system
User Specific data, Username, Permissions, etc
Setting variables, drawn from a database of pre-set facilities which are setup within the system, some will determine which facilities work, how they work, and some will be dependent upon the User's permission. Obviously, I could set everything within the Session data, but that'd be inefficient wouldn't it? If I were to set these globally available variables in my App_Code, how would I go about setting this up so that, for example, those variables which require a database call, are set for the duration of the Logged-In session and do not require constant Database lookups? Further to that, those variables which are dependent on the session state, would need clearing on each LogOut. I am using VB.NET.
View 1 Replies
Jul 9, 2009
In Visual studio 2005 using VB, I've just started using a masked textbox to input time in the 24hr format.In the Input dialog box , I've set the mask to : Time(European/Military) and checked the : Use validating Type box.[code]Problem: The user can enter numbers which do not match the time format.Example:25:75 or 23:66 , etcI would just like to restrict user input to the numbers required for the 24hr format only.Also, if anyone can provide me with a link to some working examples of masked textboxes.
View 6 Replies
Jan 24, 2007
I have included a Date and Time Picker Control in oen of my MS Access Forms and want to set its value on the form open event. However, when I try to set the Value property I get the following error message :
[Code]...
View 3 Replies