IDE :: Custom Settings Provider Breaking Designer
Dec 6, 2007
In Visual Studio 2005 or 2008, when adding any User Controls to a Windows Form or other User Control in a Project that implements and is using a custom settings provider, a "Failed to create component" error is displayed. If all references to the custom settings provider are removed from settings.settings and that file is saved then User Controls can be added to Windows Forms and User Controls. However, if the custom settings provider is referenced again in settings.settings, then opening the designer of a Form/Control which includes a User Control results in a "One or more errors encountered while loading the designer..." error message.
I have had a very difficult time in tracking down the root cause of this issue because I assumed it had to do with my code and not the IDE. I am working within the context of a large project which uses User Controls heavily and have written a custom settings provider to persist user settings to a SQL Express database. This settings provider works properly, however if I want to open any Forms or User Controls in designer view I must first manually remove all references to my custom settings provider in setting.settings and then re-add them after the changes are done which is inconvenient to say the least. This problem is not present if the Project is in C#.
View 5 Replies
ADVERTISEMENT
Dec 3, 2009
I have created a custom UserControl, with a custom designer, which contains a Panel which is editable. Any controls dropped onto this Panel will go off-form when an Anchor is set. This was already reported here and acknowledged as a bug:[URL].. Are there any known workarounds? Or available hotfixes for this issue?
I already implemented ISupportInitialize in my custom panel class, where i set the docking, which doesn't help. Here's the relevant code:
[Code]...
View 1 Replies
Feb 11, 2010
I have created a custom Profile Provider that is integrated with the API of a CMS. It works fine when pulling data for an authenticated user (Profile.FirstName), but errors when creating a new user's profile.
[Code]...
View 1 Replies
Feb 21, 2010
I'm creating a custom Role provider based on the ASP.NET Role provider. I have 3 tables. One for Users, one for Roles, one for UsersInRoles.The Users table has no password column because the users are authenticated with ActiveDirectory. That's my approach so far. I can't get the cusstom Role Provider to work, anyone has the same situation like me. How do you make a custom Role provider works with AD?
View 2 Replies
Feb 8, 2010
I would like to use my custom membership provider (which is working in my asp.netapplication) in my windows forms application.I thought this would be relatively straight forward, and followed these steps:1. Copied MembershipProvider class into my application.2. Add reference to System.Web3. Create app.config with membership settings i.e:
View 3 Replies
Sep 8, 2011
Every .NET project I've worked on uses an app.config file for its configuration. Fair enough. "is there a better way?" (in the spirit of continual learning of course)I guess my specific questions are:
Does it matter either way if I use app.config or settings file?Are there any scenarios where settings files should not be used e.g web sites where you should use a web.config instead?Other than not having to edit xml, are there any other benefits gained by using settings instead of app.config, e.g. its easier to deploy or maintain apps etc.
Clarification: I'll put this question another way: Can I completely ignore app.config files if I want to and keep all the configuration in a settings.cs file and interact with configuration via the designer only?
View 2 Replies
Aug 30, 2009
I followed the instructions but my settings aren't being saved and retrieved. How do I do this?
davidbell ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/dv_mancli/html/53b3af80-1c02-4e35-99c6-787663148945.htm
View 1 Replies
Aug 2, 2010
I have some related Properties in a class. Namely, One is a collection of objects and the other is an index to the one that the class instance is looking at. In the designer, I need for the collection to be set prior to the index. I tried to do this manually, but when the file is saved, the Designer goes back and writes over my change. So I need to know how to tell the designer in which order to set the properties.
View 2 Replies
Mar 18, 2010
Add custom settings to the My.Settings namespace
View 7 Replies
Jan 20, 2011
but it's something I'm pretty consistently needing for the sake of my own sanity, so:If you add a Settings file to any project in Visual Studio, VS provides a GUI making it quick/easy to add a new Setting entry and assign it a Type; at that point the actual code-behind is automagically created with a variable and a property exposing that variable.Can we build our own designers to generate code this way, with a GUI allowing for those quick/easy variable/property assignments?
View 4 Replies
Mar 21, 2010
Is it possible to make a form that can set the properties on a custom control in the designer? What I mean is I want to know if it is possible to show a dialog that allows you to set the settings for a certain property like if you were adding items to a listbox.
View 3 Replies
Oct 17, 2011
I am devloping a custom designer (like the form designer), which can be used to design custom controls at designtime (see spoiler for screenshot).The problem is that i want to show the propertyes of the currently selected object in the propertygrid window in VS, and i can not figure out how to do that.
View 4 Replies
Oct 8, 2011
I have come across a problem with visual studio 2010 & vb.net. i have a few custom controls on the form and few standard controls. When i build the application, the custom controls automatically change size and location. Anchoring and Dock properties are fine. Anchored to Top Left without dockstyle. Even if i fix the location and size in design mode, after i run the application the controls again change back to weird position.
View 2 Replies
Oct 26, 2011
I have created a custom designer (PannelloSfondoDesigner) for my custom control, a background panel (PannelloSfondo).
<Designer(GetType(PannelloSfondo.PannelloSfondoDesigner))>
Public Class PannelloSfondo
Inherits UserControl
[code]....
It works, I click the little arrow, the context menu appears:I click the menu item, the event is fired, the control is docked:but the menu description is not updated or refreshed (it should show "Undock from parent container"). Then if I click outside the control to deselect it and then I click back on the arrow to show the menu, the right menu item is displayed:How do I refresh the menu items?
View 1 Replies
Oct 28, 2011
I have been scouring for examples to give me some idea on what I need to do to create a skinable scrollbar. The only thing close that seems to work like I need is Cool Scrollbar The problem I am running into is on the designer...when I move it, resize it, or change the direction of the control (ScrollbarLayout), it seems to want to re-name the class the item is an object of from CBar to cbar.CBar. Once I position and align it properly to check, I can go through the Form1.Designer and simply remove the cbar. and get no errors. When I run the program, it is fine, so this is telling me that there is something wrong with the movement in the class...
[Code]....
View 5 Replies
Aug 10, 2011
At the moment, I'm writing tons of custom control, which all fits my needs. But the thing is, each time I Debug the project, it doesn't update the form designer at all, not even the code. My solution to this is to Rebuild the project, which can take time. This is very frustrating.
I'm using Microsoft Visual Studio 2010 Ultimate to compile.
View 4 Replies
Sep 21, 2010
I'm writing a custom control and I want to add a "MessageText" property of type String:
<Browsable(True),
DefaultValue(""),
Category("CustomControls"),
[code]....
The MessageText property is a multiline text, and the user must be able to set the text using the designer. The problem is that the designer doesn't allow to enter a newline directly for a string property.I want the same behaviour as the system TextBox's Text property, where you can click on the down arrow and write lines in the small text-editor that appears:How do I do that?
View 2 Replies
Feb 16, 2012
I created a server control which consist only of fews buttons.
CWNavigation.vb
<ToolboxData("<{0}:CWNavigation runat=""server""></{0}:CWNavigation>")> _
<DefaultProperty("Id")>[code.....
I then referenced it in my ASPX page. Take note that the control are in the same solution, same project located in Commun/Navigation/CWNavigation.vb.
<%@ Register TagPrefix="NAV" TagName="CWNavigation" Src="~/Commun/Navigation/CWNavigation.vb" %>
I added it to the page.
<NAV:CWNavigation ID="CWNavigationService" runat="server" />
But the designer file along with the code-behind generate it as.
Protected WithEvents CWNavigationService As Global.System.Web.UI.UserControl
View 1 Replies
Aug 3, 2011
i have 2 computers - a Server and a Client pc which is running on local area network with MICROSOFT SQL SERVER 2008 R2 Developer kit at the main pc and Client computer will need to connect to SQL SERVER at main pc using connection string.Let me named server computer as 'MAGNA-PC' and the client pc as 'LAC-PC' and database name is 'db_referafriend' so the code for MAGNA-PC(server) connection string is:[code] i GOOGLE and YOUTUBE for almost 2 weeks before i post . I know that i need to configure the sql configuration manager and enable tcp/ip also add a new port at firewall to allow remote connection also add the sqlserver.exe and sqlbrowser in firewall and I have also chosen "Using both TCP/IP and named pipes" under Remote Connections in the SQL Server 2005 Surface Area Configuration. and all of this doesnt work!
View 10 Replies
Jan 25, 2010
I've read alot of stuff about the Speech API having some way of modifying the voice properties for synthesis but for some reason it's read-only.
View 12 Replies
Jun 1, 2011
I have a custom settings class which I use for Machine Wide Application Settings and save as a file. I use a custom file instead of the visual studio settings config because Int the settings to be machine scope or application scope which are normally unusable as they are readonly.I dont want the settings to be user scoped.
Imports System.Xml.Serialization
Namespace My
Public NotInheritable Class MySystemSettings
[code].....
View 13 Replies
Oct 17, 2010
I have a Visual Basic .Net 2.0 program. I'm moving the settings from an older settings file, to an app.config program settings file. I'm trying to do this as nicely as possible.
So, I added my setting as shown in this image.
On load I do this:
If My.Settings.databaseConnectionSettings Is Nothing Then
My.Settings.databaseConnectionSettings = New ArrayList()
End If
[Code]....
So, the question is, how do I get that arraylist of my DatabaseConnectionSettings saved to persistent storage? I want to do this in the cleanest way possible. That is, I don't want to have to convert it to a string or save it to a separate file every-time I want to use it. I would like to be able to use the My.Settings accessor method.
View 1 Replies
Nov 24, 2011
I want to save a Custom DateTimePicker.Value in my Application Settings. The custom format is : dd/MM/yyyy hh:mm:ss, instead of dd/MM/yyyy The field i've created in the application settings parameters is LASTSAVE (DATE / APPLICATION)
When I try to link in the ApplicationSettings/PropertyBinding ... VALUE with my field LASTSAVE, i have an error :
The Value '01/01/0001 00:00:00' is not valid for 'Value'. 'Value' mustbe ... 'MinDate' et 'MaxDate'.
Name of the parameter : Value
I then entered the MIN and MAX date in the properties of my control DATETIMEPICKER.
I have also put into the properties Value a start date like 23/11/2011 12:00:00 ;
However, when i retry to link in the ApplicationSettings/PropertyBinding ... value to LASTSAVE / I have the same error (The Value '01/01/0001 00:00:00' is not valid for 'Value'. ). I've saved all, do a process that put a value in the datetimepicker.value, but it's not saved, cause not linked.
View 1 Replies
Mar 9, 2011
(using VB.Net 2008) I am trying to save one of my custom types to the application settings. I've read a variety of opinions on the internet about whether this possible.
When creating an app setting, none of my types appear when browsing. However, previously I needed to save off one of my datasets, and it worked simply by hand-entering it as the setting type (ie, I just typed "MyProjectName.DatasetName"). However, when I try the same trick with another custom type that isn't a dataset, I get a "type was not found" error. So I'm a little confused, can the program "find" some custom types and not others?
View 5 Replies
Mar 20, 2010
I was just wondering what is the Quickest way to set up custom settings, every software has settings that are created and saved, Example a Hotel Software has rooms, roomtypes etc that are used in combination with other things, an Accounting software has Account type, Employee Software will have Full time,Parttime, or anything else, An Employee time Clock would have departments, Tax Brackets.
[Code]...
View 5 Replies
Jun 4, 2010
I would like to be able to specify exactly where the My.Settings file gets saved. It bugs me how it gets saved off in the middle of appsettings nowhere, and I would prefer it gets saved where the executable is. If anyone knows how to do this, that would be great. (P.S; I'm using VB.Net.)
View 14 Replies
Aug 13, 2009
how do i detect when the user has changed the colors in the custom colors in colordialog?
View 1 Replies
Feb 11, 2011
This has been driving me batty for the last while. I have an application that is passing up data to a SQL server table. Part of the data is dates. Because of settings on the SQL server the update will not accept the MM/dd/yyyy format. I have been trying for quite some time to get around this.
For some more information. Changing the update method or the server regional settings is not an option and I don't want to change my regional settings as this may not reflect the production server when this goes live.
Here is what I have tried so far
Code:
Dim dateEnd As Date = Date.MinValue
Dim dateStart As Date = Date.MinValue
If IsDate(Me.txtPostEnd.Text) Then
[Code]....
It works fine if the day is 12 or below because it still thinks that is the month. Is there a way to force the code to recogize that I want to use dd/MM/yyyy format or even dd/MMM/yyyy format?
This has to be done at thhe vb code side as the update to the SQL server is completed via a custom framework so I can't customize the SQL code to insert the data using a CONVERT
View 8 Replies
Oct 28, 2010
So I've been working with DotNET for a few years now; long enough to establish solid preferences for one available element over another, one available logic over another, and then to develop preferences for aspects of elements and logics.
The one that conflicts me the most is the stock Settings construct. It's a great idea - I mean everybody needs basic data persistence that isn't worthy of databasing, right? It's implemented in a way that anybody - and I mean anybody from flat beginner to highly advanced - can benefit from it. It does some heinously stupid stuff, though; for example, it angers me (and I mean full-on, where's my crowbar-OK-now where's the silly @#*! who came up with the idea anger) that the only way to save it is the way that's hardcoded in. The .SAVE method takes no parameters, there's absolutely zero exposure for the save-path to provide a more deliberate location, so the only place any settings ever get saved is in a ridiculously long (and literally arbitrarily designated) user-profile-based path.
So what happens if/when a user is ready to upgrade their OS (or just reformat and reinstall their OS, which the kinds of people who end up on my client list are prone to do just as part of quarterly maintenance), and they want to save their personal application settings to load in the next time around? They either have to hunt out that moronically obfuscatory save location or I have to write special (and I mean riding the short-short-short bus special) code which is more or less a whole new settings class identical to the settings classes implemented in the application to begin with, just to allow them to export their settings to a known location for transfer.
And what happens if a specific setting needs special treatment beyond the basic 'changing' and 'changed' events provided by the stock class? Since any change to the Settings Designer rewrites the whole code-behind property declarations, I can't do it in that code file; I either have to extend the Settings class or get back on the short-short-short bus and write that special 'mirror-class' again.
I'm not much for just general whining though, so some time back I wrote my own serializable classes (designed for specific data persistence, like generic/universal application settings and then also MySQL server connections/credentials and then also form properties and then also application-specific settings) along with shared save and load methods which give me more control over where settings get saved. These classes have evolved over the last year or so until they're actually pretty awesome (even if that's
just my opinion)... I've even implemented full on-disk and in-memory encryption functions for applications that need different privilege levels, to prevent any tampering at any time.
And then a multi-user application project comes along and suddenly each individual settings class needs multi-user support based on the Windows user logged in, and suddenly the stock Settings class is the best option again even though it's still the worst possible option in settings persistence.
So what I want to know from this discussion is this:
How do YOU handle application and user-settings persistence? Is there something really key that I've been missing all this time that makes the stock Settings class more than absolutely worthless (which has been my opinion since about the first time I ever had to work with it)?It never hurts to try. In a worst case scenario, you'll learn from it.
View 1 Replies
Jun 27, 2011
I have a custom control that as a custom property. The property has several preset values to chose from a drop down. The control can be added to a form. The property can be viewed and set in the properties box in the IDE. It all works fine.
Here's the problem: I can create new versions and recompile the control and/or the application without the properties preset value being lost as long as I do it in Debug mode. However, once I try to recompile in Release mode the custom property values predefined setting is lost. I first thought it was something with going from debug mode to release mode. But it seems to be ANY time I recompile in Release mode the custom property values are lost. Is this a quirk in VS that needs a configuration setting, etc. to get around it?
View 3 Replies