.net - Reference The Application Settings Of One Project From Another?

Nov 26, 2010

In a VB.Net project, you can use the Settings tab of the properties page to define application settings. To reference the settings in code, you use the syntax My.Settings.SettingName in VB.

On the Settings tab, you get to choose the Access Modifier. It may be "Friend" or "Public". Presumably, when you choose "Public", you are making the settings accessible to other assemblies. However, once "Public" is chosen, I can't figure out the syntax to reference the settings of one project from another. In fact, I can't observe any difference between using "Internal" vs. "Public" as the access modifier.

My question: Does choosing "Public" as the access modifier make settings accessible to other assemblies? If so, what is the syntax to reference the settings from other assemblies? If not, what does "Public" do?

View 4 Replies


ADVERTISEMENT

Application.Settings VB 2005 - Save Arrays Using The Settings System Object

Jan 14, 2009

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 Replies

How To Maintain Application Modified Settings In The Settings Files After A Program Update

Sep 8, 2009

Is there a way to maintain application modified Settings in the settings files after a program update? i.e. I have 10 or so values in the settings file and the users can modify them... when I send a program update they revert back to what I initially programmed them to be.

View 3 Replies

Application.restart After My.settings.save Doesn't Load The New Settings

Feb 8, 2008

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 Replies

C# - Project To Project Reference Specific Version In Same Solution

Jun 7, 2012

I'm developing application that is plugable. The plugins are loaded via Assembly.LoadFrom(). In my solution I have 4 projects. A WPF, 2 DLL and another DLL that is a plugin for the app. The plugin project references one of the other DLLs. When I build the Solution and run I was getting an error trying to use the plugin dll because it was expecting an older version of the referenced project. I had to clean and rebuild the plugin project to get it to run correctly.

[Code]...

View 1 Replies

See The My.Settings Of One Project From Within Another Project Within The Same Solution?

Sep 30, 2011

is there a way to see the My.Settings of one project from within another project within the same solution?I'm guessing the answer is no, they are scoped at the project level

View 3 Replies

Reference To A Non-shared Member Settings Error

Aug 31, 2010

I have added a settings file to a project but whenever I reference one of the setting variables I get the following error:

Error 2 Reference to a non-shared member requires an object reference. C:DevelopmentPhoenixAppProcessCreditCardProcessing.vb 67 77 Process

I had to manually add this in a merge conflict and the settings code worked fine in the originating branch. The generated code also seems to be identical from what I can see.

I am accessing the settings using My.Settings.{VarName}

edit: Just tried deleting the settings files. This still happens once the file has been re-generated from the app.config values.

View 1 Replies

C# - Dll Reference Of One Project Into Another Project - Error Of "Type Or Namespace Name Could Not Be Found"

Apr 25, 2011

I have 2 projects, one built in VB.NET and another in C#.NET. I want to use certain functionality of VB.NET into C#.NET and hence I have added the dll file of VB.NET solution into C#.NET as a reference by browsing the dll from my system. Say dll name for VB.NET is myData.dll. In my C#.NET project I am trying to declare it as a namespace i.e. "using myData;" and its giving me an error of "Type or namespace name could not be found"

View 1 Replies

How To Reference Resources To Save In Settings - Visual Basic 2008 .net

May 24, 2012

I'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.

View 1 Replies

Change The Default Settings In The My.Settings By Writing "Application.startuppath"?

Jan 19, 2010

I recently made an application which have some settings one of them a saving path

I want to make check if the saving path settings is available or not (drive)

If not so it got a default value which is application path

I tried to Change the default settings in the My.Settings by writing "Application.startuppath"But the application accept it as a string is there any way do dodge this problem?

View 6 Replies

How To Get My.Settings Value From Another Project

Apr 19, 2012

I have one project that manage my database connection (DBServer) and one project as the main system (MainSystem). In DBServer I store all my connection data that I already managed to my.settings (ServerName, DatabaseName, connectionString, etc). How can I get all the my.settings value in DBServer (ServerName, DatabaseName, connectionString, etc) from MainSystem?

View 2 Replies

Settings From One Project To Another?

Jan 16, 2011

I make project 1. I add 10 settings in the Properties->settings section.

I now make a new project. Project 2. But I want to have the same settings as project 1. It would be easier to import the settings from project1. but can this be done.

Ive seen the setting file in the explorer but this code is auto generated so if its copied into project 2 after you save its regenerated again from the properties->settings values.

View 4 Replies

DLL Settings - Project That Has Several Different Interfaces ?

Oct 4, 2011

I have a project that has several different interfaces (a website, a local application, and some webservices), that all use the same class library. The library is an API to a database. Some settings, like log level, database connection etc, i want to store in a single place, and I want them editable. What is the best way to accomplish this? I am concerned both about ease of editing, and ease of access for the dll, as there will be a lot of calls to it and a lot of lookups for the values. I have considered using app.config, a standalone XML file, and writing values to the registry, but I cannot find any good comparisons.

View 2 Replies

Using Enums In Project Settings?

Mar 10, 2009

I want to add a setting that uses an enum defined in form1.vb. All the research I've done suggests support for enum type settings is built-in and handled automatically by the VS IDE ... I assume this means it's as easy as defining font or color settings. However, I'm not having much. Are any of you gurus aware of how to set up an enum setting via the Project Settings UI?

View 8 Replies

Save A Collection Of Key/value Settings In My Application's "user Settings"?

Apr 14, 2008

I'm trying to save a collection of key/value settings in my application's "user settings" (they're column widths), but while I see no errors, when I run the code (in the IDE) my collection in "My.Settings" is always nothing at startup. I do a "My.Settings.Save" when the application exits, and barring the "serializers not found" errors in the IDE, no other errors occur. When I run my application as an exe, it behaves the same way..

View 7 Replies

Connection Error When Using Project Settings

Feb 25, 2009

I get this error
Format of the initialization string does not conform to specification starting at index 34.
When I take my connection string and store it in the project settings. I know that this works.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Employees.accdb

Because if I use it like this
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Employees.accdb")
conn.Open()

The connection succeeds but if I try this
Dim conn As New OleDbConnection(My.Settings.Default.employeeConnection)
conn.Open()

I get that error.
name:employeeConnection
type:string
scope:application
value:Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Employees.accdb

View 3 Replies

Retrieve - Get Value Stored In Another Project Settings

Jun 10, 2011

I am trying to retrieve a value saved in project A settings from project B in same solution set. Is this possible in VB.NET? If possible what namespace and function would I use?

View 3 Replies

Save Settings In A Mobile Project?

Mar 5, 2009

I like the way one saves settings in VB.Net, that is, with the project properties. However, I want to develop a mobile project that includes saving some settings. Problem is that the project properties doesn't include "Settings" when developing a mobile project.

View 3 Replies

VS 2008 Get Settings Value From Another Project In One Solution?

Apr 19, 2012

i have one project that manage my database connection (DBServer) and one project as the main system (MainSystem).In DBServer I store all my connection data that i already managed to my.settings (ServerName, DatabaseName, connectionString, etc).

View 2 Replies

.net - Store Application And User Settings Of An Application Running With Multiple Instances?

Jul 12, 2011

Which is the best way to store application and user settings of an application running with multiple instances?My problem is that using the vb's "Application Settings" one instance would overwrite the other one.I want to identify each instance with a number passed via command line argument. I could use this number to identify the appropriate settings of the running instance, but I see in a local INI o XML file a better way to handle that.

View 1 Replies

Add The .DLL As Reference To Other Project?

Nov 15, 2011

Public Class aaMyForm Inherits Windows.Forms.Form Added some controls. Build it, add the .DLL as reference to my other project.

In my other project:
Imports MyLib
Public Class XForm
Inherits aaMyForm

The events from aaMyForm execute correctly but the controls added to it are not shown on XForm. I have found some info about set Modifiers Protected in order to be able to change the functionality of the controls but havent found anything about why the controls aren display on the XForm.

View 1 Replies

Add Tlb To Project As A Reference?

Jun 4, 2009

When I try to add a .tlb file to my project as a reference, I keep getting this error:

how to fix it, or turn the .tlb file into a normal .dll file which I can then add to my project?

View 6 Replies

Can't Fix Reference On Project

Dec 29, 2011

I have received a project from other developer. This project as serveral references which are alright.There is only one reference that is not good.It's the Microsoft visual basic PowerPacks. I have the dll in the place where the other ddls are but still the project says that it can not find the reference specified.The DLL name is: Microsoft.VisualBasic.PowerPacks.dll it's on the path: C:Documents and SettingspribeiroAmbiente de trabalhoSGLCBuild I have other dlls there that are with the right references on the project...

View 18 Replies

2008 : Keep Project Settings Through Uninstall And Installs?

Apr 4, 2011

I use Project Setting in visual studio 2008 and everything works correctly and save my information when the application is closed. However the information it lost when the application is Uninstalled. The information is not available with my new install.how to keep Project Settings through uninstall and installs!

View 4 Replies

C# - Access The My.Settings Of An Other DLL Referenced In The Current Project?

Jul 1, 2010

Is it possible to access the My.Settings of an other DLL referenced in the current Project? I have a Database project in which Settings the ConnectionString is stored. I need access to this Setting in an other Project(for Log-File).

View 2 Replies

VS 2008 Sharing My.Settings Across Solution Not Just Project

Oct 9, 2009

It must be to close to the weekend, but I thought I read at some time an article of an easy way to have a common settings file for both application and user settings across a solution.

I currently have a Solution that contains 4 projects. Each of these projects need to access the same set of settings and be able to update the user settings. Is there a way to do this utilizing the My.Settings functionality?

View 2 Replies

Add A Desktop Shortcut Icon To Inside The Project Settings?

Nov 25, 2010

I just created a game program out of VBE2008 and did the build process to turn it into a .exe file.When I did the build function I apparently missed the step of attaching an icon to the project.Now when I do a desktop shortcut to the .exe file there is no pretty icon - just an ordinary looking window box.How do I add a desktop shortcut icon to inside the project settings?

View 1 Replies

IDE :: Visual Studio Settings And Project Designers Package?

Sep 28, 2011

The Visual Studio Settings and Project Designers Package ({67909B06-91E9-4F3E-AB50-495046BE9A9A}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt.

View 1 Replies

VS 2008 System.Collection.Hashtable In Project Settings?

Mar 24, 2010

I've defined a setting called CustomActions as a System.Collection.Hashtable. I also have a form with two textboxes (Name & CommandLine) that I want to add as a Key/Value pair to the CustomActions settingHowever, when I come to add the kvp to Hashtable I get the dreaded "Object reference not set to an instance of an object". I know what the error means I just don't see why it's relevant here.

Dim CustomActionForm As New DefineCustomAction
If CustomActionForm.ShowDialog = System.Windows.Forms.DialogResult.OK ThenMy.Settings.CustomActions.Add(CustomActionForm.txt_CAName.Text,

[code].....

View 1 Replies

Add A Class As A Reference In Another Project?

Sep 15, 2009

how can I add a class of a different project to my current project as a reference?I tried Right click_-> add existing item --> ( The class from the other project) then it gives me error.I am not sure how can I use that class as my reference to my current project?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved