im creating a simple program where the user inputs there own numbers in a textbox and the program works out the total and average and produces a bar chart.I have done the hard part of creating the bar chart, but i am stuck on using the numbers in the text box from the array.[code]
I'm trying to make a program where user can input data from a textbox into an array and when the user hit the enter key, it compare it to a data grab from a text file. Here is my code so far:
Private Sub TextBox_KeyDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox.TextChanged Dim input As String
[Code]....
I got the part where the program can graph data from text file and put it into an array called "varia3". The part I could not get is allowing user to enter data into the textbox. When I run the program, the sec I try to enter a letter or number into the textbox the program ended.
I have a program for school project that has input fields for Name, Address, City, State and Zip. I need to error check so that the fields are not empty.I have used If statements that check to see if the fields are empty and shows a message box if they are but if I leave the whole form empty and click the button that activates it, all the if statements go- one by one instead of pausing for the user to input the required data.How do I check for data and make the program stay there until the data is input? I have tried TRY/CATCH but it won't catch this type of error.
this is the
'This program computes customer's bills at the pizza shop for all combinations of 'crusts, toppings, sizes and discounts Option Strict On Public Class PizzaForm
I've to make a program that reads an arithmetical sentence from a textbox, e.g 12.3*34+4*5-3 and then on another textbox identify and display what is the content of the first textbox, for example taking the last ex:
This program should only read this operators like (+,-,*,/).I'm have in mind 2 ways of doing it, one with regex and the other taking the first sentence, put it on an array, then trim it, and somehow get the values of the array and identify if it is a number or a decimal number and if it's an operator and then display it.
The difficult part or the part that i can't conceptualize is how to implement it with regex (it should be easier with a regex format than storing it on a array).I write a bit of code, I used an array to store and then to print the numbers and I used the split function to separate the math operator, but I dunno how to print the operators and the tags.
vb Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Sentencia As String = TextBox1.Text Dim i As Integer Dim arryTextBox() As String TextBox2.Clear() arryTextBox = Sentencia.Split("+", "-", "*", "/") For i = 0 To UBound(arryTextBox) Dim Array As String = arryTextBox(i)
[code].....
Btw, I also have the code to validate the input on the textbox ::wink::
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?
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
Here is my problem: I have a DataGridView and I am adding a new row. In a particular cell, I have to check that the user does not enter existing values in the related table. That is, the value of that cell must be unique. If the user enters an existing value, the application must:
- Show error message
- Clean the cell
- Put the focus again into the cell, to allow the user to enter another value.
Option Strict On Public Class Form1 Private Sub btnDistance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDistance.Click 'The btnEnterSpeed click event accepts and displays up to ten speeds from the user'and then calculates and displays average speed
[Code]...
I cannot figure out how to incorporate the number of days into the input box then get it to loop and count the number of times the User inputs in the number of days. Then I have to incorporate it into the equation to get the total distance D = MPH * Hours. What I have right now wil not count up the number of days and locks up after I input one number and will not add anything to the listbox. Because I also have to make sure that they cant add nonnumaric values and the number of hours per day cannot exceed 20. I have put things in and taken them out but it has been 2 days and I am lost now
how to input a data/value to excel through vb input form and get the data/value from excel back to the input form?? (For example: put a number into exel A1 from input form and get another number from ecel B1 bact to the input form)
I've been working on some code to add together input from an input box to make a string and display it in a message box. I've put the code in a loop so that it will add all input into the string until nothing is entered in the input box.
Dim stringInput As String Dim message As String Do Until stringInput = String.Empty
[Code].....
All I get is just the last input entered to show up in the message box and none of the previous entries. How do I get all the input to be added together and show up in the message box?
Do anybody know how to input value to array? I know how to input the value by editing the code but I want to let users to enter value by themselves (such as using a input box). Plz help!
In my program, I need to have the user input a list of numbers separated by commas. How would I go about storing those numbers? Would I put them into an array? If so, how?
im creating a simple program where the user inputs there own numbers in a textbox and the program works out the total and average and produces a bar chart.I have done the hard part of creating the bar chart, but i am stuck on using the numbers in the text box from the array.This is the code for my array lists:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles graph_btn.Click Dim aMonths As ArrayList = New ArrayList(), aAmounts As ArrayList = New ArrayList() aMonths.Add("1") aMonths.Add("2") aMonths.Add("3") aMonths.Add("4")
Dim cn As String = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database genk.mdb;") Dim SQLString As String = "SELECT * FROM Products" Dim DBConn1 As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(cn) Dim DataSet1 As New DataSet() Dim DataAdapter1 As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(SQLString, DBConn1)
[Code]...
When the user clicks the button the all the data in my Products table is displayed on a datagrid. How can i put the data inside my Products table into an array so i can manipulate my fields to undergo quick sort.
I am trying to write a program that reads values from a datafile and makes the data available in an array for further use in the program. The data consist of a description and then a value (COM_PORT=COM1, for example). My idea is to put the data in an array so that I can just search the array for COM_PORT and I will get COM1 back. Is that a good approach of handling it this way? What methods would I use to put the data (I use FileSystem.ReadAllText, the data is in a string) into an array? Would the split method work?
I am trying to make a program using Visual Basic that will allow the user to add links to web pages (such as www.google.ca) to a list in the program and make it so that they do not dissapear once the program is closed.
So to get into more detail, I have a text box, a listview, and a button. When the user types a link into the text box it needs to be put into an array (called "addlink") and then when the user presses the button, the link is typed into the listview as an object.
Then if the user clicks on that object in the listview, it will open up the browser using the WebBrowser command. How do I set the text in the textbox to an array once the button is clicked?
Specifications:
OS: Windows 7 Ultimate Edition Software: Microsoft Visual Basic 2010 Express Experience with Visual Basic: Average
how to pass user entered data (from a textbox) to an array? All the examples I have found show how to populate an array with predefined values. Heres what I've got, its messing and not close to what I want.
Private Sub AddButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddButton.Click Dim AddNumInteger As Integer
[Code].....
When the users clicks the add button the value they entered in the NumAdd textbox is sent to an element?
I have just started with vb and would like to know if there is a way to input several boxes of data on one form and display individual pieces of that data on several other forms at timed events in the future?
I'm just trying to create a graph where the user can input data into textboxes and then plot the data. I am attempting to use Zedgraph, but open to other suggestions. The program below creates a plot, but it won't update when the textboxes are updated.
Imports ZedGraph Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
I have 10 constant arrays of data that can be used throughout the program.[code]I also have an array that needs to be populated randomly depending on user input.array_user(8)If the user selects 3 for instance...I need the data in array_user to be populated by the data in array03.I know I can do that with if/then statements...but I'm sure there is a much simpler way to do it.
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?