Resetting The Values In Setting?

Mar 10, 2011

I'm storing data using my.settings (e.g., to use as a incremental counter). When I run my application it increments the value but, I do not know where to reset this value despite looking at all of the project files for them.

Is there a file that contains this data?

Note: at times during testing I don't want to reset the value(s) back to zero.

View 8 Replies


ADVERTISEMENT

Setting Parameter Values To Equal DataColumn Values?

Apr 23, 2011

I'm trying to assign some parameters for a stored procedure with some values that are stored in a data table. in the code, I can set the parameter values to the data table, and give a column header or index without issue, but when it tries to execute at runtime it bombs out.the error I get is a variation on "Failed to Convert Parameter Value from a DataColumn to a String" depending on exactly how I try to assign the value.the data types are all correct elsewhere in the code.

my code for this bit is

Try
ConnectionAttempt.Open()
Try
With NewYearCommand_Dates

[code]....

other things I've tried to get this to work are all variations on the .Value=dates bit, such as

.Value=dates(0) (so using column index)
.Value=dates.columns(0) (again using column index)

I've also tried declaring variables, and setting their values to the values in the columns, but the code returns an error saying that "Value of type 'System.Data.DataColumn' cannot be converted to string".I should point out that i'm doing this for 3 tables at once in this sub, 2 of them will only have a single row of data, but the third has an indeterminate number of rows.I'm afraid I don't know what else to do. I'm lead to believe by my mate and my lecturer that this should work, and of course it will work, but the evidence says otherwise.

View 1 Replies

Error With Setting Textbox Values

May 12, 2012

I am trying to set a rich text box value with this

[Code]...

but it does not work...WHats wrong

View 6 Replies

Setting Values To Options In ComboBoxes

May 27, 2010

I'm using VB 2010 and I'm trying to use combo boxes on a current project but I'm not familiar with the code. I would like to set values to certain options in the combo box.

For example, if inside the combo box I listed the options:
Dog
Cat
Bird

I want dog to be set to = 1
cat = 5
bird = 12

To go further into depth, the code probably looks something like:
If cat.selected then
pet = 1

View 2 Replies

VS 2008 Setting The Listbox Values?

May 15, 2009

Well, i have the listbox... and it has the colors

Black
Brown
Red
Orange

[code]....

now the code works like this

color + color * color = resist value

well, i need to give say black the value of 0 and brown 1 and red 2 and so on...How to I assign value to it?

View 6 Replies

XML Deserialization Not Setting Class Values

Nov 25, 2009

I am not seeing what I am doing wrong. To see what was being done, I changed the constructor values to "TEST", after the XML gets read in (I verified what the XML is), the class values are still stuck to "TEST". Any more Ideas? I am doing this process already in another class that works fine, neither me nor some co-workers could find the difference.[code]...

View 1 Replies

Programmatically Setting Property Values In A Usercontrol?

Nov 12, 2009

I am programatically creating instance of usercontrol as shown below

[code]...

I have two public properties in my usercontorl like clerkName and RespName. How can I set those values in the above code. Intellisense is not showing ClerkName and respName Properties.

View 1 Replies

Setting A Textbox To Only Accept Numeric Values?

Dec 9, 2010

I am looking into data validation as I need a way of setting a textbox to only accept numeric values. I have had a search for this and it doesn't seem as straight forward as I had hoped.

I have found a couple of possible methods, although the sites which I found them where very unclear on how they actually work. I feel strongly that I should know how all of my own programs work >_>

I have no actually got this to work with my program yet. Are there better methods than this?

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim allowedChars As String = "0123456789$,"

[Code].....

View 3 Replies

Setting Minimum And Maximum Values Of Text Box?

Aug 29, 2011

I want to set minValue and maxValue of text boxes to define a range of acceptable values for validation purposes.In VB 6 this is straight forward and can be done under text box properties, however in visual studio vb .net 2010 this is not the case or it may be the case that i am missing something.

View 4 Replies

Setting Registry Values With Binary Value Kind?

Sep 14, 2010

I am a newbie so please forgive me if my terminology is incorrect.I am trying to Update a Registry sub key value. I have done this a few times before with success. But this time is kinda different. I noticed a few things,like the sub key value is in HEX when I export the key (The value that I want to input is from a sub key that I exported) I can only get the registry to accept the command if I do not specify the registry value kind, but that doesn't do me any good if its not the correct value kind.

[Code]...

View 2 Replies

Setting Values On DataGridView From Context Menu

Jun 5, 2010

I'm have an app that currently allows a user to select a color (from a Color Dialog) which updates an unbound Datagridview with the name of the selected color & also changes the background of the selected row to that color.

I need to do one of 2 things:
Either change the Color Dialog so that I can set the colors available
Or Allow the user to select colors from a context menu and have that update the Datagridview.

View 1 Replies

Setting Values For Invisible Fields/Properties In DetailsView?

Mar 16, 2011

I have a DetailsView which has two fields - one that is visible, one that is not. The first the user fills out, the second I want to auto-populate. Unfortunately, I haven't been able to find a way to set the value in this second invisible field. I've tried adding code like this to the Page_Load:

If Not IsPostBack Then
DetailsView1.DefaultMode = DetailsViewMode.Insert
Dim txt1 As TextBox = DirectCast(DetailsView1.FindControl("Type"), TextBox)
txt1.Text = "administrator"
End If

But this returns an error of "Object reference not set to an instance of an object." Any ideas on how to accomplish this - either using the method above or another method?The hoped for end result is that when a new record is inserted via the DetailsView that this record will include the username (entered by the user) as well as the "type" of "administrator"

View 2 Replies

Setting Values To Predefined ComboBox Column In DataGridView

Jan 27, 2010

How to set values to a predefined combobox column in datagridview i.e., I want to set some values to this column other than binding

View 1 Replies

Random Exception Thrown When Setting Valid Month Values?

May 30, 2011

The exception message I am receiving is this... "Year, Month, and Day parameters describe an un-representable DateTime."

Now I've traced my values being passed and everything is correct. Values loops through 1 to 12 but still I continue to receive an exception. Only way I can avoid this is by throwing a Try, Catch statement around where I'm passing over the value.

Here's my code..

001 Dim Calendar(11) As AppointmentBookControl.AppointmentBookControlMonthlyOverviewCalendarControl
002

[Code]....

Line '011 .Month = i+1' is where the problem is located. The values for (i+1) maintain within the bounds of 1 through 12..

View 5 Replies

Setting/Reading Specific Values Of A Richtextbox Line To An Array

Dec 7, 2009

I have a button which reads a comma separated value file and loads it into a richtextbox. Each line contains comma separated chars.

Once the file is loaded in the richtextbox, i want to be able to select specific values from each line and store them into an array.

For example:
Line1: a,b,c,d,e

I want to be able to place only the values "b" and "c" into an array.

I was thinking something like creating a menu for the richtextbox which will be triggered on right click, then highlight the values I want, press right click and select 'place these values in an array'.

it doesn't have to be the way i proposed it, but it definitely must use a richtextbox.

View 9 Replies

Setting Input Box Values After Invoking Click Event On Webpage Buttons

Jul 5, 2011

I have some code that broadly looks like the following ...
WebBrowser1.Document.All("btn_submit").InvokeMember("click")
WebBrowser1.Document.GetElementsByTagName("select").Item("id_pickupdate").SetAttribute("value", "2011-07-07")

I cannot seem to get it to work in one code routine. I end up having to have a separate button to set the date after the page has loaded. I have tried all the blog posts using isbusy, timer etc but it does not seem to work. The code breaks and the error prompt says that id_pickupdate does not exist.

View 3 Replies

VS 2005 : Setting Item Properties With Values Of A Variable At Design Time?

Jul 7, 2009

is it possible to set a value of an item, for example: a textbox1.text = Empty.String at design time?

View 5 Replies

Asp.net - Resetting CascadingDropBoxList :S?

Nov 25, 2011

I've got the following set up:On a webapp, I've got an updatepanel Inside this update panel, I've got two regular panels and a set of two radio buttons, radio1 and radio2.On Panel1, I've got 4 drop down lists (lets call it DDL group1), being loaded by the CascadingDropDown Extender, meaning the first box triggers the second, and so on. All 4 DDLs have autopostback enabled, meaning that every time I select a value, a SelectedIndexChanged method is called which loads data from a database, based on the information selected on the last DDL.

On Panel2, I've got the same set up, except that I've only got 2 DDLs (let's call it DLL group 2), also linked as cascading dropdowns. These also have SelectedIndexChanged methods.

[Code]...

View 1 Replies

Resetting A DataGridView?

Jan 27, 2010

I've created an application that runs queries against a SQL server (via Data Adaptors) in VB.NET 08 and returns the results to a DataGridView. It works great and returns my data, but when I switch to a different query that returns different columns, the DataGridView keeps the old columns from the previous query and adds the new columns from the new query to the end (far right) of the DataGridView. Is there a way to counter this? I don't want those previous unused columns showing up in my results. I tried setting the DataGridView DataSource and DataMember to Nothing and that didn't fix it.

View 3 Replies

Resetting The CheckBox Value In A DGV?

Jun 9, 2012

I have a DataGridView in which their is one column defined as a CheckBox. This checkbox is used to delete the record if the user chooses to do so. When they check the box, the user is prompted with a confirmation deletion message. My issue is that if the user chooses not to delete the record, I want to "Uncheck" the box and I can't get this to work. I've tried using the below code and it still won't work.

dgvBuild.Rows(e.RowIndex).Cells(6).Value = False
dgvBuild.Rows(e.RowIndex).Cells(6).Value = CheckState.Unchecked

View 12 Replies

Resetting Variable (containing A Value) To Zero

Dec 10, 2011

Like so many of your subscribers I am a (very) basic beginer.[code]Taken from Visual Basic.Net, for complete beginers. (page 67)

View 4 Replies

AD Account Password Resetting

Jun 10, 2010

Looking to make a simple VB form, that has three text boxs on it. One for a users username, and two for passwords. What I want to do is provide teachers with this form, they type in a students username, and if that username is found in AD it enables the two password boxs. Then the teacher can type a new password for that user in the boxes (the second one obviously being a validation) and then when they click save, it updates the AD account with the new password. Any ideas on how to do this? Does anyone have any code?

View 4 Replies

Resetting A Integer Counter?

Aug 17, 2010

If I have a double variable that goes through a loop and gets numbers added to it, is it just as simple as saying variablename = 0 to reset it?

View 1 Replies

Resetting IIS Programmatically And Remotely?

Sep 9, 2009

Usually, when I reset the IIS of a remote server, I have to use "Remote Desktop Connection", log in, and go to DOS , and type "iisreset". Now I'm wondering is it possible to do the exact same thing without using "Remote Desktop Connection" application? Could this be done programmitically and remotely (because the program will not be running on the actual server)? Of course, I'll be providing the username and password within the program.

View 2 Replies

Resetting Lots Of Labels?

Dec 12, 2009

I have a form with lots of labels on it, and a reset button to reset them to a default text. This reset sub has lots of lines of code to get this done, but I think it cen be done in just a few. I thought of something like:

For Each Label In Me.Controls
Text = "0"
Next

but this doesn't work, or anything else that I've tried. how to do get this done? And what if I want half of the labels set to 0 and the other half to 1? Would that be possible without setting them all seperately?

View 6 Replies

Resetting The Username/password?

Dec 15, 2011

I have been coding a Reset Login Details form, the user needs to enter the new Username, the new Password and the Current Password.Here is my code below - something in the form is not working as i am getting an error when i fill in the form about the INSERT INTO statement.

Imports System.Data.OleDb
Public Class frmChangeLoginDetails
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click

[code].....

View 9 Replies

VS 2008 - Any Way Of Resetting StreamReader Value?

May 7, 2009

I'm trying to do a simple loop while reading a file. I have tried to make the streamreader as a public value, so this way it would be passed between the subs, or rather changed by each sub working with it. The problems comes into play, when I double click the read button, since the value of sr is assigned to -1 after the first full read, so the program doesn't read the data from begging but assumes the end of the file and stops. Is there any way to reassign or reset the value of sr so that the file will be read again from the beginning? This is the example code I got.

Public Class formcollegetut
Public sr As IO.StreamReader = IO.File.OpenText("colleges.txt")
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim test As String = ""
Do While sr.Peek <> -1
ReadData(test)
[Code] .....

View 3 Replies

VS 2008 Resetting A DataGridView?

Jan 28, 2010

I've created an application that runs queries against a SQL server (via Data Adaptors) in VB.NET 08 and returns the results to a DataGridView. It works great and returns my data, but when I switch to a different query that returns different columns, the DataGridView keeps the old columns from the previous query and adds the new columns from the new query to the end (far right) of the DataGridView. Is there a way to counter this? I don't want those previous unused columns showing up in my results.

I tried setting the DataGridView DataSource and DataMember to Nothing and that didn't fix it.

Here is my code...in case that helps

Connection.ConnectionString = "Provider=SQLOLEDB;Data Source=;Initial Catalog=;Integrated Security=SSPI;"
Connection.Open()

[Code]....

View 2 Replies

Font Dialog Resetting Fonts In RTB?

Aug 31, 2011

I'm using the font dialog and have noticed that when I select/highlight portions of text and then cancel out of the dialog, the selected text is changed to the default settings (i.e., font type, style, size, color, etc).

Is there a way to preserve the original text settings?

View 2 Replies

Prevent Publish Resetting Cookies Using ASP.NET?

Feb 9, 2011

I have a web site which uses cookies using ASP.NET, however everytime I publish a new site and upload all or some of the new .dlls it invalidates all the existing cookies. The cookies are used to track simple logins, but I want to maintain the cookies that were created before a publish so they are still usable afterwards - this seems to affect webkit based browsers and in my testing I can replicate this issue after each partial or full publish.

[Code]...

View 2 Replies







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