Create ApplicationSettings At Solution Level?
Sep 18, 2009
Is there a way to create my applicationSettings at the solution level? I have several projects that need the same settings, that someone before me hard coded so was wondering if there was a way to do this via a config file?
View 2 Replies
ADVERTISEMENT
Feb 19, 2009
hello,if i have a solution with two projects, and add a class at the Solution-level, how do i reference that solution-level class within one of the two projects?
View 2 Replies
Feb 3, 2011
I am converting an old Vb6 solution to .net 2.0 in vs2010. I've been working in C# for about 3 years now and .net for 5. I don't recall having this problem in C#, but if I want initialize a readonly collection of DerivedControlFoo Is there a clean way to do it besides creating a sub to do it all off somewhere else? I'd love to be able to do it at the class level at the declaration for readability and simplicity.
View 1 Replies
Feb 22, 2011
I really like the coding speed that vb.net provides, but I don't like the possibility to forget to declare variable types, return types of functions, etc. and that is why in each class I use[code]..
Is there a way to define those two options on the project/solution level?
View 2 Replies
Jul 16, 2010
I want to be able to create a tree view that can get its nodes form a directory on a computer. In the code below, I am able to get all of the files into a list, but I cannot get the folder correct. What I mean is in your user directory, you have sub directorys such as, Documents, Music, and Pictures. When you run this code, it displays them each as thier own node, not nested. I hope this makes sense.
[Code]...
Changed the code to the way spinion told me to. When I run this code I get an error 'Object reference not set to an instance of an object' when it starts to try and add files to the tree view.
View 1 Replies
May 5, 2012
I've got a chapter I'm supposed to be working through and cannot access the template for a blank solution. My instructions are as follows:From the "File" menu, select "New", select "Project", select "Other Project Types", select "Visual Studio Solutions", and select "Blank Solution."
I can see File, I then see "New Project", but not just "Project". I click on this and my only choices are :
Windows Form Application WPF Application Console Application Class Library WPF Browser Application
I've tried searching the installed templates for "Blank Solution", "Solution", "New Solution" and have no results. I've looked around for a couple hours hoping for a way around this and no luck so far.
View 16 Replies
Apr 6, 2010
In my first application I need to create a multi-level "IF" statement and I am a little lost on how to proceed. The idea is to do figure out an estimate on costs based on the quantity of products being sold. I can do this in Excel, but the VB code escapes me.
So I'll show you in psuedo code what I want to do.
IF comboBoxA = 1 and comboBoxB = 1 then
value X
IF comboBoxA = 2 and comboBoxB = 1 then
value X
If comboBoxA > 3 and comboBoxB > 1 then
(comboxBoxA * costA) + (comboBoxB * costB) = Value X
I have another IF statement that will work off the calculations here. Haven't figured this one out yet, but I haven't gotten there yet in my form.
If Value X > Y Amount then
Offer product Z as a better idea
View 6 Replies
Jan 20, 2010
Can i force a dll to reload it's configuration?[code]...
but it look like that the value "This is an entry" is embedded into the dll's code. If I change it in the app.config or in the ComWrapper.dll.config file it has no effect on the return value.
View 3 Replies
Aug 16, 2011
I have a program that I would like to create application-level MouseEnter and MouseLeave events for. Basically I have an app that I'd like to leave open that would be very opaque when not in use, and when the user moves the mouse anywhere within the bounds of the application, it becomes solid, and when they move their mouse away from the application, it becomes opaque again.
The obvious problem is that MouseEnter and MouseLeave are control-specific and so they fire every time you move over a button or menu or whatever, so Leave and Enter are constantly firing even though you haven't "left" or "entered" the application.
So, is there any way to create mouse events that only fire at the application level?
View 12 Replies
Apr 10, 2011
i don't want to use the system date and time in my mini project.i want to create my own system date and time to be in sync with standard time i specify?
View 3 Replies
Jan 15, 2008
why are application settings stored in "applicationSettings" when the ConfigurationManager is looking in the old appSettings area in a config file?
View 6 Replies
Aug 12, 2009
Does anybody know where to find a toolbox for Visual Basic 2005 or 2008 that allow to create level, button, display or other special box used on a bridge of a ship? I want to simulate a small bridge of a ship and I need something that allow me to display engine power, rotation speed, level of pressure, compass and so on.
View 6 Replies
Nov 22, 2008
I am trying to update the CallDirectory in our app.config file during installation. The file exists, however I cannot seem to narrow down the right key combination using the Configuration classes. I am thinking <CallCtrl.Settings> throw it off as this is differant from previous versions. This is the default structure created by Setting.Setting w/in the VSDesigner.
[Code]...
View 3 Replies
Jan 25, 2010
I have application scoped settings set within my application's project properties that are working fine, but I would prefer not to have these settings hardcoded within the progarm.My goal is to modify these settings during application install, by reading from a file located with the setup MSI file.I have an insaller class successfully running and reading values from a file that I wish to change the application settings to. Unfortunatley, I am unable to figure out how to access these application scoped settings.
* I attempted writing directly to the app.conf file, but only ended up with an appsettings section as opposed to updating the specific application settings I was after
Dim targetDir As String = Context.Parameters("targetdir")
Dim templatedir As String = Context.Parameters("templatedir")
Dim savedir As String = Context.Parameters("savedir")
Dim exePath As String = String.Format("{0}myAppName.exe", targetDir)
[code]....
From within my Installer class, how best do a directly change these 2 applicationsettings?After searching / reading many posts and MSDN Class definitons, I am not able to figure it out.
View 5 Replies
Dec 6, 2011
I have a WCF service with a setting I created in the WCF application property editor (settings tab).It has created something like the following property in MySettings class in the Settings.Designer.vb file. Notice the DefaultSettingValueAttribute is set to "This is the OLD value". That's my value for local testing.
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("This is the OLD value")> _
[code]....
The problem is after restarting the WCF service (rebooting the server machine completely), it never reads the new value. It continues to use the old value that was set as the default value in the designer file.I think this must have to do with file permissions, but I don't see anything in the event log that indicates a problem. It's like the WCF service isn't even trying to read the web.config file.Why isn't the service reading the settings value from the web.config file?
View 1 Replies
Apr 1, 2012
I am creating an Excel add-in written in VB.NET. I would like to bind KeyDown and KeyUp events to the spreadsheet to record when the user presses and releases the arrow keys while navigating the spreadsheetIdeally, these events would be built into Excel alongside the native SheetActivate and SheetSelectionChange events, for example. Alas, they are not.
View 1 Replies
Oct 7, 2008
I try to create a form that managing the access level of user management system.The model I use is the following :I create a connection to database I create a DataAdapter to transfer the data from the database I create a Dataset to hold my data My form consists of the following :A ListBox that list all the access level namesThree text boxes: the first for the record ID The second for the access level name And the third for the discription of the access level Five check boxes:One for writing rights One for the deleting rights One for the Updating rights One for Printing rights And one for Special area access rightsSo what i do is the following :I create a connection string I create a new connection to my database server I create the DataAdapter I initializing the DataAdapter command such as SelectCommand, DeleteCommand, e.t.c.I fill my DataSet with the data DataAdapter get from DataBase I binding my controls to DataSet I setting the DataSource property of the ListBox to my DataSet I setting the DisplayMember to the ACCL_NAME column of the DataTable inside the DataSet I setting the ValueMember to ACCL_ID column of the DataTable inside the DataSetUntil this time all are fine ! ! !The question is :When i try to add a new row to dataset by using the following code i have a problem :
Dim newRow As DataRow = Dataset.Tables("TableName").NewRow newRow("COLUMN_NAME") = Binded Control Value DataSet.Tables("TableName").Rows.Add(newRow)
View 3 Replies
Aug 12, 2009
Does anybody know where to find a component for Visual Basic 2005 or 2008 that allow me to create level indicator, button, display or other special box used on a bridge of a ship? I want to simulate a small bridge of a ship and I need something that allow me to show engine power, rotation speed, level of pressure, compass and so on.
View 1 Replies
Jun 1, 2009
I have a WinForms dialog box that contains 3 radio buttons. I am using ApplicationSettings to bind the Checked property of each of these RadioButton controls, but it doesn't do what I am expecting it to do. Now I have to click each radio button twice before it gets checked and the selected radio button is not being persisted.Is there a line of code I need to execute when the form is closed that saves the user settings?How do I eliminate the need for 2x clicking on the radio buttons?Is there a better way to persist this type of user setting? I do have a public property on the dialog box class that gets/sets an enum value based on which radio button is checked, but I didn't see an easy way of binding that property to a user setting. Should have specified that I'm using vb.net. I think that means My.Settings instead of Properties.Settings.
View 4 Replies
Jan 6, 2010
In Visual Basic 2008, there's two different ways that I know of to accomplish the same thing:The Dim on the member level:
Dim counter1 as integer = 0
Dim counter2 as integer = 180
Public Sub SampleSub1()
[code].....
View 1 Replies
Nov 19, 2010
I want to use property bindings under application settings to store settings for my program. However I have run into a problem. For some reason the checked property is not binding to drop down menu item's checked state. The binding works for text boxes and other controls. I have tried to bind both using the checked property, and checked state property. Auto check on click for the menu items are set to true.
Anyone have any recommendations in getting the app-settings property binding to work without the need to manually set that info and manually run My.Settings.Save?
View 2 Replies
Mar 18, 2011
I have created a simple program which uses a two tier structure of SQL Tables.At the top level, one record holds the date of the activities and linked to it using its primary key as a foreign key, three subordinate tables hold time stamped records.The issue I have been unable to solve is that before adding any of the lower level records for a given date, a newly added top level record must be saved to the database.Doing this manually is simple - but can I rely on my users to remember to do this before they start plugging in the lower level data?I thought not, so I am looking to save the top level automatically.I've failed miserably but I refuse to believe that it's not possible.
View 14 Replies
Feb 12, 2011
I have multiple level of For Each and in each level, i have a Linq that is the 'In' criteria as in:
[Code]....
It will go inside each for (because the value is not nothing), however, it will only loop (next) in the very inner 'For Each t In tFor'. After it is finish inner loops, the outer Fors' or Next will not execute... even thought there are more than one values in that 'In'... like 'sFor' or 'fFor'. i've noticed while debuging, while break at the for (for example 'sFor', before stepping in), i get the error message:
"Enumeration yielded no results" when i expand the result for that variable and it will not step into it. but if i do not expand the result, it will step in. It seem that some how, once an element is accessed for that 'In' collection, it breaks (meaning does not loop for the rest of the elements) the next for that collection is this a bug or am i missing something in Linq? BTW: i believe it has something to do with the SqlDataReader in the Linq. I'm working with IAsyncResult.
View 5 Replies
Nov 10, 2009
U0161 import a Platinum level Advisor .jar to use with this Platinum level product key.How I can get this and import it to continue my completion of setup of mysql download?From where I can download that file?To enable this application, please provide a MySQL Enterprise Product Key or your MySQL Enterprise credentials.
View 1 Replies
Mar 27, 2012
Till yesterday I was working fine with my Project.I din install anything new, am not trying to open my solution file with a different version also.Today when i tried opening my solution, it was saying
"The Selected Fiel is not a valid solution file"
"The Operation could not be completed.Unspecified Error"
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "??E", "..Setup2Setup2.vdproj", "{600F8FB2-B9A9-4138-B7E7-FE7B39815CC1}"
EndProject[code].....
View 6 Replies
Aug 30, 2011
I have a .Net solution with 5 projects in c# and one in visual basic. I want to know whether there would be a gain of performance to convert my visual basic project to C# in the day to day while I compile my solution.
View 3 Replies
Dec 1, 2011
Im trying to implement this code: url... and want to add it to my existing VB.NET solution.But when I look at the source code I see a code behind file for global.asax (Global.asax.cs) file with a namespace defined in it?!?Now in my existing VB.NET solution I DONT have a code behind file. Here's what my global.asax looks like: [code]When I add the namespace code as in the sample code I get: 'Namespace' statements can occur only at file or namespace level.How can I implement the sample code correctly in my current solution?
View 1 Replies
Feb 25, 2010
Im working with a CD722UN Customer Display for our POS application. it comes with a USB2.0 connection and a installation package containing a driver etc. now, for my application. how should i do when i want to access this driver? at the moment i'm using the "CD722UN application"s .dll path but that can wary from clients OS etc. [Code] my first thought was to first check if there was a device installed in the device manager and somehow use the driver from there? [Code] what is the best solution?
View 1 Replies
Mar 2, 2012
I have a solution, Winforms, mainly composed from VB.NET projects (Wiforms, Constrols and business classes).
How, I added to it a WPF project, but wrote it in C#. Actually, every time I make a modification in the WPF C# project, I need to (re)build the C#WPF project. Is there a option to make it work like other (VB.NET) projects (accept and "see" the changes without rebuilding the C# project)?
An example:When I reference project "R.VB" in project "M.VB", I add a method "DoTest" in the "R.VB" and use that method in "M.VB" without compile errors.
If I add "DoTest" in the C# WPF Control and try to use it in "M.VB" project, I recieve a compile error "DoTest" is not a member od "R.C#Class".
View 5 Replies
Feb 12, 2009
I have 2 projects (P1 and P2) in a VB2008 solution, with each project compiled to a separate EXE.P2.exe is started via a button on P1 and while P2 runs, certain aspects of P1 are disabled. When P2 closes, P1 needs to reactivate those disabled aspects.Question: How do I communicate with P1 from P2, seeing that they are 2 separate EXE files, even though part of the same solution?
View 2 Replies