I have to save the text boxe values of a form to a text file almost like a data record. I will be saving an Employee First Name, Last Name, Dept Number, and Phone Number. This I know how to do using streamwriter.
next form which we have to use stream reader to load one record at a time. The form has a next button to load the next record. How do I seperate each record (I am sorry for calling it a record if this is inappropriate) when use streamreader and how do I load a record at a time.
I know how to open a file and use streamreader, I just don't know how to read one record at a time and move to the next one.
Ok, i've been making my own syntax highlighter for my project, and i need to know how to make the colour of the text between these two text values green
I have declared an array of text boxes created dynamically at run time. The textboxes are assigned some values by user. The text boxes are located in a Form so that once the user fills in the info and clicks the "ok" button, these values are passed at the back end and the form dissappears. However the user can bring back the form again by clicking another button.
The problem is that once the form reappears, the information previously provided in the form remains. Even the user clears the text boxes to provide new value, the text boxes at code behind do not receive these values.
What would be the fasted method of get a string list of all values within [] in a string of text? For example: [client_name], are you are doing today? My name is [my_name]. The list of strings would be:
i have 18 text boxes with a number in each. i would like to find the 4 highest amounts within theses text boxes. I was thinking i should just load the values into an array and then maybe sort the array high to low and then just grab the first 4 entries in the array after it is sorted.
i am writing a golf score program and i have 18 text boxes. i also have a text box that will calculate the total of all of the 18 other text boxes. what would be the best way to add these text boxes? i have already written code to only except numbers 1 thru 8 for each text box.i started with some code like this:
but if there is no value in one of the text boxes i get an error:Conversion from string "" to type 'Integer' is not valid.so i am guessing i need to check for empty strings and then ignore them
Basically i have 12-16 text boxes, with certain values in them.
i think i need a nested loop one to take first box and go through the rest to compare them and then a second loop withint that to do the actual comparison.
I have a table with field data. Each row in the table represents a field on a contact. One row would contain the contact ID, the type of field (ex. "Email"), and the actual value of the field ("here@that.com"). Now i want to list all the emails for 1 contact in a single row (like "here@that.com, a@b.com, test@this.com").Can I do this with an SQL function in a GROUP BY? Something like:
Code:SELECT ContactID, SOMEFUNCTION(FieldValue) FROM Contacts GROUP BY ContactID
Having come from the MS Access IDE, I have used hidden text boxes to store information needed on a given form. Often they are data-bound and the program needs to reference the data but the end user does not need to, or should not, see them.
I am very surprised to find that in .NET, you cannot do this. Making a control visible=false should be a UI decision, but the value should still be programaticaly available. Am I just missing something, or is this truly a limitation in .NET?
I'm trying too have values inputted through a text box, and then have the program calculate how much the person will earn in their working life.
Dim Name As String Dim Salary, Total, Raise As Double Dim Age, Retire, Count As Integer
[code]....
However, whenever i click the button to calculate, it gives me how much he would have earned after 1 year with 1 raise, but i can't see what i'm missing.
So I'm writing a simple piece of code to take a series of strings, go through them, and replace and add values as needed, and then dump them all out to a text box. However, when I run the code I'm getting 3 null characters at the end of each line except for the last one. What am I doing wrong?
Code: If isPet.Checked = False Then While intI <> lenCode Try lineHold = codeHold(intI).Split(",")
If rad1.Checked = True Then If t1.Text = rad1.Text Then MessageBox.Show("Congratulations") ElseIf t2.Text = rad1.Text Then MessageBox.Show("Congratulations") ElseIf t3.Text = rad1.Text Then
[Code]...
so i have this code which is trying to allow the user click the label (of which there are 26) and then decide whether the letter in the label matches the letter that has been generated in the radio button. I KNOW there is a more simplified to do this and much less code to write but i cant work it out. this is an image of what im trying to achieve but instead of buttons change those to radio buttons x 3.
How I could go about checking a typed value in a combo to the values in the combo box. I am making a system to select lockerID and Supplier ID I want the user to be able to enter the value in the combo box as well as select the value form the list in the combo box. Here is the code I have been trying.
If cboStockID.Text = "" And cboStockID.Text <> cboStockID.Items.ToString Then MsgBox("Please enter Stock ID") Exit Sub ElseIf cboSupplierID.Text = "" Then MsgBox("Please Enter Supplier ID") Exit Sub End If
I have two text files which contains are like this[code]..
When the original files find the same values in drill file than it must overwrite the original file the line from drill file. Let say original file contain T230 than it must serch for same value in drill file if it find than it must overwrite the original file line with drill file line. The content of drill file is not fix. It will allways be update according to need.
I am using vb.net from vs2003. I have four fields from data base Line1, Line2, Line3, Line4 all of string type. Now I want to display these 4 values in a multiline text box so that each of these values will be on different line.I am using Chr(10) for line feed but not getting expected results.
I'm reading in values from an array of arbitrary size into a text box. Easy enough. However, in my application, certain values of the data are unusable and I'd like to give a visual warning to the user when this occurs. Whenever the data is either negative or greater than 10, I'd like to display that value in red. How can I do this with a RTB?
How to match one value to another value in same text file. For example I have a this value : 116.71 33.3 in my text file. I want to check whether another same value exist in a same text file or not.
I used this code to find my first value Do myLine = myReader.ReadLine() Loop Until myLine.Contains("*+*+* Top *+*+*") Do Until myReader.EndOfStream myLine = myReader.ReadLine() [Code] ..... Once I get the value I want to check another same value exist in the same text file or not.
i am having a few problems with something i need to create. it firsts needs to get source code of a url i specify, after which i need to click a few buttons so it gets different parts (extract) of the data that i need from the source code and display it in a different text box if possile. (while leaving the original sorce code intact)
I know similiar question have been asked but they are a little different so here I go. Basically I have a game in which the user enters their name and they get a score. This name and score then get recorded when they end the game as follows:
Dim userdataSW As New StreamWriter("E:GameScores.txt", True) strline = frmVictory.TempPlayerName & "," & frmVictory.TempPlayerScore userdataSW.WriteLine(strline) userdataSW.Close() userdataSW.Dispose()
What I then need to do is sort these values in the text file from largest to smallest (based on the number not the name but I still want the name to be assosiated with that score) so I can have the top 10 scores appear in a hall of fame type thing.
I'm using the combo box control in VB.It is not bound to a data source.Visual Studio gave me a text box to enter the values for the combo box.When I run the program, there is a blank value?How do I eliminate this blank (or null) combo value? My combo box is a required field.
For example I entered Option 1 Option 2 Option 3
When the program is ran, the combo box has <blank> (which is selected) Option 1
I don't know where this fits so moderators go easy. I've been trying to enter a text box on this site using a form made with Visual Studio 2010. See here for the site. I have the following
I have a rich text box and i want to enter 10 values and I want to use this button I have to store it. How can I do this? Or can anyone link me to the Microsoft site with information about this? (this is visual basic in Visual studio 2008)