Repeating Strings Generated, Error In Array Input?
Apr 15, 2009
I have a program that continuously reads in hex values as part of an rfid reader. My question is: How would I write code that detects when this changes? i.e. I have a visual basic textbox that is continuously updated as so:
[Code]...
And it points to the name of my form. This occurs at the "newArray(p) = strangeCardNames" line of code. If anyone else has an idea for how I can either fix this or another method to detect a change and store it in a variable,
I read a line from a text file with text as "ABC.txt", "XYZ.txt", "TEST.txt".I use code file = sr.ReadLine(); to assign the text to variable file. Now I want to initiate a string array likestring[] FileNames = {file}; it doesn't work. What should I do?
I'm converting a user generated list box to an array and then generating a user defined number of random strings and placing it in a textbox.The code I have works fine as it will generate the number of random strings the user wants, except sometimes a line is blank at the top of the list but is counted as a string.
n my project i am to enter a name and a test mark into two separate text boxes and then select the button to store the information into the arrays, one array for names and another for marks, but when it is reset using the Erase <Array> fuction andi try to re enter information, no matter what information is entered i get a "Null Reference Exception Unhandled" Error.I am using Visual Basic 2008.My code is as it says from now:
Public Class frmAdverageTestMarkCalculator Dim ClosingMsg As String Dim Closingtitle As String
I am coding a Student Management System using VB.NET and Access DOn the Form for Teacher Bio-Data, I want to use a table in which I can place Teacher Qualifications in a tabular format. In other words, say, the teacher had Primary, Secondary and Tertiary education. I want to put a header as Qualifications, Year and Grades. Is there any such tool in Visual Studio that I can use?
Is there a way to repeat two popup input boxes (in succession) until the user presses cancel? Dim hours As Integer Dim letterGrade As String Do hours = InputBox("Total credit hours", "Total credit hours", ) letterGrade = InputBox("Letter Grade", "Letter Grade", ) Loop The input boxes continue to repeat but when I hit cancel nothing happens... I'm sure I'm missing something to tell it when I cancel to go back to the MainForm I just don't know what it is.....
I have a problem with the code, I have input the valid username and password in the form textbox to input the strings in php, but it keep displaying the messagebox that says login failed.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MessageBox.Show("Please enter your username") ElseIf Textbox2.Text = Nothing Then MessageBox.Show("Please enter your password") Else
[CODE]...
I don't really know why it keep displaying the messagebox that says it failed when I have input the valid strings in the first place.
I need to count number of repeating and position where they repeat of all number in multidimensional array like this:
1 2 1 1 1 2 2 3 1
And result need to be:
Number 1- two times on position 1, one time on position 2, two times on position 3 Number 2- one time on position 1, two times on position 2, one times on position 3 Number 3- 0 on position 1, one time on position 2, 0 on position 3
I have an array that hold 6 random number, then this numbers are sorted from smallest to highest. My question is: How would I go about replacing any repeating numbers with a different random number. I.e. 1 3 7 2 2 9 is sorted into 1 2 2 3 7 9, but I would like to see one of the 2's replaces with a different number (that it is not currently in the array).
I have no code for this part - but the code for making the random number, storing them and sorting them works fine.
I am currently creating a vending machine program, designed to simulate a vending machine. However I have come across a rather large error, my stock is 50 at the begging. The person can go though the program and the appropiate amount of stock is taken away from the relavent object, however when I finish and want to go back to the start the last selection is still present.Therefore I have tried setting the variable as 0 when the form opens and when the program starts, but the last selection is still present.Does anyone know of a way to which I can reset this calculation without affecting my stock so I can then repeat my program cycle one or two times each time using the previous stock without reseting back to 50
I want to create a form where the user can upload as many images as they like with the input areas being dynamically generated. I can't use Ajax for this I need to use ASP.NET controls and the images are being written to a database. Any ASP.NET control that can accomplish this? Here is my code for the dynamic form, its Javascript and its not passing the "PictureSmallLink" value back...and their in lies my problem.
I created a custom class for a custom object. I instantiate like so[code]...
Now, I have two problems. First, right now this is just overwriting the same object properties, again, and again. I need to somehow dynamically name the object. Then, I need to place these objects in an array so I can iterate through them...
Per this UserControl that can be added to a blank form, I would like to use the HorizUnits array below to map custom grid x coordinate from a mouse x position.For a given input value 13, what syntax would I use to obtain a value of 2 where 13 lies between Value 10 and 16 for which 2 (Name) would be the custom grid's displayed coordinate position?
I am generating an array of random numbers for for a class project (simple yahtzee game)I am comparing the output of the array and displaying a picture of each matching dice in a picture box.I would like to use check boxes to select a position of the array so it cannot be changed until the check boxes are clearedWhen the check box is checked, the value of the position in the array should not change.
I'm trying to create a form that accepts names (or any strings) as input and stores them in a object. See attached form sample.Form Image:
Operations: ï Initially the NumericUpDown object on the form should be disabled.The user enters a value (string) in the textbox and clicks the Add button or presses the Enter key to activate that button.The application then stores that name in a List object, and displays the last entry in the Label underneath.The NumericUpDown should become enable after the first entry. The user should be able to move between all the values entered using NumericUpDown.
I have just loaded the VB 2010 express software and teaching myself by doing the tutorials that comes with the software. The following code, from the Pictureviewer tutorial, is generating an error. Would you please advise as to what the problem is. The code and error are as follows:
I have written another windows application A. I then use another application B using process to run the application A. My main problem is to catch the error generated by application A so that application B can then perform some actions.
Part of my assignment is to check if input to Group Number and Number of Units are correct input by making error handling exceptions...
I have to check the following: a) group number is neither 501 nor 062 b) number of units are NOT numbers c) number of units is NOT a positive number
So my first question is, am I checking correctly? 2nd question is, How do I make sure my Exceptions will pertain to their correct respective things (a, b, and c.. above)?
Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?
I am trying to use a script mananger to use page methods to communicate between the server and client side of my page. I have added this code to the html