Hi all,
I've a class ("Class1"), with an auto-generated a "Class1.exe.con fig" for
use with the My.Settings function calls.
If my "Class1" is a window form, everything just works fine, i.e., I could
open up "Class1.exe.con fig", change some values in it, launch my Class1.exe
and all the changes will be reflected.
However, when I changed my "Class1" to a Class Library, nothing works. It
will now auto-generates a "Class1.dll.con fig", but whenever I change the
values in the config file and re-launch my application, the changes doesn't
get reflected.
I think it must be some settings in VS2005, but just couldn't seems to
figure out what. Pls advice.
Thanks,
Simon 1 918
Simon,
I don't have 2005 yet and don't know the answer, but my philsophy was that
it's so easy to write my own, and 2003 didn't work like I wanted so I did.
You can get my settings class, which does work at www.storyitc.com/codesamples
clsPropertyMana ger (you will need to copy the text to a file with a .vb
extension and add to your project as an existing class.)
The code should be pretty explanatory. Specify the config filepath in the
constructor and true if you want settings read in on the getgo,
then it just uses an item style property to set and get settings. It could
be easily expanded to support groups of settings if you wanted to.
MS may have better with 2005, but if not, you at least know how this works
and have the code.
HTH,
Shane
"Simon Says" <si******@gmail .com> wrote in message
news:ur******** ******@TK2MSFTN GP11.phx.gbl... Hi all,
I've a class ("Class1"), with an auto-generated a "Class1.exe.con fig" for use with the My.Settings function calls.
If my "Class1" is a window form, everything just works fine, i.e., I could open up "Class1.exe.con fig", change some values in it, launch my Class1.exe and all the changes will be reflected.
However, when I changed my "Class1" to a Class Library, nothing works. It will now auto-generates a "Class1.dll.con fig", but whenever I change the values in the config file and re-launch my application, the changes doesn't get reflected.
I think it must be some settings in VS2005, but just couldn't seems to figure out what. Pls advice.
Thanks, Simon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dathon |
last post by:
I am trying to recursively enumerate the contents of my Documents and
Settings folder. While doing this, I cam across the following:
C:\Documents and Settings\All Users\Application Data\Symantec\hpc\
This directory contains an empty file named " " (a single space)
The weird thing is that when I call Directory.Exists on this path
(C:\Documents and Settings\All Users\Application Data\Symantec\hpc\ ), it
returns true! This is clearly...
|
by: Henry Reardon |
last post by:
I have been having problems with the Development Center for several days
now. It seemed to be working fine when I initially installed DB2 (LUW)
Version 8 (FP7) and upgraded to FP8, except that I kept getting SQL1131
whenever I tried to prepared a stored procedure. As a result, I
completely deleted DB2 and reinstalled version 8 and upgraded to FP8. At
that point, I experimented a bit with some of the Environment Settings,
particularly the...
|
by: scottyman |
last post by:
I can't make this script work properly. I've gone as far as I can with
it and the rest is out of my ability. I can do some html editing but
I'm lost in the Java world. The script at the bottom of the html page
controls the form fields that are required. It doesn't function like
it's supposed to and I can leave all the fields blank and it still
submits the form. Also I can't get it to transfer the file in the
upload section. The file name...
|
by: Mountain |
last post by:
In the following MSDN documentation:
http://msdn2.microsoft.com/en-us/library/system.configuration.applicationsettingsbase(VS.80).aspx
there is an example of using ApplicationSettingsBase. I implemented the code
and it works as expected. However, I want application scoped settings, so I
changed UserScopedSetting to ApplicationScopedSetting. Now, it doesn't work
at all. No app.exe.config file is created and, of course, the settings are...
|
by: Robert Dufour |
last post by:
Here's the class code snippet
Imports System.Configuration.ConfigurationManager
Public Class Class1
Public _strTestSetting As String
Public Sub SetTestsetting()
| |
by: =?Utf-8?B?UmljayBHbG9z?= |
last post by:
For some unknown reason (user error?), I cannot get a NameValueCollection to
persist in the app.config file.
Unlike other settings, I cannot get the String Collection Editor GUI to
allow my to add/edit any values for a setting with type NameValueCollection.
Nor can I get a NameValueCollection to persist to the User Settings via code
using a simple C# Console App...
Is this a user error or ?
|
by: hscott93 |
last post by:
Hello. I have a new Vista based laptop at work that connects to a Windows 2003 Small Business Server at work via an assigned, static IP address. When I take the laptop home, I have router that assigns a dynamic IP address. The only way I can get the machine to function correctly at work and at home is to physically change the settings in Control Panel each time I connect. When at home, I tell the machine to obtain address automatically. ...
|
by: jheines |
last post by:
I am trying to explain how cookies and sessions work in a class I teach, but I have hit a wall when it comes to the interaction between cookies and the state of the privacy settings in Internet Explorer. I would appreciate any help anyone can offer, please.
First, consider the following very simple JavaScript function:
function CookiesEnabled() {
SetCookie( "testcookie", "testcookie" ) ;
var bCookiesEnabled =
( GetCookie(...
|
by: Just_a_fan |
last post by:
I save some data to an array in my program. I can reopen the setting
screen and see that the data is, in fact, in the array.
I then do a lot of these:
My.Settings.Brkr1 = BreakerAmps(1)
My.Settings.Brkr2 = BreakerAmps(2)
My.Settings.Brkr3 = BreakerAmps(3)
My.Settings.Brkr4 = BreakerAmps(4)
My.Settings.Brkr5 = BreakerAmps(5)
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |