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


ADVERTISEMENT

Access Byte Array Within C# Class Referenced In .net Project?

Jun 6, 2011

I am trying to instantiate a c# class whose project is referenced within a vb.net project.By providing the following declaration/instantiation of the class, I hoped to be able to access the instantiated classes publicly declared byte array within a vb.net module.The compiler won't let me. I get the message Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated. It wants me to replace the reference to the instantiated class and public member frameData() with the general Class definition name. Why can't I access frameData through the instantiated variable rxFrame?

View 5 Replies

Can Not Be Referenced Because It's Project Type Is Exe?

Aug 10, 2009

I created a standard exe project and then an Activex exe.I compiled the activex exe and tried to make a project reference to the activex exe and keep getting the error ... can not be referenced because its project type is exe

View 2 Replies

C# - Calling Function Referenced By Project

Nov 13, 2009

As per [URL] How can I achieve this? 'processPacketVB' is a 'variable' but is used like a 'method' is the error I'm getting with these references to the project and class and function.

using VBProcessPacket;
namespace UIST {
public partial class FormActionMenu : Form {
private void timerDelay_Tick(object sender, EventArgs e) {
VBProcessPacket.ProcessRX processPacketVB = new VBProcessPacket.ProcessRX();
//read the receive buffer as a string
RXpacket = processPacketVB("test"); // processPacketVB throws the error 'processPacketVB' is a 'variable' but is used like a 'method'

View 5 Replies

Image :: Get To Resources Of A Referenced Project?

Nov 4, 2009

I have a project which contains all custom controls and images; we'll call it projectBase.Now I have created a windows forms project (project1) that references projectBase. I need to access the embedded resource (images) of projectBase in project

View 2 Replies

Project Warning - Referenced Components Could Not Be Found

Jan 9, 2010

Everything was fine but suddenly appeared this error when I built a project.
Warning 1 The referenced component 'stdole3' could not be found.
Warning 2 The referenced component 'stdole2' could not be found.
[URL]

View 7 Replies

Protect Dlls In Project From Being Referenced By Other People?

Apr 30, 2009

How do I protect dlls in my project from being referenced by other people?

View 1 Replies

[2005] Setup Project And Referenced Dlls?

Feb 9, 2009

I have created an application and a setup application for it.The application references Microsoft.mshtml.dll and another custom dll.The problem is that despite the fact that i added to the setup project the output of the application, these two dlls were not added in the setup project's "detected dependencies". Do i have to add them manually ? Do you know if Microsoft.mshtml.dll (C:Program FilesMicrosoft.NETPrimary Interop AssembliesMicrosoft.mshtml.dll)will work both on Windows XP and Windows Vista no matter what version of Internet Explorer is installed ?

View 1 Replies

VS Project Fails To Compile: Property Not A Member Of A Referenced DLL?

Aug 27, 2010

When I try to compile my VB.NET web project, I get an error that reads:[PropertyName] is not a member of '[Namespace.Class]'The class referenced is part of a dll that the project references. The property definitely exists in the referenced class, and its access modifier is Public. What's more, if I update the reference, or just remove it and add it back, the error goes away: the intellisense shows my property -- all is fine.. that is until I try to compile again. Then the error returns. I've even restarted Visual Studio to no avail. What is going on?[UPDATE]After Will's comment, I've changed the namespace to something I am absolutely sure is unique. Now, I am getting more compiler errors of the same genre. The compiler is not recognizing some of the overloads although they are right there in intellisense. Weird!

Dim gis = New MapQuestGeocoder
Dim r = gis.GetResult(address)
originCoord = r.Coordinate

[code].....

View 1 Replies

User-Scope Settings When A .NET Assembly Is "Referenced"?

Apr 9, 2009

I have a stand-alone WinForms application, let's call it "Program A." Program A let's a user create a file and save some information to it. Program A also exposes some public classes.Another stand-alone WinForms application ("Program B") references Program A, and uses some of its public classes.

However, some of Program A's classes need to open the file the user created in order to retrieve data from it. In Program A, the location of the user's file is saved in the "Settings" (as user-scope settings of course) and are retrieved (this is a VB.NET app) via My.Settings.

This is all well and good until Program B runs - when it runs and uses the classes from Program A that need to read from Program A's My.Settings, the settings are blank - it's as if they were reset (as when you run Program A for the first time or under a new user account). Any application-scope settings are kept, but any user-scope settings are reset to their default values (whatever they were set to in the IDE when Program A was written).

[Code]...

Assume that the user has already run Program A at least once and opened a file, so Program A's My.Settings.UserFileName should be set.

When Program B calls Foo.GetStuff(), it doesn't return anything because My.Settings.UserFileName doesn't contain the user's file name - more accurately, it contains whatever the "default" value for that setting was (as set in the IDE when you set up the setting in the first place). But, if you turn around and launch Program A, it remembers the user's setting for UserFileName.

So - the question is: When calling a function in a referenced assembly, why are the user's settings not retained? Is there an explanation for the behavior I'm seeing, or am I missing something terribly obvious? Or perhaps I'm just going about this all wrong, and I shouldn't have made any of the public classes in Program A rely on anything in My.Settings in the first place?

View 1 Replies

C# - How To Access Classes In Sub Referenced Library

Apr 22, 2011

I have the following projects:
TradingProject (my code) Has reference to TradingLibrary, and to ApiLibrary?
TradingLibrary (my code) Has reference to ApiLibrary
ApiLibrary (3rd party code)

I'm making several projects (like TradingProject) that communicate with a software through use of an existing ApiLibrary. But I want to push generic methods into a library I write: TradingLibrary.

Still, I would like to use some parts of the ApiLibrary directly from TradingProject. However, I then would need to pass an object (of an ApiLibrary class) into a method in TradingLibrary. Where the object should be recognized. However I assume this will be a problem, as TradingLibrary use it's own reference to ApiLibrary, so it will not be recognized as the same classes? Is there some way I can "forward" the ApiLibrary reference from TradingLibrary to MyProject, such that they will use the same reference? Or do I need to duplicate the classes and inherit from ApiLibrary for each class? Like:

NameSpace TradingLibrary
Public Class SomeClass
Inherits ApiLibrary.SomeClass
End Class

I guess that would work, if I do it for all classes I need, but is there perhaps some simpler way I'm not aware of?

View 2 Replies

Can't Access Class Library Methods / Properties When Referenced As A DLL

Oct 15, 2009

I've created a class library and built a dll (release build). I've then referenced the DLL in another project (I've tried several). I can see the namespace and classes in Object Browser and I can declare instances of the classes but I cannot use or see any of the methods or properties! there is no IntelliSense whatsoever and calling the methods manualy results in a 'Declaration expected' error.

Within the class library solution I have a unit test project referencing the class library project which works all works fine (and all the tests pass).

Can anyone provide any pointers to what might be going wrong here? I've built plenty of dlls in the past and have had no trouble referencing them at all.[code]...

View 3 Replies

C# - Finding Current Windows Sleep Mode Settings

Oct 14, 2011

I would like to find out what the current windows sleep mode setting is i.e. Is it switched on and what is the timer period. My preferences (in order) are:
.NET Managed Code
API
Read Registry Value

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

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

Use A TreeView In Current Project?

Jun 6, 2008

I'm trying to use a TreeView in my current project and I'm not quite sure if it will work.I need my tree view to load the TreeView with the contents of the C: drive. Along with this, I need the nodes to be "checkable" so that I can tell my program to do certain things with items checked. Can this be done? If not with TreeView, is there somethings that is free that is an add-in that I can use?

View 12 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

.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

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

Asp.net - Get The Current Startup Project's Physical Location In C#?

Sep 3, 2009

I want the location of the current execution project i.e in VB.NET/C# or the current class file's path? Ok,let me elaborate i got 2 projects in one solution file,lets say A,B are projects, my startup project is B ,and im accessing a class file in A ,now i need to know virtual path of B. because i need it for accessing the resource file coz error pops up when using ExpressionBuilderContext

View 3 Replies

C# - Project Type Is Not Supported By Current Installation?

Feb 28, 2012

I am trying to open a project in Visual Studio. I have VB.NET and C# installed. When I open the solution, it says

"The project file D:MyProjectsComboSample.csproj can not be be opened."
"The project type is not supported by current installation"

What do I need to install? C# is already there.

ComboSample.csproj

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComboBoxSample1", "ComboBoxSample1ComboBoxSample1.csproj", "{6A1F1EE5-4AED-40E0-9517-3EAC47442628}"
EndProject

[Code]...

View 3 Replies

Exit VB2008 Without Saving The Current Project?

May 15, 2010

exit VB2008 without saving the current project?Or to revert to the previous saved version?After trying a few changes in my program I decided that is was not the way to go. So I wanted to discard my changes and start again with the program the way it was.

View 9 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

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

IDE :: .settings Cannot Access Settings?

Jan 23, 2012

IDE :: my.settings cannot access settings!

View 5 Replies







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