Rewriting The Settings In Windows Forms?
Dec 25, 2011
I have set the name of my Form text in the application settings and I need to rewrite it. Is it possible as it is showing me that it is only a readonly.I know that we can simply change it by using me.text="" But I have a problem in my application as I have the below code where On every time the form loads it is erasing the text.
Protected Overrides Sub OnLayout(ByVal e As System.Windows.Forms.LayoutEventArgs)
MyBase.OnLayout(e)
'Me.Text = CStr(Val(Me.Text) + 1)
FillList()
[code]....
View 2 Replies
ADVERTISEMENT
Aug 5, 2010
I am working on a .NET Windows Service where I am trying to store settings that will be used when the service is started and while it is running. I have searched through posts on SO and found that using the Settings in the properties of the project is great for use with console and winforms applications. However, Google and SO are silent when it pertains to storing these settings with a windows service.
View 4 Replies
Dec 26, 2009
I have an application built that has several forms. I use an XML file to store settings data (mainly folder names for data output) and I need each form to be able to access and modify the data. I'd also like each form to access functions from a main form (such as file parsing functions). I have read articles about properties and inheritance but I need some guidance as this topic is pretty confusing.
[Code]...
View 10 Replies
Feb 24, 2012
I have over 11,000 pages in a site and need to change the tag on every page. I interact with production through horribly slow tool so doing a global search and replace is out of the question. The site is in a .net environment and I utilize vb so I am wondering if I could rewrite the tag sitewide on the fly with a class
View 1 Replies
May 16, 2011
It looks like theres a bunch of threads with these issues. Mine has to do with events and event handing in an add-in...so its a bit complicated for me.I'm trying to rewrite this C# code
#region Event Handling
/// <summary>
/// Wires up events from xWeb and this plugin
/// </summary>
[code]....
I have no idea where the type AddinActiveDocumentChanged and the type DocumentEventHandler is coming from. Intellisense doesn't have these. So both of those sub routines I'm stopped at.
View 4 Replies
Oct 29, 2011
I am trying to use values from form1 in my project, in form2, but Im not sure how to do it. I've tried
txtboxTotal = (Form1.vsbLength * Form1.vsbWidth) * Pattern
But I get: operator '*' is not defined for types 'System.Windows.Forms.VscrollBar' and 'Systems.Windows.Forms.VscrollBar.'
View 14 Replies
Mar 2, 2012
How would I write the 3rd VB code in C#?. I can't find anything on Google.
Imports XL = Microsoft.Office.Interop.Excel
Public Class LicenseRenewal
' The line below to C#
Private xlRangesForRenewal As New List(Of XL.Range)
View 5 Replies
Jun 2, 2009
in terms of speed and resource usage is it better to call the access queries using access.aplication or rewriting the database objects in VS? By using access there should be just one version of the queries, not two and access is more friendly for writing the queries.
View 2 Replies
Jun 23, 2011
I am making an application so I can easily clear up this ini file. The ini file contains such data as playerlevels, abilities they own, abillities available, conclusion: it contains all information for the RPG modification for a game.Now when I have for example this in my INI:
[[CD]Infernus RPGPlayerDataObject]
OwnerID=xxxxx-xxxxxx-xxxxx
Level=57
Experience=234
[code]....
;Each ability will be removed. The problem here is that earlier in the code you also have Abilities= which I really need to keep, I only want to remove it from parts starting with the header [**some name** RPGPlayerDataObject]
View 7 Replies
Feb 18, 2010
I have wired up a Global class to an HttpModule. It's job is to detect "http:/www." in the URL and redirect the user to the NON www. version
Protected Sub OnBeginRequest(ByVal sender As Object, ByVal e As EventArgs)
'Force Removal of WWW
Dim application As HttpApplication = TryCast(sender, HttpApplication)
[code]....
not something I want to do anyways since it's a hack, but it didn't work anyways.
View 4 Replies
Jan 7, 2011
I have a txt file comprised of a vertical list. The list contains x-amount of groups but what is standard is that they are always made up three entities.Example as follows:
PANNEL A
38
2440
Explained as:
NAME
WIDTH
LENGTH
A list of three items (though list can contain x-amounts) is identical to:
NEW BEAM
38
2440
[code]....
I now need to create a new txt file, which is written as follows:
("NEW BEAM" is "38" x "2440")
("WOOD" is "22" x "610")
("ITEM A" is "50" x "1220")
How van I do this using VB.NET?
+
View 1 Replies
Sep 8, 2010
I have the code which checks if there is a selected tab
Private Function GetBrowser() As WebBrowser
If TabControl1.SelectedTab IsNot Nothing Then
For Each c As Control In TabControl1.SelectedTab.Controls
If TypeOf (c) Is WebBrowser Then
Return c
[Code]...
View 2 Replies
Apr 14, 2009
Relating to another question I asked yesterday with regards to logging I was introduced to TraceListeners which I'd never come across before and sorely wish I had. I can't count the amount of times I've written loggers needlessly to do this and nobody had ever pointed this out or asked my why I didn't use the built in tools. This leads me to wonder what other features I've overlooked and written into my applications needlessly because of features of .NET that I'm unaware of.
Does anyone else have features of .NET that would've completely changed the way they wrote applications or components of their applications had they only known that .NET already had a built in means of supporting it?
It would be handy if other developers posted scenarios where they frequently come across components or blocks of code that are completely needless in hindsight had the original developer only known of a built in .NET component - such as the TraceListeners that I previously noted.
This doesn't necessarily include newly added features of 3.5 per se, but could if pertinent to the scenario.
Edit - As per previous comments, I'm not really interested in the "Hidden Features" of the language which I agree have been documented before - I'm looking for often overlooked framework components that through my own (or the original developer's) ignorance have written/rewritten their own components/classes/methods needlessly.
View 5 Replies
Sep 3, 2009
How do design settings forms
View 2 Replies
Jan 28, 2011
I'm working in VS 2008, on a windows application.I have many forms, and I'm in the process of redesigning the GUI.Is there anything that I can do to standard some of the placement of the controls. For example, I have a header for each page, at a certain size and location. Instead of going to each form, is there a way to do the settings once, and apply to many forms?
View 2 Replies
Apr 28, 2009
I have a panel with some controls in it (several textboxes, a slider, 2 buttons, and a small groupbox).. When I click a button, I want all of the textboxes within the panel to be readonly... So I have this code: [code] When I run it though, I get the following error:Unable to cast object of type 'System.Windows.Forms.Button' to type 'System.Windows.Forms.TextBox'.If I remove a button, it moves on to give me the same error but for a label..
View 4 Replies
May 7, 2010
I have a form that runs completely full screen. The form has MDI child windows. My issue is for some reason whenever i try to use a setting in a child window the program freezes up and i have to end it with the task manager. For instance if i add a string to a string collection when the child form opens like i would normally do if it wasn't a child form the form will open then the program will freeze. Am i doing something wrong or is there any way to get this to work?
View 7 Replies
Jun 13, 2011
I am creating a program which launches a game server. I have combobox in which the user can enter the ip, map, etc, of the game. How can I save what they have entered so that the next time they are already there so they don't have to re-enter them.
View 2 Replies
May 6, 2009
I've been trying to get my head round a problem for days now, I want to read 'File.ini' line by line checking if specific text exists in the file and then display on a windows form weather particular settings are turned on or off.
So far this code works if "TargetText" exists but if it doenst I get an error on the code line: "If line.Contains("TargetText") Then".
[Code]...
It works if "TargetText" existin in a line in the file but if it doesnt exist I get the 'Null Reference Exception. Object reference not set to an instance of an object.' Any suggestions greatfully recieved!
View 3 Replies
Dec 19, 2009
I have got some code and after some slight modiications now works fully for what i need - but only on XP.
However, my problem is when the software is run on Vista. My software doesn't seem to be able to control any of the Mixer Lines it's supposed to, but will randomly change the Mute/Volume level setting on the 'Application Audio' setting in the Mixer. Can anybody point me in the right direction to change settings on a Vista machine? My Module is attached below. To use in a form you must use the line: modMixer.OpenMixer() prior to any further commands. For example:
1. modMixer.OpenMixer()
2. modMixer.MuteLineInVolume = True
View 2 Replies
Jun 22, 2010
I would be grateful if you helped me. I've built a text editing application and I would like it to load values/user settings from the Windows Registry. Here's my code but it is somehow wrong (I believe it whatsoever has to do with wrong syntax but it could be something else);
[Code]...
View 8 Replies
Sep 22, 2011
I have a VB.NET solution built in Visual Studio 2010. It consists of a class project, a service, and a setup project. I have successfully created a setup, and run the setup from the "Release" directory of the setup project (outside of Visual Studio). It installed the service (on the same machine as where the project is), and the service seems to be running fine. The service executable is installed in a directory under c:program files (x86) along with some DLL's it is dependent of. The service (actually the class project I mentioned above) uses some settings from My.Settings. As far as I know these settings are stored in a app.config file in the project directory, as well as in a settings.settings file in the My Project directory under the project directory.
Neither of these files are installed by the installer. But the service can only run if it can read the settings. So where does my service get these settings from? To check if it still reads the settings from the VS project directory, I have temporarily renamed that directory, but that didn't affect the correct operation of the service.
View 3 Replies
Jun 30, 2011
how to update the mms settings via code on a windows 7 phone. I have seen some apps out there that update your settings but those were for the HD7 phone.
View 1 Replies
May 3, 2009
Is it possible to make VB 2008 go into Windows folder options and tick the "Display the full address in address bar" (under the view tab) ?
View 2 Replies
Nov 20, 2010
I have a question how can I save in My.Settings only the font name and not the size.I have a form where I can change the font for a label on another form. This works perfect.I can even save it in my.settings.
The thing is though, that on that other form I have 2 labels, thet should have the same font name, but the size should be different. (label1 has font size = 40 (can be changed) and label2 should have a fixed font size (should not be changed)).I tried to use label2.font.size = "14", but font.size is readonly.
View 2 Replies
Dec 30, 2010
If you edit a service in Windows 7 and go to the Log On Tab, there is an option to "Allow service to interact with desktop". I'm trying to ensure that it is set for a certain service using VB.NET.
Note: Doing this during the install of a program is not an option. It has to be done at run time.
View 2 Replies
Jan 22, 2011
when i tried to saving value to My.Settings its just work fine on windows xp. but when i ran on windows 7, VS2008 told me to change permission on My.Setting to writeable.
View 4 Replies
May 13, 2009
I've written a windows service in VB.NET 2.0 and the service needs to know a few file paths and other settings when it starts in order to be able to do what its supposed to do. These are settings that users of my service need to be able to configure themselves so I cant hard code them in.At the moment I just have the service look for a file named Config.INI in the same directory that it is being run from and if this file exists it attempts to read the settings in from there... this works perfectly, but it just feels a bit clunky and old. If it was a normal windows app I would store the settings in an XML file in the user's application data folder or something but as this is a Service then thats not possible as it is not run by any one user (well technically it is, the Local System account). I then thought about using the registry but I seem to recall people saying that you should avoid storing settings in the registry if you can really, especially with the new security in Vista and Server 2008.
View 6 Replies
Jul 9, 2010
I have a basic three form application. It doesn't seem to close after navigating through forms. If I were to open the application, and the main form is displayed. If I press the X button, the application closes fine(Goes from processes) If I were to open the application, and then navigate from the main form to another form using me.hide & form1.show, and press the red X on Form1, the application again, closes fine.
[Code]...
View 6 Replies
Jun 4, 2011
.NET developing and have a simple question, i've been stuck on this for a while and searched many forums first with no solution so i'm posting myself. In VB for excel i've used Screenupdating=false to disable the screen updating however now i'm creating a visual studio 2010 windows forms application and its not showing up as a property. Here's the code i've tried.
[Code]...
View 4 Replies